
io.bloombox.schema.services.ledger.v1beta1.TransactionStatus Maven / Gradle / Ivy
/*
* Copyright 2018, Momentum Ideas, Co. All rights reserved.
*
* Source and object computer code contained herein is the private intellectual
* property of Momentum Ideas Co., a Delaware Corporation. Use of this
* code in source form requires permission in writing before use or the
* assembly, distribution, or publishing of derivative works, for commercial
* purposes or any other purpose, from a duly authorized officer of Momentum
* Ideas Co.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ledger/v1beta1/LedgerService_Beta1.proto
package io.bloombox.schema.services.ledger.v1beta1;
/**
*
* Specifies the states a transaction may be in, before, during, and after execution. Transaction lifecycle begins with
* the INFLIGHT status, when the transaction has just been constructed, or has not yet been submitted to the ledger.
* Once submission has occurred, the transaction enters either the UNCOMMITTED, or REJECTED phase. Finally, once
* consensus is achieved and the transaction commits to the ledger, the transaction enters FINALIZED phase.
*
*
* Protobuf enum {@code bloombox.services.ledger.v1beta1.TransactionStatus}
*/
public enum TransactionStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* INFLIGHT transactions are operations that have not yet been submitted to the ledger. That is, they are "off-chain"
* operations that have yet to be committed.
*
*
* INFLIGHT = 0;
*/
INFLIGHT(0),
/**
*
* SENT transactions are operations that have been transmitted to the ledger, but for which we have not yet received a
* response or signal indicating backlog queueing.
*
*
* SENT = 1;
*/
SENT(1),
/**
*
* UNCOMMITTED transactions are operations that have been submitted to the ledger, but for which we do not yet have
* consensus. Uncommitted transactions are still working to achieve consensus.
*
*
* UNCOMITTED = 2;
*/
UNCOMITTED(2),
/**
*
* REJECTED transactions are operations that have encountered errors, were found to be invalid (due to structural or
* cryptographic failures), or have been found to be in conflict with other transactions at the time of their final
* execution by the underlying ledger.
*
*
* REJECTED = 3;
*/
REJECTED(3),
/**
*
* FINALIZED transactions are operations that have achieved quorum and consensus, and been committed to a ledger that
* is now considered "closed." That is to say, they are completed transactions.
*
*
* FINALIZED = 4;
*/
FINALIZED(4),
UNRECOGNIZED(-1),
;
/**
*
* INFLIGHT transactions are operations that have not yet been submitted to the ledger. That is, they are "off-chain"
* operations that have yet to be committed.
*
*
* INFLIGHT = 0;
*/
public static final int INFLIGHT_VALUE = 0;
/**
*
* SENT transactions are operations that have been transmitted to the ledger, but for which we have not yet received a
* response or signal indicating backlog queueing.
*
*
* SENT = 1;
*/
public static final int SENT_VALUE = 1;
/**
*
* UNCOMMITTED transactions are operations that have been submitted to the ledger, but for which we do not yet have
* consensus. Uncommitted transactions are still working to achieve consensus.
*
*
* UNCOMITTED = 2;
*/
public static final int UNCOMITTED_VALUE = 2;
/**
*
* REJECTED transactions are operations that have encountered errors, were found to be invalid (due to structural or
* cryptographic failures), or have been found to be in conflict with other transactions at the time of their final
* execution by the underlying ledger.
*
*
* REJECTED = 3;
*/
public static final int REJECTED_VALUE = 3;
/**
*
* FINALIZED transactions are operations that have achieved quorum and consensus, and been committed to a ledger that
* is now considered "closed." That is to say, they are completed transactions.
*
*
* FINALIZED = 4;
*/
public static final int FINALIZED_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TransactionStatus valueOf(int value) {
return forNumber(value);
}
public static TransactionStatus forNumber(int value) {
switch (value) {
case 0: return INFLIGHT;
case 1: return SENT;
case 2: return UNCOMITTED;
case 3: return REJECTED;
case 4: return FINALIZED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TransactionStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TransactionStatus findValueByNumber(int number) {
return TransactionStatus.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.bloombox.schema.services.ledger.v1beta1.LedgerServiceBeta1.getDescriptor().getEnumTypes().get(1);
}
private static final TransactionStatus[] VALUES = values();
public static TransactionStatus valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TransactionStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:bloombox.services.ledger.v1beta1.TransactionStatus)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy