games.mythical.saga.sdk.proto.common.MetadataAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of saga-sdk-proto Show documentation
Show all versions of saga-sdk-proto Show documentation
Saga SDK for Java game servers
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: common/common.proto
package games.mythical.saga.sdk.proto.common;
/**
* Protobuf type {@code saga.common.MetadataAttribute}
*/
public final class MetadataAttribute extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:saga.common.MetadataAttribute)
MetadataAttributeOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetadataAttribute.newBuilder() to construct.
private MetadataAttribute(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetadataAttribute() {
traitType_ = "";
displayType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MetadataAttribute();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return games.mythical.saga.sdk.proto.common.Common.internal_static_saga_common_MetadataAttribute_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return games.mythical.saga.sdk.proto.common.Common.internal_static_saga_common_MetadataAttribute_fieldAccessorTable
.ensureFieldAccessorsInitialized(
games.mythical.saga.sdk.proto.common.MetadataAttribute.class, games.mythical.saga.sdk.proto.common.MetadataAttribute.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 {
STR_VALUE(4),
INT_VALUE(5),
DOUBLE_VALUE(6),
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 4: return STR_VALUE;
case 5: return INT_VALUE;
case 6: return DOUBLE_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 TRAIT_TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object traitType_;
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @return The traitType.
*/
@java.lang.Override
public java.lang.String getTraitType() {
java.lang.Object ref = traitType_;
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();
traitType_ = s;
return s;
}
}
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @return The bytes for traitType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTraitTypeBytes() {
java.lang.Object ref = traitType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
traitType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_TYPE_FIELD_NUMBER = 2;
private volatile java.lang.Object displayType_;
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @return The displayType.
*/
@java.lang.Override
public java.lang.String getDisplayType() {
java.lang.Object ref = displayType_;
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();
displayType_ = s;
return s;
}
}
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @return The bytes for displayType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDisplayTypeBytes() {
java.lang.Object ref = displayType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAX_VALUE_FIELD_NUMBER = 3;
private com.google.protobuf.DoubleValue maxValue_;
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
* @return Whether the maxValue field is set.
*/
@java.lang.Override
public boolean hasMaxValue() {
return maxValue_ != null;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
* @return The maxValue.
*/
@java.lang.Override
public com.google.protobuf.DoubleValue getMaxValue() {
return maxValue_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : maxValue_;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
@java.lang.Override
public com.google.protobuf.DoubleValueOrBuilder getMaxValueOrBuilder() {
return getMaxValue();
}
public static final int STR_VALUE_FIELD_NUMBER = 4;
/**
* string str_value = 4;
* @return Whether the strValue field is set.
*/
public boolean hasStrValue() {
return valueCase_ == 4;
}
/**
* string str_value = 4;
* @return The strValue.
*/
public java.lang.String getStrValue() {
java.lang.Object ref = "";
if (valueCase_ == 4) {
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_ == 4) {
value_ = s;
}
return s;
}
}
/**
* string str_value = 4;
* @return The bytes for strValue.
*/
public com.google.protobuf.ByteString
getStrValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 4) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 4) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INT_VALUE_FIELD_NUMBER = 5;
/**
* int64 int_value = 5;
* @return Whether the intValue field is set.
*/
@java.lang.Override
public boolean hasIntValue() {
return valueCase_ == 5;
}
/**
* int64 int_value = 5;
* @return The intValue.
*/
@java.lang.Override
public long getIntValue() {
if (valueCase_ == 5) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int DOUBLE_VALUE_FIELD_NUMBER = 6;
/**
* double double_value = 6;
* @return Whether the doubleValue field is set.
*/
@java.lang.Override
public boolean hasDoubleValue() {
return valueCase_ == 6;
}
/**
* double double_value = 6;
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
if (valueCase_ == 6) {
return (java.lang.Double) value_;
}
return 0D;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traitType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, traitType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayType_);
}
if (maxValue_ != null) {
output.writeMessage(3, getMaxValue());
}
if (valueCase_ == 4) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, value_);
}
if (valueCase_ == 5) {
output.writeInt64(
5, (long)((java.lang.Long) value_));
}
if (valueCase_ == 6) {
output.writeDouble(
6, (double)((java.lang.Double) value_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traitType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, traitType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayType_);
}
if (maxValue_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMaxValue());
}
if (valueCase_ == 4) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, value_);
}
if (valueCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
5, (long)((java.lang.Long) value_));
}
if (valueCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
6, (double)((java.lang.Double) value_));
}
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 games.mythical.saga.sdk.proto.common.MetadataAttribute)) {
return super.equals(obj);
}
games.mythical.saga.sdk.proto.common.MetadataAttribute other = (games.mythical.saga.sdk.proto.common.MetadataAttribute) obj;
if (!getTraitType()
.equals(other.getTraitType())) return false;
if (!getDisplayType()
.equals(other.getDisplayType())) return false;
if (hasMaxValue() != other.hasMaxValue()) return false;
if (hasMaxValue()) {
if (!getMaxValue()
.equals(other.getMaxValue())) return false;
}
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 4:
if (!getStrValue()
.equals(other.getStrValue())) return false;
break;
case 5:
if (getIntValue()
!= other.getIntValue()) return false;
break;
case 6:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
break;
case 0:
default:
}
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) + TRAIT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getTraitType().hashCode();
hash = (37 * hash) + DISPLAY_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getDisplayType().hashCode();
if (hasMaxValue()) {
hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getMaxValue().hashCode();
}
switch (valueCase_) {
case 4:
hash = (37 * hash) + STR_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStrValue().hashCode();
break;
case 5:
hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIntValue());
break;
case 6:
hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute 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 games.mythical.saga.sdk.proto.common.MetadataAttribute parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute 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 games.mythical.saga.sdk.proto.common.MetadataAttribute parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute 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(games.mythical.saga.sdk.proto.common.MetadataAttribute 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 saga.common.MetadataAttribute}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:saga.common.MetadataAttribute)
games.mythical.saga.sdk.proto.common.MetadataAttributeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return games.mythical.saga.sdk.proto.common.Common.internal_static_saga_common_MetadataAttribute_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return games.mythical.saga.sdk.proto.common.Common.internal_static_saga_common_MetadataAttribute_fieldAccessorTable
.ensureFieldAccessorsInitialized(
games.mythical.saga.sdk.proto.common.MetadataAttribute.class, games.mythical.saga.sdk.proto.common.MetadataAttribute.Builder.class);
}
// Construct using games.mythical.saga.sdk.proto.common.MetadataAttribute.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
traitType_ = "";
displayType_ = "";
if (maxValueBuilder_ == null) {
maxValue_ = null;
} else {
maxValue_ = null;
maxValueBuilder_ = null;
}
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return games.mythical.saga.sdk.proto.common.Common.internal_static_saga_common_MetadataAttribute_descriptor;
}
@java.lang.Override
public games.mythical.saga.sdk.proto.common.MetadataAttribute getDefaultInstanceForType() {
return games.mythical.saga.sdk.proto.common.MetadataAttribute.getDefaultInstance();
}
@java.lang.Override
public games.mythical.saga.sdk.proto.common.MetadataAttribute build() {
games.mythical.saga.sdk.proto.common.MetadataAttribute result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public games.mythical.saga.sdk.proto.common.MetadataAttribute buildPartial() {
games.mythical.saga.sdk.proto.common.MetadataAttribute result = new games.mythical.saga.sdk.proto.common.MetadataAttribute(this);
result.traitType_ = traitType_;
result.displayType_ = displayType_;
if (maxValueBuilder_ == null) {
result.maxValue_ = maxValue_;
} else {
result.maxValue_ = maxValueBuilder_.build();
}
if (valueCase_ == 4) {
result.value_ = value_;
}
if (valueCase_ == 5) {
result.value_ = value_;
}
if (valueCase_ == 6) {
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 games.mythical.saga.sdk.proto.common.MetadataAttribute) {
return mergeFrom((games.mythical.saga.sdk.proto.common.MetadataAttribute)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(games.mythical.saga.sdk.proto.common.MetadataAttribute other) {
if (other == games.mythical.saga.sdk.proto.common.MetadataAttribute.getDefaultInstance()) return this;
if (!other.getTraitType().isEmpty()) {
traitType_ = other.traitType_;
onChanged();
}
if (!other.getDisplayType().isEmpty()) {
displayType_ = other.displayType_;
onChanged();
}
if (other.hasMaxValue()) {
mergeMaxValue(other.getMaxValue());
}
switch (other.getValueCase()) {
case STR_VALUE: {
valueCase_ = 4;
value_ = other.value_;
onChanged();
break;
}
case INT_VALUE: {
setIntValue(other.getIntValue());
break;
}
case DOUBLE_VALUE: {
setDoubleValue(other.getDoubleValue());
break;
}
case VALUE_NOT_SET: {
break;
}
}
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 10: {
traitType_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
displayType_ = input.readStringRequireUtf8();
break;
} // case 18
case 26: {
input.readMessage(
getMaxValueFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
java.lang.String s = input.readStringRequireUtf8();
valueCase_ = 4;
value_ = s;
break;
} // case 34
case 40: {
value_ = input.readInt64();
valueCase_ = 5;
break;
} // case 40
case 49: {
value_ = input.readDouble();
valueCase_ = 6;
break;
} // case 49
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 valueCase_ = 0;
private java.lang.Object value_;
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
private java.lang.Object traitType_ = "";
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @return The traitType.
*/
public java.lang.String getTraitType() {
java.lang.Object ref = traitType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
traitType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @return The bytes for traitType.
*/
public com.google.protobuf.ByteString
getTraitTypeBytes() {
java.lang.Object ref = traitType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
traitType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @param value The traitType to set.
* @return This builder for chaining.
*/
public Builder setTraitType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
traitType_ = value;
onChanged();
return this;
}
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @return This builder for chaining.
*/
public Builder clearTraitType() {
traitType_ = getDefaultInstance().getTraitType();
onChanged();
return this;
}
/**
*
* Name of the trait/attribute
*
*
* string trait_type = 1;
* @param value The bytes for traitType to set.
* @return This builder for chaining.
*/
public Builder setTraitTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
traitType_ = value;
onChanged();
return this;
}
private java.lang.Object displayType_ = "";
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @return The displayType.
*/
public java.lang.String getDisplayType() {
java.lang.Object ref = displayType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @return The bytes for displayType.
*/
public com.google.protobuf.ByteString
getDisplayTypeBytes() {
java.lang.Object ref = displayType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @param value The displayType to set.
* @return This builder for chaining.
*/
public Builder setDisplayType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayType_ = value;
onChanged();
return this;
}
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @return This builder for chaining.
*/
public Builder clearDisplayType() {
displayType_ = getDefaultInstance().getDisplayType();
onChanged();
return this;
}
/**
*
* Display type (number, date, etc.). Not needed for string traits
*
*
* string display_type = 2;
* @param value The bytes for displayType to set.
* @return This builder for chaining.
*/
public Builder setDisplayTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayType_ = value;
onChanged();
return this;
}
private com.google.protobuf.DoubleValue maxValue_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> maxValueBuilder_;
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
* @return Whether the maxValue field is set.
*/
public boolean hasMaxValue() {
return maxValueBuilder_ != null || maxValue_ != null;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
* @return The maxValue.
*/
public com.google.protobuf.DoubleValue getMaxValue() {
if (maxValueBuilder_ == null) {
return maxValue_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : maxValue_;
} else {
return maxValueBuilder_.getMessage();
}
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
public Builder setMaxValue(com.google.protobuf.DoubleValue value) {
if (maxValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxValue_ = value;
onChanged();
} else {
maxValueBuilder_.setMessage(value);
}
return this;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
public Builder setMaxValue(
com.google.protobuf.DoubleValue.Builder builderForValue) {
if (maxValueBuilder_ == null) {
maxValue_ = builderForValue.build();
onChanged();
} else {
maxValueBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
public Builder mergeMaxValue(com.google.protobuf.DoubleValue value) {
if (maxValueBuilder_ == null) {
if (maxValue_ != null) {
maxValue_ =
com.google.protobuf.DoubleValue.newBuilder(maxValue_).mergeFrom(value).buildPartial();
} else {
maxValue_ = value;
}
onChanged();
} else {
maxValueBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
public Builder clearMaxValue() {
if (maxValueBuilder_ == null) {
maxValue_ = null;
onChanged();
} else {
maxValue_ = null;
maxValueBuilder_ = null;
}
return this;
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
public com.google.protobuf.DoubleValue.Builder getMaxValueBuilder() {
onChanged();
return getMaxValueFieldBuilder().getBuilder();
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
public com.google.protobuf.DoubleValueOrBuilder getMaxValueOrBuilder() {
if (maxValueBuilder_ != null) {
return maxValueBuilder_.getMessageOrBuilder();
} else {
return maxValue_ == null ?
com.google.protobuf.DoubleValue.getDefaultInstance() : maxValue_;
}
}
/**
*
* For numeric traits, a maximum allowed value
*
*
* .google.protobuf.DoubleValue max_value = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>
getMaxValueFieldBuilder() {
if (maxValueBuilder_ == null) {
maxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
getMaxValue(),
getParentForChildren(),
isClean());
maxValue_ = null;
}
return maxValueBuilder_;
}
/**
* string str_value = 4;
* @return Whether the strValue field is set.
*/
@java.lang.Override
public boolean hasStrValue() {
return valueCase_ == 4;
}
/**
* string str_value = 4;
* @return The strValue.
*/
@java.lang.Override
public java.lang.String getStrValue() {
java.lang.Object ref = "";
if (valueCase_ == 4) {
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_ == 4) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string str_value = 4;
* @return The bytes for strValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStrValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 4) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 4) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string str_value = 4;
* @param value The strValue to set.
* @return This builder for chaining.
*/
public Builder setStrValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 4;
value_ = value;
onChanged();
return this;
}
/**
* string str_value = 4;
* @return This builder for chaining.
*/
public Builder clearStrValue() {
if (valueCase_ == 4) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* string str_value = 4;
* @param value The bytes for strValue to set.
* @return This builder for chaining.
*/
public Builder setStrValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 4;
value_ = value;
onChanged();
return this;
}
/**
* int64 int_value = 5;
* @return Whether the intValue field is set.
*/
public boolean hasIntValue() {
return valueCase_ == 5;
}
/**
* int64 int_value = 5;
* @return The intValue.
*/
public long getIntValue() {
if (valueCase_ == 5) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
* int64 int_value = 5;
* @param value The intValue to set.
* @return This builder for chaining.
*/
public Builder setIntValue(long value) {
valueCase_ = 5;
value_ = value;
onChanged();
return this;
}
/**
* int64 int_value = 5;
* @return This builder for chaining.
*/
public Builder clearIntValue() {
if (valueCase_ == 5) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* double double_value = 6;
* @return Whether the doubleValue field is set.
*/
public boolean hasDoubleValue() {
return valueCase_ == 6;
}
/**
* double double_value = 6;
* @return The doubleValue.
*/
public double getDoubleValue() {
if (valueCase_ == 6) {
return (java.lang.Double) value_;
}
return 0D;
}
/**
* double double_value = 6;
* @param value The doubleValue to set.
* @return This builder for chaining.
*/
public Builder setDoubleValue(double value) {
valueCase_ = 6;
value_ = value;
onChanged();
return this;
}
/**
* double double_value = 6;
* @return This builder for chaining.
*/
public Builder clearDoubleValue() {
if (valueCase_ == 6) {
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:saga.common.MetadataAttribute)
}
// @@protoc_insertion_point(class_scope:saga.common.MetadataAttribute)
private static final games.mythical.saga.sdk.proto.common.MetadataAttribute DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new games.mythical.saga.sdk.proto.common.MetadataAttribute();
}
public static games.mythical.saga.sdk.proto.common.MetadataAttribute getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MetadataAttribute 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 games.mythical.saga.sdk.proto.common.MetadataAttribute getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}