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.
* Coin defines a token with a denomination and an amount.
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
*
*
* Protobuf type {@code cosmos.base.v1beta1.Coin}
*/
public static final class Coin extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:cosmos.base.v1beta1.Coin)
CoinOrBuilder {
private static final long serialVersionUID = 0L;
// Use Coin.newBuilder() to construct.
private Coin(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Coin() {
denom_ = "";
amount_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Coin(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
denom_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
amount_ = s;
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.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 cosmos.base.v1beta1.CoinOuterClass.internal_static_cosmos_base_v1beta1_Coin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cosmos.base.v1beta1.CoinOuterClass.internal_static_cosmos_base_v1beta1_Coin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cosmos.base.v1beta1.CoinOuterClass.Coin.class, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder.class);
}
public static final int DENOM_FIELD_NUMBER = 1;
private volatile java.lang.Object denom_;
/**
* string denom = 1;
*/
public java.lang.String getDenom() {
java.lang.Object ref = denom_;
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();
denom_ = s;
return s;
}
}
/**
* string denom = 1;
*/
public com.google.protobuf.ByteString
getDenomBytes() {
java.lang.Object ref = denom_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
denom_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AMOUNT_FIELD_NUMBER = 2;
private volatile java.lang.Object amount_;
/**
* string amount = 2 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "Int"];
*/
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
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();
amount_ = s;
return s;
}
}
/**
* string amount = 2 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "Int"];
*/
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = 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 (!getDenomBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, denom_);
}
if (!getAmountBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, amount_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDenomBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, denom_);
}
if (!getAmountBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, amount_);
}
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 cosmos.base.v1beta1.CoinOuterClass.Coin)) {
return super.equals(obj);
}
cosmos.base.v1beta1.CoinOuterClass.Coin other = (cosmos.base.v1beta1.CoinOuterClass.Coin) obj;
boolean result = true;
result = result && getDenom()
.equals(other.getDenom());
result = result && getAmount()
.equals(other.getAmount());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DENOM_FIELD_NUMBER;
hash = (53 * hash) + getDenom().hashCode();
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin 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 cosmos.base.v1beta1.CoinOuterClass.Coin parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin 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 cosmos.base.v1beta1.CoinOuterClass.Coin parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cosmos.base.v1beta1.CoinOuterClass.Coin 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(cosmos.base.v1beta1.CoinOuterClass.Coin 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;
}
/**
*
* Coin defines a token with a denomination and an amount.
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
*
* DecCoin defines a token with a denomination and a decimal amount.
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
*
*
* Protobuf type {@code cosmos.base.v1beta1.DecCoin}
*/
public static final class DecCoin extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:cosmos.base.v1beta1.DecCoin)
DecCoinOrBuilder {
private static final long serialVersionUID = 0L;
// Use DecCoin.newBuilder() to construct.
private DecCoin(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DecCoin() {
denom_ = "";
amount_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DecCoin(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
denom_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
amount_ = s;
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.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 cosmos.base.v1beta1.CoinOuterClass.internal_static_cosmos_base_v1beta1_DecCoin_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return cosmos.base.v1beta1.CoinOuterClass.internal_static_cosmos_base_v1beta1_DecCoin_fieldAccessorTable
.ensureFieldAccessorsInitialized(
cosmos.base.v1beta1.CoinOuterClass.DecCoin.class, cosmos.base.v1beta1.CoinOuterClass.DecCoin.Builder.class);
}
public static final int DENOM_FIELD_NUMBER = 1;
private volatile java.lang.Object denom_;
/**
* string denom = 1;
*/
public java.lang.String getDenom() {
java.lang.Object ref = denom_;
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();
denom_ = s;
return s;
}
}
/**
* string denom = 1;
*/
public com.google.protobuf.ByteString
getDenomBytes() {
java.lang.Object ref = denom_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
denom_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AMOUNT_FIELD_NUMBER = 2;
private volatile java.lang.Object amount_;
/**
* string amount = 2 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "Dec"];
*/
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
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();
amount_ = s;
return s;
}
}
/**
* string amount = 2 [(.gogoproto.nullable) = false, (.gogoproto.customtype) = "Dec"];
*/
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = 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 (!getDenomBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, denom_);
}
if (!getAmountBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, amount_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDenomBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, denom_);
}
if (!getAmountBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, amount_);
}
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 cosmos.base.v1beta1.CoinOuterClass.DecCoin)) {
return super.equals(obj);
}
cosmos.base.v1beta1.CoinOuterClass.DecCoin other = (cosmos.base.v1beta1.CoinOuterClass.DecCoin) obj;
boolean result = true;
result = result && getDenom()
.equals(other.getDenom());
result = result && getAmount()
.equals(other.getAmount());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DENOM_FIELD_NUMBER;
hash = (53 * hash) + getDenom().hashCode();
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin 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 cosmos.base.v1beta1.CoinOuterClass.DecCoin parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin 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 cosmos.base.v1beta1.CoinOuterClass.DecCoin parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static cosmos.base.v1beta1.CoinOuterClass.DecCoin 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(cosmos.base.v1beta1.CoinOuterClass.DecCoin 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;
}
/**
*
* DecCoin defines a token with a denomination and a decimal amount.
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
*