com.hedera.hashgraph.sdk.proto.ExchangeRate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-jdk7 Show documentation
Show all versions of sdk-jdk7 Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: exchange_rate.proto
package com.hedera.hashgraph.sdk.proto;
/**
*
**
* An exchange rate between hbar and cents (USD) and the time at which the exchange rate will
* expire, and be superseded by a new exchange rate.
*
*
* Protobuf type {@code proto.ExchangeRate}
*/
public final class ExchangeRate extends
com.google.protobuf.GeneratedMessageLite<
ExchangeRate, ExchangeRate.Builder> implements
// @@protoc_insertion_point(message_implements:proto.ExchangeRate)
ExchangeRateOrBuilder {
private ExchangeRate() {
}
public static final int HBAREQUIV_FIELD_NUMBER = 1;
private int hbarEquiv_;
/**
*
**
* Denominator in calculation of exchange rate between hbar and cents
*
*
* int32 hbarEquiv = 1;
* @return The hbarEquiv.
*/
@java.lang.Override
public int getHbarEquiv() {
return hbarEquiv_;
}
/**
*
**
* Denominator in calculation of exchange rate between hbar and cents
*
*
* int32 hbarEquiv = 1;
* @param value The hbarEquiv to set.
*/
private void setHbarEquiv(int value) {
hbarEquiv_ = value;
}
/**
*
**
* Denominator in calculation of exchange rate between hbar and cents
*
*
* int32 hbarEquiv = 1;
*/
private void clearHbarEquiv() {
hbarEquiv_ = 0;
}
public static final int CENTEQUIV_FIELD_NUMBER = 2;
private int centEquiv_;
/**
*
**
* Numerator in calculation of exchange rate between hbar and cents
*
*
* int32 centEquiv = 2;
* @return The centEquiv.
*/
@java.lang.Override
public int getCentEquiv() {
return centEquiv_;
}
/**
*
**
* Numerator in calculation of exchange rate between hbar and cents
*
*
* int32 centEquiv = 2;
* @param value The centEquiv to set.
*/
private void setCentEquiv(int value) {
centEquiv_ = value;
}
/**
*
**
* Numerator in calculation of exchange rate between hbar and cents
*
*
* int32 centEquiv = 2;
*/
private void clearCentEquiv() {
centEquiv_ = 0;
}
public static final int EXPIRATIONTIME_FIELD_NUMBER = 3;
private com.hedera.hashgraph.sdk.proto.TimestampSeconds expirationTime_;
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
@java.lang.Override
public boolean hasExpirationTime() {
return expirationTime_ != null;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampSeconds getExpirationTime() {
return expirationTime_ == null ? com.hedera.hashgraph.sdk.proto.TimestampSeconds.getDefaultInstance() : expirationTime_;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
private void setExpirationTime(com.hedera.hashgraph.sdk.proto.TimestampSeconds value) {
value.getClass();
expirationTime_ = value;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeExpirationTime(com.hedera.hashgraph.sdk.proto.TimestampSeconds value) {
value.getClass();
if (expirationTime_ != null &&
expirationTime_ != com.hedera.hashgraph.sdk.proto.TimestampSeconds.getDefaultInstance()) {
expirationTime_ =
com.hedera.hashgraph.sdk.proto.TimestampSeconds.newBuilder(expirationTime_).mergeFrom(value).buildPartial();
} else {
expirationTime_ = value;
}
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
private void clearExpirationTime() { expirationTime_ = null;
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.ExchangeRate prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
**
* An exchange rate between hbar and cents (USD) and the time at which the exchange rate will
* expire, and be superseded by a new exchange rate.
*
*
* Protobuf type {@code proto.ExchangeRate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.hedera.hashgraph.sdk.proto.ExchangeRate, Builder> implements
// @@protoc_insertion_point(builder_implements:proto.ExchangeRate)
com.hedera.hashgraph.sdk.proto.ExchangeRateOrBuilder {
// Construct using com.hedera.hashgraph.sdk.proto.ExchangeRate.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
**
* Denominator in calculation of exchange rate between hbar and cents
*
*
* int32 hbarEquiv = 1;
* @return The hbarEquiv.
*/
@java.lang.Override
public int getHbarEquiv() {
return instance.getHbarEquiv();
}
/**
*
**
* Denominator in calculation of exchange rate between hbar and cents
*
*
* int32 hbarEquiv = 1;
* @param value The hbarEquiv to set.
* @return This builder for chaining.
*/
public Builder setHbarEquiv(int value) {
copyOnWrite();
instance.setHbarEquiv(value);
return this;
}
/**
*
**
* Denominator in calculation of exchange rate between hbar and cents
*
*
* int32 hbarEquiv = 1;
* @return This builder for chaining.
*/
public Builder clearHbarEquiv() {
copyOnWrite();
instance.clearHbarEquiv();
return this;
}
/**
*
**
* Numerator in calculation of exchange rate between hbar and cents
*
*
* int32 centEquiv = 2;
* @return The centEquiv.
*/
@java.lang.Override
public int getCentEquiv() {
return instance.getCentEquiv();
}
/**
*
**
* Numerator in calculation of exchange rate between hbar and cents
*
*
* int32 centEquiv = 2;
* @param value The centEquiv to set.
* @return This builder for chaining.
*/
public Builder setCentEquiv(int value) {
copyOnWrite();
instance.setCentEquiv(value);
return this;
}
/**
*
**
* Numerator in calculation of exchange rate between hbar and cents
*
*
* int32 centEquiv = 2;
* @return This builder for chaining.
*/
public Builder clearCentEquiv() {
copyOnWrite();
instance.clearCentEquiv();
return this;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
@java.lang.Override
public boolean hasExpirationTime() {
return instance.hasExpirationTime();
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.TimestampSeconds getExpirationTime() {
return instance.getExpirationTime();
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
public Builder setExpirationTime(com.hedera.hashgraph.sdk.proto.TimestampSeconds value) {
copyOnWrite();
instance.setExpirationTime(value);
return this;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
public Builder setExpirationTime(
com.hedera.hashgraph.sdk.proto.TimestampSeconds.Builder builderForValue) {
copyOnWrite();
instance.setExpirationTime(builderForValue.build());
return this;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
public Builder mergeExpirationTime(com.hedera.hashgraph.sdk.proto.TimestampSeconds value) {
copyOnWrite();
instance.mergeExpirationTime(value);
return this;
}
/**
*
**
* Expiration time in seconds for this exchange rate
*
*
* .proto.TimestampSeconds expirationTime = 3;
*/
public Builder clearExpirationTime() { copyOnWrite();
instance.clearExpirationTime();
return this;
}
// @@protoc_insertion_point(builder_scope:proto.ExchangeRate)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.hedera.hashgraph.sdk.proto.ExchangeRate();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"hbarEquiv_",
"centEquiv_",
"expirationTime_",
};
java.lang.String info =
"\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0004\u0002\u0004" +
"\u0003\t";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.hedera.hashgraph.sdk.proto.ExchangeRate.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:proto.ExchangeRate)
private static final com.hedera.hashgraph.sdk.proto.ExchangeRate DEFAULT_INSTANCE;
static {
ExchangeRate defaultInstance = new ExchangeRate();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ExchangeRate.class, defaultInstance);
}
public static com.hedera.hashgraph.sdk.proto.ExchangeRate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy