com.devcycle.sdk.server.local.protobuf.CustomDataValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-server-sdk Show documentation
Show all versions of java-server-sdk Show documentation
Server side SDK to interact with DevCycle.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: variableForUserParams.proto
package com.devcycle.sdk.server.local.protobuf;
/**
* Protobuf type {@code CustomDataValue}
*/
public final class CustomDataValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:CustomDataValue)
CustomDataValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use CustomDataValue.newBuilder() to construct.
private CustomDataValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CustomDataValue() {
type_ = 0;
stringValue_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CustomDataValue();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.devcycle.sdk.server.local.protobuf.VariableForUserParams.internal_static_CustomDataValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.devcycle.sdk.server.local.protobuf.VariableForUserParams.internal_static_CustomDataValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.devcycle.sdk.server.local.protobuf.CustomDataValue.class, com.devcycle.sdk.server.local.protobuf.CustomDataValue.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_ = 0;
/**
* .CustomDataType type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .CustomDataType type = 1;
* @return The type.
*/
@java.lang.Override public com.devcycle.sdk.server.local.protobuf.CustomDataType getType() {
com.devcycle.sdk.server.local.protobuf.CustomDataType result = com.devcycle.sdk.server.local.protobuf.CustomDataType.forNumber(type_);
return result == null ? com.devcycle.sdk.server.local.protobuf.CustomDataType.UNRECOGNIZED : result;
}
public static final int BOOLVALUE_FIELD_NUMBER = 2;
private boolean boolValue_ = false;
/**
* bool boolValue = 2;
* @return The boolValue.
*/
@java.lang.Override
public boolean getBoolValue() {
return boolValue_;
}
public static final int DOUBLEVALUE_FIELD_NUMBER = 3;
private double doubleValue_ = 0D;
/**
* double doubleValue = 3;
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
return doubleValue_;
}
public static final int STRINGVALUE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object stringValue_ = "";
/**
* string stringValue = 4;
* @return The stringValue.
*/
@java.lang.Override
public java.lang.String getStringValue() {
java.lang.Object ref = stringValue_;
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();
stringValue_ = s;
return s;
}
}
/**
* string stringValue = 4;
* @return The bytes for stringValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = stringValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stringValue_ = 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 (type_ != com.devcycle.sdk.server.local.protobuf.CustomDataType.Bool.getNumber()) {
output.writeEnum(1, type_);
}
if (boolValue_ != false) {
output.writeBool(2, boolValue_);
}
if (java.lang.Double.doubleToRawLongBits(doubleValue_) != 0) {
output.writeDouble(3, doubleValue_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringValue_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, stringValue_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != com.devcycle.sdk.server.local.protobuf.CustomDataType.Bool.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (boolValue_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, boolValue_);
}
if (java.lang.Double.doubleToRawLongBits(doubleValue_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, doubleValue_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringValue_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, stringValue_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.devcycle.sdk.server.local.protobuf.CustomDataValue)) {
return super.equals(obj);
}
com.devcycle.sdk.server.local.protobuf.CustomDataValue other = (com.devcycle.sdk.server.local.protobuf.CustomDataValue) obj;
if (type_ != other.type_) return false;
if (getBoolValue()
!= other.getBoolValue()) return false;
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
if (!getStringValue()
.equals(other.getStringValue())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + BOOLVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBoolValue());
hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
hash = (37 * hash) + STRINGVALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue 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 com.devcycle.sdk.server.local.protobuf.CustomDataValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue 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 com.devcycle.sdk.server.local.protobuf.CustomDataValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue 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(com.devcycle.sdk.server.local.protobuf.CustomDataValue 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;
}
/**
* Protobuf type {@code CustomDataValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:CustomDataValue)
com.devcycle.sdk.server.local.protobuf.CustomDataValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.devcycle.sdk.server.local.protobuf.VariableForUserParams.internal_static_CustomDataValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.devcycle.sdk.server.local.protobuf.VariableForUserParams.internal_static_CustomDataValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.devcycle.sdk.server.local.protobuf.CustomDataValue.class, com.devcycle.sdk.server.local.protobuf.CustomDataValue.Builder.class);
}
// Construct using com.devcycle.sdk.server.local.protobuf.CustomDataValue.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
type_ = 0;
boolValue_ = false;
doubleValue_ = 0D;
stringValue_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.devcycle.sdk.server.local.protobuf.VariableForUserParams.internal_static_CustomDataValue_descriptor;
}
@java.lang.Override
public com.devcycle.sdk.server.local.protobuf.CustomDataValue getDefaultInstanceForType() {
return com.devcycle.sdk.server.local.protobuf.CustomDataValue.getDefaultInstance();
}
@java.lang.Override
public com.devcycle.sdk.server.local.protobuf.CustomDataValue build() {
com.devcycle.sdk.server.local.protobuf.CustomDataValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.devcycle.sdk.server.local.protobuf.CustomDataValue buildPartial() {
com.devcycle.sdk.server.local.protobuf.CustomDataValue result = new com.devcycle.sdk.server.local.protobuf.CustomDataValue(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.devcycle.sdk.server.local.protobuf.CustomDataValue result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.boolValue_ = boolValue_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.doubleValue_ = doubleValue_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.stringValue_ = stringValue_;
}
}
@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 com.devcycle.sdk.server.local.protobuf.CustomDataValue) {
return mergeFrom((com.devcycle.sdk.server.local.protobuf.CustomDataValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.devcycle.sdk.server.local.protobuf.CustomDataValue other) {
if (other == com.devcycle.sdk.server.local.protobuf.CustomDataValue.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.getBoolValue() != false) {
setBoolValue(other.getBoolValue());
}
if (other.getDoubleValue() != 0D) {
setDoubleValue(other.getDoubleValue());
}
if (!other.getStringValue().isEmpty()) {
stringValue_ = other.stringValue_;
bitField0_ |= 0x00000008;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
type_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
boolValue_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 25: {
doubleValue_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 34: {
stringValue_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int type_ = 0;
/**
* .CustomDataType type = 1;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .CustomDataType type = 1;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .CustomDataType type = 1;
* @return The type.
*/
@java.lang.Override
public com.devcycle.sdk.server.local.protobuf.CustomDataType getType() {
com.devcycle.sdk.server.local.protobuf.CustomDataType result = com.devcycle.sdk.server.local.protobuf.CustomDataType.forNumber(type_);
return result == null ? com.devcycle.sdk.server.local.protobuf.CustomDataType.UNRECOGNIZED : result;
}
/**
* .CustomDataType type = 1;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.devcycle.sdk.server.local.protobuf.CustomDataType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .CustomDataType type = 1;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 0;
onChanged();
return this;
}
private boolean boolValue_ ;
/**
* bool boolValue = 2;
* @return The boolValue.
*/
@java.lang.Override
public boolean getBoolValue() {
return boolValue_;
}
/**
* bool boolValue = 2;
* @param value The boolValue to set.
* @return This builder for chaining.
*/
public Builder setBoolValue(boolean value) {
boolValue_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* bool boolValue = 2;
* @return This builder for chaining.
*/
public Builder clearBoolValue() {
bitField0_ = (bitField0_ & ~0x00000002);
boolValue_ = false;
onChanged();
return this;
}
private double doubleValue_ ;
/**
* double doubleValue = 3;
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
return doubleValue_;
}
/**
* double doubleValue = 3;
* @param value The doubleValue to set.
* @return This builder for chaining.
*/
public Builder setDoubleValue(double value) {
doubleValue_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* double doubleValue = 3;
* @return This builder for chaining.
*/
public Builder clearDoubleValue() {
bitField0_ = (bitField0_ & ~0x00000004);
doubleValue_ = 0D;
onChanged();
return this;
}
private java.lang.Object stringValue_ = "";
/**
* string stringValue = 4;
* @return The stringValue.
*/
public java.lang.String getStringValue() {
java.lang.Object ref = stringValue_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
stringValue_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string stringValue = 4;
* @return The bytes for stringValue.
*/
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = stringValue_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stringValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string stringValue = 4;
* @param value The stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
stringValue_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* string stringValue = 4;
* @return This builder for chaining.
*/
public Builder clearStringValue() {
stringValue_ = getDefaultInstance().getStringValue();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* string stringValue = 4;
* @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);
stringValue_ = value;
bitField0_ |= 0x00000008;
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:CustomDataValue)
}
// @@protoc_insertion_point(class_scope:CustomDataValue)
private static final com.devcycle.sdk.server.local.protobuf.CustomDataValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.devcycle.sdk.server.local.protobuf.CustomDataValue();
}
public static com.devcycle.sdk.server.local.protobuf.CustomDataValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CustomDataValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.devcycle.sdk.server.local.protobuf.CustomDataValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}