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: google/protobuf/struct.proto
package io.prestosql.orc.protobuf;
/**
*
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of that
* variants, absence of any variant indicates an error.
* The JSON representation for `Value` is JSON value.
*
*
* Protobuf type {@code google.protobuf.Value}
*/
public final class Value extends
io.prestosql.orc.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.protobuf.Value)
ValueOrBuilder {
// Use Value.newBuilder() to construct.
private Value(io.prestosql.orc.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Value() {
}
@java.lang.Override
public final io.prestosql.orc.protobuf.UnknownFieldSet
getUnknownFields() {
return io.prestosql.orc.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Value(
io.prestosql.orc.protobuf.CodedInputStream input,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws io.prestosql.orc.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
kindCase_ = 1;
kind_ = rawValue;
break;
}
case 17: {
kindCase_ = 2;
kind_ = input.readDouble();
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
kindCase_ = 3;
kind_ = s;
break;
}
case 32: {
kindCase_ = 4;
kind_ = input.readBool();
break;
}
case 42: {
io.prestosql.orc.protobuf.Struct.Builder subBuilder = null;
if (kindCase_ == 5) {
subBuilder = ((io.prestosql.orc.protobuf.Struct) kind_).toBuilder();
}
kind_ =
input.readMessage(io.prestosql.orc.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.prestosql.orc.protobuf.Struct) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 5;
break;
}
case 50: {
io.prestosql.orc.protobuf.ListValue.Builder subBuilder = null;
if (kindCase_ == 6) {
subBuilder = ((io.prestosql.orc.protobuf.ListValue) kind_).toBuilder();
}
kind_ =
input.readMessage(io.prestosql.orc.protobuf.ListValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.prestosql.orc.protobuf.ListValue) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 6;
break;
}
}
}
} catch (io.prestosql.orc.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new io.prestosql.orc.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final io.prestosql.orc.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prestosql.orc.protobuf.StructProto.internal_static_google_protobuf_Value_descriptor;
}
protected io.prestosql.orc.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prestosql.orc.protobuf.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prestosql.orc.protobuf.Value.class, io.prestosql.orc.protobuf.Value.Builder.class);
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public enum KindCase
implements io.prestosql.orc.protobuf.Internal.EnumLite {
NULL_VALUE(1),
NUMBER_VALUE(2),
STRING_VALUE(3),
BOOL_VALUE(4),
STRUCT_VALUE(5),
LIST_VALUE(6),
KIND_NOT_SET(0);
private final int value;
private KindCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KindCase valueOf(int value) {
return forNumber(value);
}
public static KindCase forNumber(int value) {
switch (value) {
case 1: return NULL_VALUE;
case 2: return NUMBER_VALUE;
case 3: return STRING_VALUE;
case 4: return BOOL_VALUE;
case 5: return STRUCT_VALUE;
case 6: return LIST_VALUE;
case 0: return KIND_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public static final int NULL_VALUE_FIELD_NUMBER = 1;
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
*/
public int getNullValueValue() {
if (kindCase_ == 1) {
return (java.lang.Integer) kind_;
}
return 0;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
*/
public io.prestosql.orc.protobuf.NullValue getNullValue() {
if (kindCase_ == 1) {
io.prestosql.orc.protobuf.NullValue result = io.prestosql.orc.protobuf.NullValue.valueOf(
(java.lang.Integer) kind_);
return result == null ? io.prestosql.orc.protobuf.NullValue.UNRECOGNIZED : result;
}
return io.prestosql.orc.protobuf.NullValue.NULL_VALUE;
}
public static final int NUMBER_VALUE_FIELD_NUMBER = 2;
/**
*
* Represents a double value.
*
*
* double number_value = 2;
*/
public double getNumberValue() {
if (kindCase_ == 2) {
return (java.lang.Double) kind_;
}
return 0D;
}
public static final int STRING_VALUE_FIELD_NUMBER = 3;
/**
*
*
* .google.protobuf.ListValue list_value = 6;
*/
public io.prestosql.orc.protobuf.ListValueOrBuilder getListValueOrBuilder() {
if (kindCase_ == 6) {
return (io.prestosql.orc.protobuf.ListValue) kind_;
}
return io.prestosql.orc.protobuf.ListValue.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(io.prestosql.orc.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (kindCase_ == 1) {
output.writeEnum(1, ((java.lang.Integer) kind_));
}
if (kindCase_ == 2) {
output.writeDouble(
2, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 3) {
io.prestosql.orc.protobuf.GeneratedMessageV3.writeString(output, 3, kind_);
}
if (kindCase_ == 4) {
output.writeBool(
4, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 5) {
output.writeMessage(5, (io.prestosql.orc.protobuf.Struct) kind_);
}
if (kindCase_ == 6) {
output.writeMessage(6, (io.prestosql.orc.protobuf.ListValue) kind_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (kindCase_ == 1) {
size += io.prestosql.orc.protobuf.CodedOutputStream
.computeEnumSize(1, ((java.lang.Integer) kind_));
}
if (kindCase_ == 2) {
size += io.prestosql.orc.protobuf.CodedOutputStream
.computeDoubleSize(
2, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 3) {
size += io.prestosql.orc.protobuf.GeneratedMessageV3.computeStringSize(3, kind_);
}
if (kindCase_ == 4) {
size += io.prestosql.orc.protobuf.CodedOutputStream
.computeBoolSize(
4, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 5) {
size += io.prestosql.orc.protobuf.CodedOutputStream
.computeMessageSize(5, (io.prestosql.orc.protobuf.Struct) kind_);
}
if (kindCase_ == 6) {
size += io.prestosql.orc.protobuf.CodedOutputStream
.computeMessageSize(6, (io.prestosql.orc.protobuf.ListValue) kind_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.prestosql.orc.protobuf.Value)) {
return super.equals(obj);
}
io.prestosql.orc.protobuf.Value other = (io.prestosql.orc.protobuf.Value) obj;
boolean result = true;
result = result && getKindCase().equals(
other.getKindCase());
if (!result) return false;
switch (kindCase_) {
case 1:
result = result && getNullValueValue()
== other.getNullValueValue();
break;
case 2:
result = result && (
java.lang.Double.doubleToLongBits(getNumberValue())
== java.lang.Double.doubleToLongBits(
other.getNumberValue()));
break;
case 3:
result = result && getStringValue()
.equals(other.getStringValue());
break;
case 4:
result = result && (getBoolValue()
== other.getBoolValue());
break;
case 5:
result = result && getStructValue()
.equals(other.getStructValue());
break;
case 6:
result = result && getListValue()
.equals(other.getListValue());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (kindCase_) {
case 1:
hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNullValueValue();
break;
case 2:
hash = (37 * hash) + NUMBER_VALUE_FIELD_NUMBER;
hash = (53 * hash) + io.prestosql.orc.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getNumberValue()));
break;
case 3:
hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
break;
case 4:
hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + io.prestosql.orc.protobuf.Internal.hashBoolean(
getBoolValue());
break;
case 5:
hash = (37 * hash) + STRUCT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStructValue().hashCode();
break;
case 6:
hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getListValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prestosql.orc.protobuf.Value parseFrom(
io.prestosql.orc.protobuf.ByteString data)
throws io.prestosql.orc.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prestosql.orc.protobuf.Value parseFrom(
io.prestosql.orc.protobuf.ByteString data,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws io.prestosql.orc.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prestosql.orc.protobuf.Value parseFrom(byte[] data)
throws io.prestosql.orc.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prestosql.orc.protobuf.Value parseFrom(
byte[] data,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws io.prestosql.orc.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prestosql.orc.protobuf.Value parseFrom(java.io.InputStream input)
throws java.io.IOException {
return io.prestosql.orc.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prestosql.orc.protobuf.Value parseFrom(
java.io.InputStream input,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return io.prestosql.orc.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prestosql.orc.protobuf.Value parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return io.prestosql.orc.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prestosql.orc.protobuf.Value parseDelimitedFrom(
java.io.InputStream input,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return io.prestosql.orc.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prestosql.orc.protobuf.Value parseFrom(
io.prestosql.orc.protobuf.CodedInputStream input)
throws java.io.IOException {
return io.prestosql.orc.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prestosql.orc.protobuf.Value parseFrom(
io.prestosql.orc.protobuf.CodedInputStream input,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return io.prestosql.orc.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prestosql.orc.protobuf.Value prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
io.prestosql.orc.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of that
* variants, absence of any variant indicates an error.
* The JSON representation for `Value` is JSON value.
*
*
* Protobuf type {@code google.protobuf.Value}
*/
public static final class Builder extends
io.prestosql.orc.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.protobuf.Value)
io.prestosql.orc.protobuf.ValueOrBuilder {
public static final io.prestosql.orc.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prestosql.orc.protobuf.StructProto.internal_static_google_protobuf_Value_descriptor;
}
protected io.prestosql.orc.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prestosql.orc.protobuf.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prestosql.orc.protobuf.Value.class, io.prestosql.orc.protobuf.Value.Builder.class);
}
// Construct using io.prestosql.orc.protobuf.Value.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
io.prestosql.orc.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (io.prestosql.orc.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
kindCase_ = 0;
kind_ = null;
return this;
}
public io.prestosql.orc.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prestosql.orc.protobuf.StructProto.internal_static_google_protobuf_Value_descriptor;
}
public io.prestosql.orc.protobuf.Value getDefaultInstanceForType() {
return io.prestosql.orc.protobuf.Value.getDefaultInstance();
}
public io.prestosql.orc.protobuf.Value build() {
io.prestosql.orc.protobuf.Value result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.prestosql.orc.protobuf.Value buildPartial() {
io.prestosql.orc.protobuf.Value result = new io.prestosql.orc.protobuf.Value(this);
if (kindCase_ == 1) {
result.kind_ = kind_;
}
if (kindCase_ == 2) {
result.kind_ = kind_;
}
if (kindCase_ == 3) {
result.kind_ = kind_;
}
if (kindCase_ == 4) {
result.kind_ = kind_;
}
if (kindCase_ == 5) {
if (structValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = structValueBuilder_.build();
}
}
if (kindCase_ == 6) {
if (listValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = listValueBuilder_.build();
}
}
result.kindCase_ = kindCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
io.prestosql.orc.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
io.prestosql.orc.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
io.prestosql.orc.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
io.prestosql.orc.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
io.prestosql.orc.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(io.prestosql.orc.protobuf.Message other) {
if (other instanceof io.prestosql.orc.protobuf.Value) {
return mergeFrom((io.prestosql.orc.protobuf.Value)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prestosql.orc.protobuf.Value other) {
if (other == io.prestosql.orc.protobuf.Value.getDefaultInstance()) return this;
switch (other.getKindCase()) {
case NULL_VALUE: {
setNullValueValue(other.getNullValueValue());
break;
}
case NUMBER_VALUE: {
setNumberValue(other.getNumberValue());
break;
}
case STRING_VALUE: {
kindCase_ = 3;
kind_ = other.kind_;
onChanged();
break;
}
case BOOL_VALUE: {
setBoolValue(other.getBoolValue());
break;
}
case STRUCT_VALUE: {
mergeStructValue(other.getStructValue());
break;
}
case LIST_VALUE: {
mergeListValue(other.getListValue());
break;
}
case KIND_NOT_SET: {
break;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
io.prestosql.orc.protobuf.CodedInputStream input,
io.prestosql.orc.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.prestosql.orc.protobuf.Value parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (io.prestosql.orc.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prestosql.orc.protobuf.Value) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public Builder clearKind() {
kindCase_ = 0;
kind_ = null;
onChanged();
return this;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
*/
public int getNullValueValue() {
if (kindCase_ == 1) {
return ((java.lang.Integer) kind_).intValue();
}
return 0;
}
/**
*