diff --git a/app/build.gradle b/app/build.gradle index 4e81272cfe..c30dedd2c2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -138,7 +138,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8' //dependencies for binance - implementation 'com.google.protobuf:protobuf-java:3.6.1' + implementation 'com.google.protobuf:protobuf-java:3.11.4' implementation 'io.grpc:grpc-protobuf:1.17.1' implementation 'io.grpc:grpc-stub:1.17.1' implementation 'commons-codec:commons-codec:1.10' @@ -154,4 +154,8 @@ dependencies { implementation 'io.fotoapparat:fotoapparat:2.6.1' implementation 'com.otaliastudios:cameraview:2.6.1' + + //dependencies for flow demo + implementation 'io.grpc:grpc-okhttp:1.28.0' + implementation 'io.grpc:grpc-stub:1.28.0' } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/data/Blockchain.java b/app/src/main/java/com/tangem/data/Blockchain.java index cab6f02b80..c9747e62f8 100644 --- a/app/src/main/java/com/tangem/data/Blockchain.java +++ b/app/src/main/java/com/tangem/data/Blockchain.java @@ -31,7 +31,8 @@ public enum Blockchain { StellarTag("XLM-Tag", "XLM", 1000000.0, R.drawable.ic_logo_stellar, "Stellar"), Eos("EOS", "EOS", 10000.0, R.drawable.tangem2, "EOS"), Ducatus("DUC", "DUC", 100000000.0, R.drawable.tangem2, "Ducatus"), - Tezos("TEZOS", "XTZ", 10000000.0, R.drawable.ic_logo_tezos, "Tezos"); + Tezos("TEZOS", "XTZ", 10000000.0, R.drawable.ic_logo_tezos, "Tezos"), + FlowDemo("FLOW/demo", "", 1.0, R.drawable.tangem2, "Flow demo"); Blockchain(String ID, String currency, double multiplier, int imageResource, String officialName) { mID = ID; diff --git a/app/src/main/java/com/tangem/wallet/CoinEngineFactory.kt b/app/src/main/java/com/tangem/wallet/CoinEngineFactory.kt index 1570ea6621..310f567aea 100644 --- a/app/src/main/java/com/tangem/wallet/CoinEngineFactory.kt +++ b/app/src/main/java/com/tangem/wallet/CoinEngineFactory.kt @@ -12,6 +12,7 @@ import com.tangem.wallet.ducatus.DucatusEngine import com.tangem.wallet.eos.EosEngine import com.tangem.wallet.eth.EthEngine import com.tangem.wallet.ethID.EthIdEngine +import com.tangem.wallet.flowDemo.FlowDemoEngine import com.tangem.wallet.ltc.LtcEngine import com.tangem.wallet.matic.MaticTokenEngine import com.tangem.wallet.nftToken.NftTokenEngine @@ -58,6 +59,7 @@ object CoinEngineFactory { Blockchain.Ducatus -> DucatusEngine() Blockchain.Tezos -> TezosEngine() Blockchain.BitcoinDual -> BtcMultisigEngine() + Blockchain.FlowDemo -> FlowDemoEngine() else -> null } } @@ -105,6 +107,8 @@ object CoinEngineFactory { TezosEngine(context) else if (Blockchain.BitcoinDual == context.blockchain) BtcMultisigEngine(context) + else if (Blockchain.FlowDemo == context.blockchain) + FlowDemoEngine(context) else return null } catch (e: Exception) { diff --git a/app/src/main/java/com/tangem/wallet/flowDemo/FlowDemoData.kt b/app/src/main/java/com/tangem/wallet/flowDemo/FlowDemoData.kt new file mode 100644 index 0000000000..ed4bf96822 --- /dev/null +++ b/app/src/main/java/com/tangem/wallet/flowDemo/FlowDemoData.kt @@ -0,0 +1,29 @@ +package com.tangem.wallet.flowDemo + +import android.os.Bundle +import android.util.Log +import com.tangem.wallet.CoinData +import java.lang.Exception + +class FlowDemoData : CoinData() { + var description: String? = null + + override fun clearInfo() { + super.clearInfo() + description = null + } + + override fun loadFromBundle(B: Bundle) { + super.loadFromBundle(B) + if (B.containsKey("Description")) description = B.getString("Description") + } + + override fun saveToBundle(B: Bundle) { + super.saveToBundle(B) + try { + if (description != null) B.putString("Description", description!!) + } catch (e: Exception) { + Log.e("Can't save to bundle ", e.message) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tangem/wallet/flowDemo/FlowDemoEngine.kt b/app/src/main/java/com/tangem/wallet/flowDemo/FlowDemoEngine.kt new file mode 100644 index 0000000000..87e22d2162 --- /dev/null +++ b/app/src/main/java/com/tangem/wallet/flowDemo/FlowDemoEngine.kt @@ -0,0 +1,250 @@ +package com.tangem.wallet.flowDemo + +import android.net.Uri +import android.text.InputFilter +import com.google.protobuf.ByteString +import com.tangem.tangem_card.reader.CardProtocol.TangemException +import com.tangem.tangem_card.tasks.SignTask +import com.tangem.tangem_card.util.Util +import com.tangem.wallet.* +import com.tangem.wallet.binance.client.domain.Account +import com.tangem.wallet.flowDemo.proto.Observation +import com.tangem.wallet.flowDemo.proto.ObserveServiceGrpc +import io.grpc.ManagedChannelBuilder +import io.reactivex.Observable +import io.reactivex.Single +import io.reactivex.android.schedulers.AndroidSchedulers +import io.reactivex.functions.Function +import io.reactivex.observers.DisposableSingleObserver +import io.reactivex.schedulers.Schedulers +import java.util.concurrent.TimeUnit + +class FlowDemoEngine : CoinEngine { + constructor() + + constructor(context: TangemContext) : super(context) { + if (context.coinData == null) { + coinData = FlowDemoData() + context.coinData = coinData + } else if (context.coinData is FlowDemoData) { + coinData = context.coinData as FlowDemoData + } else { + throw Exception("Invalid type of Blockchain data for XlmEngine") + } + } + + private val TAG = FlowDemoEngine::class.java.simpleName + + var coinData: FlowDemoData? = null + + override fun checkNewTransactionAmount(amount: Amount?): Boolean { + return true + } + + override fun requestBalanceAndUnspentTransactions(blockchainRequestsCallbacks: BlockchainRequestsCallbacks?) { + val channel = ManagedChannelBuilder.forAddress("ec2-3-134-137-165.us-east-2.compute.amazonaws.com", 3569).usePlaintext().build(); + val flowApi = ObserveServiceGrpc.newBlockingStub(channel) + + val script = ByteString.copyFrom( + """import TangemTest from 0x02 + + pub fun main(): String? { + let contract = getAccount(0x02) + let collectionRef = contract.published[&TangemTest.TagCollection] ?? panic("missing reference!") + let desc = collectionRef.tags["%s"]?.desc + return desc + }""".format(coinData!!.wallet).toByteArray() + ) + val scriptRequest = Observation.ExecuteScriptRequest.newBuilder().setScript(script).build() + + val scriptResponseObserver = object : DisposableSingleObserver() { + override fun onSuccess(response: Observation.ExecuteScriptResponse) { + coinData!!.isBalanceReceived = true + val byteResult = response.value.toByteArray() + if (byteResult.size > 8) { + coinData!!.description = String(byteResult.copyOfRange(8, byteResult.size)).toUpperCase() + } + blockchainRequestsCallbacks!!.onComplete(true) + } + + override fun onError(e: Throwable) { + ctx.error = e.message + blockchainRequestsCallbacks!!.onComplete(false) + } + } + + try { + Single.just(Observation.ExecuteScriptResponse.getDefaultInstance()) + .map { flowApi.executeScript(scriptRequest) } + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .timeout(10, TimeUnit.SECONDS) + .subscribe(scriptResponseObserver) + } catch (e: Exception) { + ctx.error = e.message + blockchainRequestsCallbacks!!.onComplete(false) + } + } + + override fun getBalance(): Amount { + return Amount() + } + + override fun isNeedCheckNode(): Boolean { + return false + } + + override fun getAmountInputFilters(): Array { + TODO("Not yet implemented") + } + + override fun getWalletExplorerUri(): Uri { + return Uri.parse("https://www.onflow.org/") + } + + override fun getBalanceHTML(): String { + val balanceString = if(hasBalanceInfo()) { + if(coinData!!.description != null) { + coinData!!.description!! + " TANGEM CARD" + } else { + "UNKNOWN CARD" + } + } else { + "" + } + + if (coinData!!.description == "COMMON") { + balanceString == "$balanceString
your usual tangem card" + } else if (coinData!!.description == "RARE") { + balanceString == "$balanceString
wow, this one is RARE" + } + + return balanceString + } + + override fun awaitingConfirmation(): Boolean { + return false + } + + override fun getFeeCurrency(): String { + return "" + } + + override fun convertToByteArray(internalAmount: InternalAmount?): ByteArray { + TODO("Not yet implemented") + } + + override fun requestSendTransaction(blockchainRequestsCallbacks: BlockchainRequestsCallbacks?, txForSend: ByteArray?) { + TODO("Not yet implemented") + } + + override fun hasBalanceInfo(): Boolean { + return coinData!!.isBalanceReceived + } + + override fun getBalanceEquivalent(): String { + return "" + } + + // public String getOfflineBalanceHTML() { + // InternalAmount offlineInternalAmount = convertToInternalAmount(ctx.getCard().getOfflineBalance()); + // Amount offlineAmount = convertToAmount(offlineInternalAmount); + // return offlineAmount.toDescriptionString(getDecimals()); + // } + @Throws(TangemException::class) + override fun defineWallet() { + try { + val wallet = calculateAddress(ctx.card.walletPublicKeyRar) + ctx.coinData.wallet = wallet + } catch (e: java.lang.Exception) { + ctx.coinData.wallet = "ERROR" + throw TangemException("Can't define wallet address") + } + } + + override fun calculateAddress(pkUncompressed: ByteArray?): String { + return Util.byteArrayToHexString(pkUncompressed) + } + + override fun getShareWalletUri(): Uri { + return Uri.parse(ctx.coinData.wallet) + } + + override fun getUnspentInputsDescription(): String { + return "" + } + + override fun checkNewTransactionAmountAndFee(amount: Amount?, fee: Amount?, isFeeIncluded: Boolean?): Boolean { + TODO("Not yet implemented") + } + + override fun isBalanceNotZero(): Boolean { + return true + } + + override fun getBalanceCurrency(): String { + return "" + } + + override fun evaluateFeeEquivalent(fee: String?): String { + return "" + } + + override fun convertToAmount(internalAmount: InternalAmount?): Amount { + TODO("Not yet implemented") + } + + override fun convertToAmount(strAmount: String?, currency: String?): Amount { + TODO("Not yet implemented") + } + + override fun isExtractPossible(): Boolean { + return false + } + + override fun convertToInternalAmount(amount: Amount?): InternalAmount { + TODO("Not yet implemented") + } + + override fun convertToInternalAmount(bytes: ByteArray?): InternalAmount { + TODO("Not yet implemented") + } + + override fun requestFee(blockchainRequestsCallbacks: BlockchainRequestsCallbacks?, targetAddress: String?, amount: Amount?) { + TODO("Not yet implemented") + } + + override fun validateAddress(address: String?): Boolean { + TODO("Not yet implemented") + } + + override fun constructTransaction(amountValue: Amount?, feeValue: Amount?, IncFee: Boolean, targetAddress: String?): SignTask.TransactionToSign { + TODO("Not yet implemented") + } + + override fun validateBalance(balanceValidator: BalanceValidator?): Boolean { + + if (hasBalanceInfo()) { + if (coinData!!.description != null) { + balanceValidator!!.setScore(100) + balanceValidator.firstLine = R.string.balance_validator_first_line_verified_in_blockchain + balanceValidator.setSecondLine(R.string.empty_string) + } else { + balanceValidator!!.setScore(0) + balanceValidator.firstLine = R.string.balance_validator_first_line_authenticity + balanceValidator.setSecondLine(R.string.empty_string) + } + } else { + balanceValidator!!.setScore(0) + balanceValidator.firstLine = R.string.balance_validator_first_line_no_connection + balanceValidator.setSecondLine(R.string.balance_validator_second_line_authenticity_not_verified) + return false + } + + return true + } + + override fun createCoinData(): CoinData { + return FlowDemoData() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tangem/wallet/flowDemo/proto/Entities.java b/app/src/main/java/com/tangem/wallet/flowDemo/proto/Entities.java new file mode 100644 index 0000000000..3abc9c84b9 --- /dev/null +++ b/app/src/main/java/com/tangem/wallet/flowDemo/proto/Entities.java @@ -0,0 +1,9303 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: sdk/entities/entities.proto + +package com.tangem.wallet.flowDemo.proto; + +public final class Entities { + private Entities() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code flow.sdk.entities.TransactionStatus} + */ + public enum TransactionStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STATUS_UNKNOWN = 0; + */ + STATUS_UNKNOWN(0), + /** + * STATUS_PENDING = 1; + */ + STATUS_PENDING(1), + /** + * STATUS_FINALIZED = 2; + */ + STATUS_FINALIZED(2), + /** + * STATUS_EXECUTED = 3; + */ + STATUS_EXECUTED(3), + /** + * STATUS_SEALED = 4; + */ + STATUS_SEALED(4), + UNRECOGNIZED(-1), + ; + + /** + * STATUS_UNKNOWN = 0; + */ + public static final int STATUS_UNKNOWN_VALUE = 0; + /** + * STATUS_PENDING = 1; + */ + public static final int STATUS_PENDING_VALUE = 1; + /** + * STATUS_FINALIZED = 2; + */ + public static final int STATUS_FINALIZED_VALUE = 2; + /** + * STATUS_EXECUTED = 3; + */ + public static final int STATUS_EXECUTED_VALUE = 3; + /** + * STATUS_SEALED = 4; + */ + public static final int STATUS_SEALED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static TransactionStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransactionStatus forNumber(int value) { + switch (value) { + case 0: return STATUS_UNKNOWN; + case 1: return STATUS_PENDING; + case 2: return STATUS_FINALIZED; + case 3: return STATUS_EXECUTED; + case 4: return STATUS_SEALED; + 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 Entities.getDescriptor().getEnumTypes().get(0); + } + + private static final TransactionStatus[] VALUES = values(); + + public static TransactionStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new 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:flow.sdk.entities.TransactionStatus) + } + + public interface BlockHeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.BlockHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes id = 1; + * @return The id. + */ + com.google.protobuf.ByteString getId(); + + /** + * bytes parent_id = 2; + * @return The parentId. + */ + com.google.protobuf.ByteString getParentId(); + + /** + * uint64 height = 3; + * @return The height. + */ + long getHeight(); + } + /** + * Protobuf type {@code flow.sdk.entities.BlockHeader} + */ + public static final class BlockHeader extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.BlockHeader) + BlockHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockHeader.newBuilder() to construct. + private BlockHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockHeader() { + id_ = com.google.protobuf.ByteString.EMPTY; + parentId_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BlockHeader(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BlockHeader( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + id_ = input.readBytes(); + break; + } + case 18: { + + parentId_ = input.readBytes(); + break; + } + case 24: { + + height_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + 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 Entities.internal_static_flow_sdk_entities_BlockHeader_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_BlockHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.BlockHeader.class, Entities.BlockHeader.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString id_; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + + public static final int PARENT_ID_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString parentId_; + /** + * bytes parent_id = 2; + * @return The parentId. + */ + public com.google.protobuf.ByteString getParentId() { + return parentId_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private long height_; + /** + * uint64 height = 3; + * @return The height. + */ + public long getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!id_.isEmpty()) { + output.writeBytes(1, id_); + } + if (!parentId_.isEmpty()) { + output.writeBytes(2, parentId_); + } + if (height_ != 0L) { + output.writeUInt64(3, height_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!id_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, id_); + } + if (!parentId_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, parentId_); + } + if (height_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, height_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.BlockHeader)) { + return super.equals(obj); + } + Entities.BlockHeader other = (Entities.BlockHeader) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getParentId() + .equals(other.getParentId())) return false; + if (getHeight() + != other.getHeight()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + PARENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getParentId().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeight()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.BlockHeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.BlockHeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.BlockHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.BlockHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.BlockHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.BlockHeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.BlockHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.BlockHeader 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 Entities.BlockHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.BlockHeader 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 Entities.BlockHeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.BlockHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.BlockHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.BlockHeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.BlockHeader) + Entities.BlockHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_BlockHeader_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_BlockHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.BlockHeader.class, Entities.BlockHeader.Builder.class); + } + + // Construct using Entities.BlockHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = com.google.protobuf.ByteString.EMPTY; + + parentId_ = com.google.protobuf.ByteString.EMPTY; + + height_ = 0L; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_BlockHeader_descriptor; + } + + @Override + public Entities.BlockHeader getDefaultInstanceForType() { + return Entities.BlockHeader.getDefaultInstance(); + } + + @Override + public Entities.BlockHeader build() { + Entities.BlockHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.BlockHeader buildPartial() { + Entities.BlockHeader result = new Entities.BlockHeader(this); + result.id_ = id_; + result.parentId_ = parentId_; + result.height_ = height_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.BlockHeader) { + return mergeFrom((Entities.BlockHeader)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.BlockHeader other) { + if (other == Entities.BlockHeader.getDefaultInstance()) return this; + if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + setId(other.getId()); + } + if (other.getParentId() != com.google.protobuf.ByteString.EMPTY) { + setParentId(other.getParentId()); + } + if (other.getHeight() != 0L) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.BlockHeader parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.BlockHeader) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + /** + * bytes id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * bytes id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString parentId_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes parent_id = 2; + * @return The parentId. + */ + public com.google.protobuf.ByteString getParentId() { + return parentId_; + } + /** + * bytes parent_id = 2; + * @param value The parentId to set. + * @return This builder for chaining. + */ + public Builder setParentId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + parentId_ = value; + onChanged(); + return this; + } + /** + * bytes parent_id = 2; + * @return This builder for chaining. + */ + public Builder clearParentId() { + + parentId_ = getDefaultInstance().getParentId(); + onChanged(); + return this; + } + + private long height_ ; + /** + * uint64 height = 3; + * @return The height. + */ + public long getHeight() { + return height_; + } + /** + * uint64 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + + height_ = value; + onChanged(); + return this; + } + /** + * uint64 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0L; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.BlockHeader) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.BlockHeader) + private static final Entities.BlockHeader DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.BlockHeader(); + } + + public static Entities.BlockHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BlockHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BlockHeader(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.BlockHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.Block) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 height = 1; + * @return The height. + */ + long getHeight(); + + /** + * bytes parent_id = 2; + * @return The parentId. + */ + com.google.protobuf.ByteString getParentId(); + + /** + * .google.protobuf.Timestamp timestamp = 3; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * .google.protobuf.Timestamp timestamp = 3; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + java.util.List + getCollectionGuaranteesList(); + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + Entities.CollectionGuarantee getCollectionGuarantees(int index); + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + int getCollectionGuaranteesCount(); + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + java.util.List + getCollectionGuaranteesOrBuilderList(); + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + Entities.CollectionGuaranteeOrBuilder getCollectionGuaranteesOrBuilder( + int index); + + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + java.util.List + getBlockSealsList(); + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + Entities.BlockSeal getBlockSeals(int index); + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + int getBlockSealsCount(); + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + java.util.List + getBlockSealsOrBuilderList(); + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + Entities.BlockSealOrBuilder getBlockSealsOrBuilder( + int index); + + /** + * repeated bytes signatures = 6; + * @return A list containing the signatures. + */ + java.util.List getSignaturesList(); + /** + * repeated bytes signatures = 6; + * @return The count of signatures. + */ + int getSignaturesCount(); + /** + * repeated bytes signatures = 6; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + com.google.protobuf.ByteString getSignatures(int index); + } + /** + * Protobuf type {@code flow.sdk.entities.Block} + */ + public static final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.Block) + BlockOrBuilder { + private static final long serialVersionUID = 0L; + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + parentId_ = com.google.protobuf.ByteString.EMPTY; + collectionGuarantees_ = java.util.Collections.emptyList(); + blockSeals_ = java.util.Collections.emptyList(); + signatures_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new Block(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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 8: { + + height_ = input.readUInt64(); + break; + } + case 18: { + + parentId_ = input.readBytes(); + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timestamp_ != null) { + subBuilder = timestamp_.toBuilder(); + } + timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timestamp_); + timestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + collectionGuarantees_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + collectionGuarantees_.add( + input.readMessage(Entities.CollectionGuarantee.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + blockSeals_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + blockSeals_.add( + input.readMessage(Entities.BlockSeal.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + signatures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + signatures_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + collectionGuarantees_ = java.util.Collections.unmodifiableList(collectionGuarantees_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + blockSeals_ = java.util.Collections.unmodifiableList(blockSeals_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Block_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Block.class, Entities.Block.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private long height_; + /** + * uint64 height = 1; + * @return The height. + */ + public long getHeight() { + return height_; + } + + public static final int PARENT_ID_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString parentId_; + /** + * bytes parent_id = 2; + * @return The parentId. + */ + public com.google.protobuf.ByteString getParentId() { + return parentId_; + } + + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp timestamp_; + /** + * .google.protobuf.Timestamp timestamp = 3; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int COLLECTION_GUARANTEES_FIELD_NUMBER = 4; + private java.util.List collectionGuarantees_; + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public java.util.List getCollectionGuaranteesList() { + return collectionGuarantees_; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public java.util.List + getCollectionGuaranteesOrBuilderList() { + return collectionGuarantees_; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public int getCollectionGuaranteesCount() { + return collectionGuarantees_.size(); + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuarantee getCollectionGuarantees(int index) { + return collectionGuarantees_.get(index); + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuaranteeOrBuilder getCollectionGuaranteesOrBuilder( + int index) { + return collectionGuarantees_.get(index); + } + + public static final int BLOCK_SEALS_FIELD_NUMBER = 5; + private java.util.List blockSeals_; + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public java.util.List getBlockSealsList() { + return blockSeals_; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public java.util.List + getBlockSealsOrBuilderList() { + return blockSeals_; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public int getBlockSealsCount() { + return blockSeals_.size(); + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSeal getBlockSeals(int index) { + return blockSeals_.get(index); + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSealOrBuilder getBlockSealsOrBuilder( + int index) { + return blockSeals_.get(index); + } + + public static final int SIGNATURES_FIELD_NUMBER = 6; + private java.util.List signatures_; + /** + * repeated bytes signatures = 6; + * @return A list containing the signatures. + */ + public java.util.List + getSignaturesList() { + return signatures_; + } + /** + * repeated bytes signatures = 6; + * @return The count of signatures. + */ + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated bytes signatures = 6; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + public com.google.protobuf.ByteString getSignatures(int index) { + return signatures_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0L) { + output.writeUInt64(1, height_); + } + if (!parentId_.isEmpty()) { + output.writeBytes(2, parentId_); + } + if (timestamp_ != null) { + output.writeMessage(3, getTimestamp()); + } + for (int i = 0; i < collectionGuarantees_.size(); i++) { + output.writeMessage(4, collectionGuarantees_.get(i)); + } + for (int i = 0; i < blockSeals_.size(); i++) { + output.writeMessage(5, blockSeals_.get(i)); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeBytes(6, signatures_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, height_); + } + if (!parentId_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, parentId_); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTimestamp()); + } + for (int i = 0; i < collectionGuarantees_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, collectionGuarantees_.get(i)); + } + for (int i = 0; i < blockSeals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, blockSeals_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < signatures_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(signatures_.get(i)); + } + size += dataSize; + size += 1 * getSignaturesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.Block)) { + return super.equals(obj); + } + Entities.Block other = (Entities.Block) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!getParentId() + .equals(other.getParentId())) return false; + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp() + .equals(other.getTimestamp())) return false; + } + if (!getCollectionGuaranteesList() + .equals(other.getCollectionGuaranteesList())) return false; + if (!getBlockSealsList() + .equals(other.getBlockSealsList())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeight()); + hash = (37 * hash) + PARENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getParentId().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (getCollectionGuaranteesCount() > 0) { + hash = (37 * hash) + COLLECTION_GUARANTEES_FIELD_NUMBER; + hash = (53 * hash) + getCollectionGuaranteesList().hashCode(); + } + if (getBlockSealsCount() > 0) { + hash = (37 * hash) + BLOCK_SEALS_FIELD_NUMBER; + hash = (53 * hash) + getBlockSealsList().hashCode(); + } + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.Block parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Block parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Block 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 Entities.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.Block 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 Entities.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.Block) + Entities.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Block_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Block.class, Entities.Block.Builder.class); + } + + // Construct using Entities.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCollectionGuaranteesFieldBuilder(); + getBlockSealsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + height_ = 0L; + + parentId_ = com.google.protobuf.ByteString.EMPTY; + + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + if (collectionGuaranteesBuilder_ == null) { + collectionGuarantees_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + collectionGuaranteesBuilder_.clear(); + } + if (blockSealsBuilder_ == null) { + blockSeals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + blockSealsBuilder_.clear(); + } + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_Block_descriptor; + } + + @Override + public Entities.Block getDefaultInstanceForType() { + return Entities.Block.getDefaultInstance(); + } + + @Override + public Entities.Block build() { + Entities.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.Block buildPartial() { + Entities.Block result = new Entities.Block(this); + int from_bitField0_ = bitField0_; + result.height_ = height_; + result.parentId_ = parentId_; + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.timestamp_ = timestampBuilder_.build(); + } + if (collectionGuaranteesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + collectionGuarantees_ = java.util.Collections.unmodifiableList(collectionGuarantees_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.collectionGuarantees_ = collectionGuarantees_; + } else { + result.collectionGuarantees_ = collectionGuaranteesBuilder_.build(); + } + if (blockSealsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + blockSeals_ = java.util.Collections.unmodifiableList(blockSeals_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.blockSeals_ = blockSeals_; + } else { + result.blockSeals_ = blockSealsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.signatures_ = signatures_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.Block) { + return mergeFrom((Entities.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.Block other) { + if (other == Entities.Block.getDefaultInstance()) return this; + if (other.getHeight() != 0L) { + setHeight(other.getHeight()); + } + if (other.getParentId() != com.google.protobuf.ByteString.EMPTY) { + setParentId(other.getParentId()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (collectionGuaranteesBuilder_ == null) { + if (!other.collectionGuarantees_.isEmpty()) { + if (collectionGuarantees_.isEmpty()) { + collectionGuarantees_ = other.collectionGuarantees_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.addAll(other.collectionGuarantees_); + } + onChanged(); + } + } else { + if (!other.collectionGuarantees_.isEmpty()) { + if (collectionGuaranteesBuilder_.isEmpty()) { + collectionGuaranteesBuilder_.dispose(); + collectionGuaranteesBuilder_ = null; + collectionGuarantees_ = other.collectionGuarantees_; + bitField0_ = (bitField0_ & ~0x00000001); + collectionGuaranteesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCollectionGuaranteesFieldBuilder() : null; + } else { + collectionGuaranteesBuilder_.addAllMessages(other.collectionGuarantees_); + } + } + } + if (blockSealsBuilder_ == null) { + if (!other.blockSeals_.isEmpty()) { + if (blockSeals_.isEmpty()) { + blockSeals_ = other.blockSeals_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBlockSealsIsMutable(); + blockSeals_.addAll(other.blockSeals_); + } + onChanged(); + } + } else { + if (!other.blockSeals_.isEmpty()) { + if (blockSealsBuilder_.isEmpty()) { + blockSealsBuilder_.dispose(); + blockSealsBuilder_ = null; + blockSeals_ = other.blockSeals_; + bitField0_ = (bitField0_ & ~0x00000002); + blockSealsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlockSealsFieldBuilder() : null; + } else { + blockSealsBuilder_.addAllMessages(other.blockSeals_); + } + } + } + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long height_ ; + /** + * uint64 height = 1; + * @return The height. + */ + public long getHeight() { + return height_; + } + /** + * uint64 height = 1; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + + height_ = value; + onChanged(); + return this; + } + /** + * uint64 height = 1; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString parentId_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes parent_id = 2; + * @return The parentId. + */ + public com.google.protobuf.ByteString getParentId() { + return parentId_; + } + /** + * bytes parent_id = 2; + * @param value The parentId to set. + * @return This builder for chaining. + */ + public Builder setParentId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + parentId_ = value; + onChanged(); + return this; + } + /** + * bytes parent_id = 2; + * @return This builder for chaining. + */ + public Builder clearParentId() { + + parentId_ = getDefaultInstance().getParentId(); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; + /** + * .google.protobuf.Timestamp timestamp = 3; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + * .google.protobuf.Timestamp timestamp = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), + getParentForChildren(), + isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private java.util.List collectionGuarantees_ = + java.util.Collections.emptyList(); + private void ensureCollectionGuaranteesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + collectionGuarantees_ = new java.util.ArrayList(collectionGuarantees_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.CollectionGuarantee, Entities.CollectionGuarantee.Builder, Entities.CollectionGuaranteeOrBuilder> collectionGuaranteesBuilder_; + + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public java.util.List getCollectionGuaranteesList() { + if (collectionGuaranteesBuilder_ == null) { + return java.util.Collections.unmodifiableList(collectionGuarantees_); + } else { + return collectionGuaranteesBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public int getCollectionGuaranteesCount() { + if (collectionGuaranteesBuilder_ == null) { + return collectionGuarantees_.size(); + } else { + return collectionGuaranteesBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuarantee getCollectionGuarantees(int index) { + if (collectionGuaranteesBuilder_ == null) { + return collectionGuarantees_.get(index); + } else { + return collectionGuaranteesBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder setCollectionGuarantees( + int index, Entities.CollectionGuarantee value) { + if (collectionGuaranteesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.set(index, value); + onChanged(); + } else { + collectionGuaranteesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder setCollectionGuarantees( + int index, Entities.CollectionGuarantee.Builder builderForValue) { + if (collectionGuaranteesBuilder_ == null) { + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.set(index, builderForValue.build()); + onChanged(); + } else { + collectionGuaranteesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder addCollectionGuarantees(Entities.CollectionGuarantee value) { + if (collectionGuaranteesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.add(value); + onChanged(); + } else { + collectionGuaranteesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder addCollectionGuarantees( + int index, Entities.CollectionGuarantee value) { + if (collectionGuaranteesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.add(index, value); + onChanged(); + } else { + collectionGuaranteesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder addCollectionGuarantees( + Entities.CollectionGuarantee.Builder builderForValue) { + if (collectionGuaranteesBuilder_ == null) { + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.add(builderForValue.build()); + onChanged(); + } else { + collectionGuaranteesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder addCollectionGuarantees( + int index, Entities.CollectionGuarantee.Builder builderForValue) { + if (collectionGuaranteesBuilder_ == null) { + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.add(index, builderForValue.build()); + onChanged(); + } else { + collectionGuaranteesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder addAllCollectionGuarantees( + Iterable values) { + if (collectionGuaranteesBuilder_ == null) { + ensureCollectionGuaranteesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, collectionGuarantees_); + onChanged(); + } else { + collectionGuaranteesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder clearCollectionGuarantees() { + if (collectionGuaranteesBuilder_ == null) { + collectionGuarantees_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + collectionGuaranteesBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Builder removeCollectionGuarantees(int index) { + if (collectionGuaranteesBuilder_ == null) { + ensureCollectionGuaranteesIsMutable(); + collectionGuarantees_.remove(index); + onChanged(); + } else { + collectionGuaranteesBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuarantee.Builder getCollectionGuaranteesBuilder( + int index) { + return getCollectionGuaranteesFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuaranteeOrBuilder getCollectionGuaranteesOrBuilder( + int index) { + if (collectionGuaranteesBuilder_ == null) { + return collectionGuarantees_.get(index); } else { + return collectionGuaranteesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public java.util.List + getCollectionGuaranteesOrBuilderList() { + if (collectionGuaranteesBuilder_ != null) { + return collectionGuaranteesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(collectionGuarantees_); + } + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuarantee.Builder addCollectionGuaranteesBuilder() { + return getCollectionGuaranteesFieldBuilder().addBuilder( + Entities.CollectionGuarantee.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public Entities.CollectionGuarantee.Builder addCollectionGuaranteesBuilder( + int index) { + return getCollectionGuaranteesFieldBuilder().addBuilder( + index, Entities.CollectionGuarantee.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.CollectionGuarantee collection_guarantees = 4; + */ + public java.util.List + getCollectionGuaranteesBuilderList() { + return getCollectionGuaranteesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.CollectionGuarantee, Entities.CollectionGuarantee.Builder, Entities.CollectionGuaranteeOrBuilder> + getCollectionGuaranteesFieldBuilder() { + if (collectionGuaranteesBuilder_ == null) { + collectionGuaranteesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.CollectionGuarantee, Entities.CollectionGuarantee.Builder, Entities.CollectionGuaranteeOrBuilder>( + collectionGuarantees_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + collectionGuarantees_ = null; + } + return collectionGuaranteesBuilder_; + } + + private java.util.List blockSeals_ = + java.util.Collections.emptyList(); + private void ensureBlockSealsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + blockSeals_ = new java.util.ArrayList(blockSeals_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.BlockSeal, Entities.BlockSeal.Builder, Entities.BlockSealOrBuilder> blockSealsBuilder_; + + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public java.util.List getBlockSealsList() { + if (blockSealsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blockSeals_); + } else { + return blockSealsBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public int getBlockSealsCount() { + if (blockSealsBuilder_ == null) { + return blockSeals_.size(); + } else { + return blockSealsBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSeal getBlockSeals(int index) { + if (blockSealsBuilder_ == null) { + return blockSeals_.get(index); + } else { + return blockSealsBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder setBlockSeals( + int index, Entities.BlockSeal value) { + if (blockSealsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlockSealsIsMutable(); + blockSeals_.set(index, value); + onChanged(); + } else { + blockSealsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder setBlockSeals( + int index, Entities.BlockSeal.Builder builderForValue) { + if (blockSealsBuilder_ == null) { + ensureBlockSealsIsMutable(); + blockSeals_.set(index, builderForValue.build()); + onChanged(); + } else { + blockSealsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder addBlockSeals(Entities.BlockSeal value) { + if (blockSealsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlockSealsIsMutable(); + blockSeals_.add(value); + onChanged(); + } else { + blockSealsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder addBlockSeals( + int index, Entities.BlockSeal value) { + if (blockSealsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlockSealsIsMutable(); + blockSeals_.add(index, value); + onChanged(); + } else { + blockSealsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder addBlockSeals( + Entities.BlockSeal.Builder builderForValue) { + if (blockSealsBuilder_ == null) { + ensureBlockSealsIsMutable(); + blockSeals_.add(builderForValue.build()); + onChanged(); + } else { + blockSealsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder addBlockSeals( + int index, Entities.BlockSeal.Builder builderForValue) { + if (blockSealsBuilder_ == null) { + ensureBlockSealsIsMutable(); + blockSeals_.add(index, builderForValue.build()); + onChanged(); + } else { + blockSealsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder addAllBlockSeals( + Iterable values) { + if (blockSealsBuilder_ == null) { + ensureBlockSealsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blockSeals_); + onChanged(); + } else { + blockSealsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder clearBlockSeals() { + if (blockSealsBuilder_ == null) { + blockSeals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + blockSealsBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Builder removeBlockSeals(int index) { + if (blockSealsBuilder_ == null) { + ensureBlockSealsIsMutable(); + blockSeals_.remove(index); + onChanged(); + } else { + blockSealsBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSeal.Builder getBlockSealsBuilder( + int index) { + return getBlockSealsFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSealOrBuilder getBlockSealsOrBuilder( + int index) { + if (blockSealsBuilder_ == null) { + return blockSeals_.get(index); } else { + return blockSealsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public java.util.List + getBlockSealsOrBuilderList() { + if (blockSealsBuilder_ != null) { + return blockSealsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blockSeals_); + } + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSeal.Builder addBlockSealsBuilder() { + return getBlockSealsFieldBuilder().addBuilder( + Entities.BlockSeal.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public Entities.BlockSeal.Builder addBlockSealsBuilder( + int index) { + return getBlockSealsFieldBuilder().addBuilder( + index, Entities.BlockSeal.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.BlockSeal block_seals = 5; + */ + public java.util.List + getBlockSealsBuilderList() { + return getBlockSealsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.BlockSeal, Entities.BlockSeal.Builder, Entities.BlockSealOrBuilder> + getBlockSealsFieldBuilder() { + if (blockSealsBuilder_ == null) { + blockSealsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.BlockSeal, Entities.BlockSeal.Builder, Entities.BlockSealOrBuilder>( + blockSeals_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + blockSeals_ = null; + } + return blockSealsBuilder_; + } + + private java.util.List signatures_ = java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated bytes signatures = 6; + * @return A list containing the signatures. + */ + public java.util.List + getSignaturesList() { + return ((bitField0_ & 0x00000004) != 0) ? + java.util.Collections.unmodifiableList(signatures_) : signatures_; + } + /** + * repeated bytes signatures = 6; + * @return The count of signatures. + */ + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated bytes signatures = 6; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + public com.google.protobuf.ByteString getSignatures(int index) { + return signatures_.get(index); + } + /** + * repeated bytes signatures = 6; + * @param index The index to set the value at. + * @param value The signatures to set. + * @return This builder for chaining. + */ + public Builder setSignatures( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes signatures = 6; + * @param value The signatures to add. + * @return This builder for chaining. + */ + public Builder addSignatures(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes signatures = 6; + * @param values The signatures to add. + * @return This builder for chaining. + */ + public Builder addAllSignatures( + Iterable values) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + return this; + } + /** + * repeated bytes signatures = 6; + * @return This builder for chaining. + */ + public Builder clearSignatures() { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.Block) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.Block) + private static final Entities.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.Block(); + } + + public static Entities.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockSealOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.BlockSeal) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes block_id = 1; + * @return The blockId. + */ + com.google.protobuf.ByteString getBlockId(); + + /** + * bytes execution_receipt_id = 2; + * @return The executionReceiptId. + */ + com.google.protobuf.ByteString getExecutionReceiptId(); + + /** + * repeated bytes execution_receipt_signatures = 3; + * @return A list containing the executionReceiptSignatures. + */ + java.util.List getExecutionReceiptSignaturesList(); + /** + * repeated bytes execution_receipt_signatures = 3; + * @return The count of executionReceiptSignatures. + */ + int getExecutionReceiptSignaturesCount(); + /** + * repeated bytes execution_receipt_signatures = 3; + * @param index The index of the element to return. + * @return The executionReceiptSignatures at the given index. + */ + com.google.protobuf.ByteString getExecutionReceiptSignatures(int index); + + /** + * repeated bytes result_approval_signatures = 4; + * @return A list containing the resultApprovalSignatures. + */ + java.util.List getResultApprovalSignaturesList(); + /** + * repeated bytes result_approval_signatures = 4; + * @return The count of resultApprovalSignatures. + */ + int getResultApprovalSignaturesCount(); + /** + * repeated bytes result_approval_signatures = 4; + * @param index The index of the element to return. + * @return The resultApprovalSignatures at the given index. + */ + com.google.protobuf.ByteString getResultApprovalSignatures(int index); + } + /** + * Protobuf type {@code flow.sdk.entities.BlockSeal} + */ + public static final class BlockSeal extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.BlockSeal) + BlockSealOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockSeal.newBuilder() to construct. + private BlockSeal(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockSeal() { + blockId_ = com.google.protobuf.ByteString.EMPTY; + executionReceiptId_ = com.google.protobuf.ByteString.EMPTY; + executionReceiptSignatures_ = java.util.Collections.emptyList(); + resultApprovalSignatures_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BlockSeal(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BlockSeal( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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: { + + blockId_ = input.readBytes(); + break; + } + case 18: { + + executionReceiptId_ = input.readBytes(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + executionReceiptSignatures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + executionReceiptSignatures_.add(input.readBytes()); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + resultApprovalSignatures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + resultApprovalSignatures_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + executionReceiptSignatures_ = java.util.Collections.unmodifiableList(executionReceiptSignatures_); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + resultApprovalSignatures_ = java.util.Collections.unmodifiableList(resultApprovalSignatures_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_BlockSeal_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_BlockSeal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.BlockSeal.class, Entities.BlockSeal.Builder.class); + } + + public static final int BLOCK_ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString blockId_; + /** + * bytes block_id = 1; + * @return The blockId. + */ + public com.google.protobuf.ByteString getBlockId() { + return blockId_; + } + + public static final int EXECUTION_RECEIPT_ID_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString executionReceiptId_; + /** + * bytes execution_receipt_id = 2; + * @return The executionReceiptId. + */ + public com.google.protobuf.ByteString getExecutionReceiptId() { + return executionReceiptId_; + } + + public static final int EXECUTION_RECEIPT_SIGNATURES_FIELD_NUMBER = 3; + private java.util.List executionReceiptSignatures_; + /** + * repeated bytes execution_receipt_signatures = 3; + * @return A list containing the executionReceiptSignatures. + */ + public java.util.List + getExecutionReceiptSignaturesList() { + return executionReceiptSignatures_; + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @return The count of executionReceiptSignatures. + */ + public int getExecutionReceiptSignaturesCount() { + return executionReceiptSignatures_.size(); + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @param index The index of the element to return. + * @return The executionReceiptSignatures at the given index. + */ + public com.google.protobuf.ByteString getExecutionReceiptSignatures(int index) { + return executionReceiptSignatures_.get(index); + } + + public static final int RESULT_APPROVAL_SIGNATURES_FIELD_NUMBER = 4; + private java.util.List resultApprovalSignatures_; + /** + * repeated bytes result_approval_signatures = 4; + * @return A list containing the resultApprovalSignatures. + */ + public java.util.List + getResultApprovalSignaturesList() { + return resultApprovalSignatures_; + } + /** + * repeated bytes result_approval_signatures = 4; + * @return The count of resultApprovalSignatures. + */ + public int getResultApprovalSignaturesCount() { + return resultApprovalSignatures_.size(); + } + /** + * repeated bytes result_approval_signatures = 4; + * @param index The index of the element to return. + * @return The resultApprovalSignatures at the given index. + */ + public com.google.protobuf.ByteString getResultApprovalSignatures(int index) { + return resultApprovalSignatures_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!blockId_.isEmpty()) { + output.writeBytes(1, blockId_); + } + if (!executionReceiptId_.isEmpty()) { + output.writeBytes(2, executionReceiptId_); + } + for (int i = 0; i < executionReceiptSignatures_.size(); i++) { + output.writeBytes(3, executionReceiptSignatures_.get(i)); + } + for (int i = 0; i < resultApprovalSignatures_.size(); i++) { + output.writeBytes(4, resultApprovalSignatures_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!blockId_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, blockId_); + } + if (!executionReceiptId_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, executionReceiptId_); + } + { + int dataSize = 0; + for (int i = 0; i < executionReceiptSignatures_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(executionReceiptSignatures_.get(i)); + } + size += dataSize; + size += 1 * getExecutionReceiptSignaturesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < resultApprovalSignatures_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(resultApprovalSignatures_.get(i)); + } + size += dataSize; + size += 1 * getResultApprovalSignaturesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.BlockSeal)) { + return super.equals(obj); + } + Entities.BlockSeal other = (Entities.BlockSeal) obj; + + if (!getBlockId() + .equals(other.getBlockId())) return false; + if (!getExecutionReceiptId() + .equals(other.getExecutionReceiptId())) return false; + if (!getExecutionReceiptSignaturesList() + .equals(other.getExecutionReceiptSignaturesList())) return false; + if (!getResultApprovalSignaturesList() + .equals(other.getResultApprovalSignaturesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + getBlockId().hashCode(); + hash = (37 * hash) + EXECUTION_RECEIPT_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionReceiptId().hashCode(); + if (getExecutionReceiptSignaturesCount() > 0) { + hash = (37 * hash) + EXECUTION_RECEIPT_SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getExecutionReceiptSignaturesList().hashCode(); + } + if (getResultApprovalSignaturesCount() > 0) { + hash = (37 * hash) + RESULT_APPROVAL_SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getResultApprovalSignaturesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.BlockSeal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.BlockSeal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.BlockSeal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.BlockSeal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.BlockSeal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.BlockSeal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.BlockSeal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.BlockSeal 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 Entities.BlockSeal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.BlockSeal 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 Entities.BlockSeal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.BlockSeal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.BlockSeal prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.BlockSeal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.BlockSeal) + Entities.BlockSealOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_BlockSeal_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_BlockSeal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.BlockSeal.class, Entities.BlockSeal.Builder.class); + } + + // Construct using Entities.BlockSeal.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + blockId_ = com.google.protobuf.ByteString.EMPTY; + + executionReceiptId_ = com.google.protobuf.ByteString.EMPTY; + + executionReceiptSignatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + resultApprovalSignatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_BlockSeal_descriptor; + } + + @Override + public Entities.BlockSeal getDefaultInstanceForType() { + return Entities.BlockSeal.getDefaultInstance(); + } + + @Override + public Entities.BlockSeal build() { + Entities.BlockSeal result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.BlockSeal buildPartial() { + Entities.BlockSeal result = new Entities.BlockSeal(this); + int from_bitField0_ = bitField0_; + result.blockId_ = blockId_; + result.executionReceiptId_ = executionReceiptId_; + if (((bitField0_ & 0x00000001) != 0)) { + executionReceiptSignatures_ = java.util.Collections.unmodifiableList(executionReceiptSignatures_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.executionReceiptSignatures_ = executionReceiptSignatures_; + if (((bitField0_ & 0x00000002) != 0)) { + resultApprovalSignatures_ = java.util.Collections.unmodifiableList(resultApprovalSignatures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.resultApprovalSignatures_ = resultApprovalSignatures_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.BlockSeal) { + return mergeFrom((Entities.BlockSeal)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.BlockSeal other) { + if (other == Entities.BlockSeal.getDefaultInstance()) return this; + if (other.getBlockId() != com.google.protobuf.ByteString.EMPTY) { + setBlockId(other.getBlockId()); + } + if (other.getExecutionReceiptId() != com.google.protobuf.ByteString.EMPTY) { + setExecutionReceiptId(other.getExecutionReceiptId()); + } + if (!other.executionReceiptSignatures_.isEmpty()) { + if (executionReceiptSignatures_.isEmpty()) { + executionReceiptSignatures_ = other.executionReceiptSignatures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExecutionReceiptSignaturesIsMutable(); + executionReceiptSignatures_.addAll(other.executionReceiptSignatures_); + } + onChanged(); + } + if (!other.resultApprovalSignatures_.isEmpty()) { + if (resultApprovalSignatures_.isEmpty()) { + resultApprovalSignatures_ = other.resultApprovalSignatures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResultApprovalSignaturesIsMutable(); + resultApprovalSignatures_.addAll(other.resultApprovalSignatures_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.BlockSeal parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.BlockSeal) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString blockId_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes block_id = 1; + * @return The blockId. + */ + public com.google.protobuf.ByteString getBlockId() { + return blockId_; + } + /** + * bytes block_id = 1; + * @param value The blockId to set. + * @return This builder for chaining. + */ + public Builder setBlockId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + blockId_ = value; + onChanged(); + return this; + } + /** + * bytes block_id = 1; + * @return This builder for chaining. + */ + public Builder clearBlockId() { + + blockId_ = getDefaultInstance().getBlockId(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString executionReceiptId_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes execution_receipt_id = 2; + * @return The executionReceiptId. + */ + public com.google.protobuf.ByteString getExecutionReceiptId() { + return executionReceiptId_; + } + /** + * bytes execution_receipt_id = 2; + * @param value The executionReceiptId to set. + * @return This builder for chaining. + */ + public Builder setExecutionReceiptId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + executionReceiptId_ = value; + onChanged(); + return this; + } + /** + * bytes execution_receipt_id = 2; + * @return This builder for chaining. + */ + public Builder clearExecutionReceiptId() { + + executionReceiptId_ = getDefaultInstance().getExecutionReceiptId(); + onChanged(); + return this; + } + + private java.util.List executionReceiptSignatures_ = java.util.Collections.emptyList(); + private void ensureExecutionReceiptSignaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + executionReceiptSignatures_ = new java.util.ArrayList(executionReceiptSignatures_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @return A list containing the executionReceiptSignatures. + */ + public java.util.List + getExecutionReceiptSignaturesList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(executionReceiptSignatures_) : executionReceiptSignatures_; + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @return The count of executionReceiptSignatures. + */ + public int getExecutionReceiptSignaturesCount() { + return executionReceiptSignatures_.size(); + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @param index The index of the element to return. + * @return The executionReceiptSignatures at the given index. + */ + public com.google.protobuf.ByteString getExecutionReceiptSignatures(int index) { + return executionReceiptSignatures_.get(index); + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @param index The index to set the value at. + * @param value The executionReceiptSignatures to set. + * @return This builder for chaining. + */ + public Builder setExecutionReceiptSignatures( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionReceiptSignaturesIsMutable(); + executionReceiptSignatures_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @param value The executionReceiptSignatures to add. + * @return This builder for chaining. + */ + public Builder addExecutionReceiptSignatures(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionReceiptSignaturesIsMutable(); + executionReceiptSignatures_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @param values The executionReceiptSignatures to add. + * @return This builder for chaining. + */ + public Builder addAllExecutionReceiptSignatures( + Iterable values) { + ensureExecutionReceiptSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, executionReceiptSignatures_); + onChanged(); + return this; + } + /** + * repeated bytes execution_receipt_signatures = 3; + * @return This builder for chaining. + */ + public Builder clearExecutionReceiptSignatures() { + executionReceiptSignatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List resultApprovalSignatures_ = java.util.Collections.emptyList(); + private void ensureResultApprovalSignaturesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + resultApprovalSignatures_ = new java.util.ArrayList(resultApprovalSignatures_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated bytes result_approval_signatures = 4; + * @return A list containing the resultApprovalSignatures. + */ + public java.util.List + getResultApprovalSignaturesList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(resultApprovalSignatures_) : resultApprovalSignatures_; + } + /** + * repeated bytes result_approval_signatures = 4; + * @return The count of resultApprovalSignatures. + */ + public int getResultApprovalSignaturesCount() { + return resultApprovalSignatures_.size(); + } + /** + * repeated bytes result_approval_signatures = 4; + * @param index The index of the element to return. + * @return The resultApprovalSignatures at the given index. + */ + public com.google.protobuf.ByteString getResultApprovalSignatures(int index) { + return resultApprovalSignatures_.get(index); + } + /** + * repeated bytes result_approval_signatures = 4; + * @param index The index to set the value at. + * @param value The resultApprovalSignatures to set. + * @return This builder for chaining. + */ + public Builder setResultApprovalSignatures( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultApprovalSignaturesIsMutable(); + resultApprovalSignatures_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes result_approval_signatures = 4; + * @param value The resultApprovalSignatures to add. + * @return This builder for chaining. + */ + public Builder addResultApprovalSignatures(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultApprovalSignaturesIsMutable(); + resultApprovalSignatures_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes result_approval_signatures = 4; + * @param values The resultApprovalSignatures to add. + * @return This builder for chaining. + */ + public Builder addAllResultApprovalSignatures( + Iterable values) { + ensureResultApprovalSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resultApprovalSignatures_); + onChanged(); + return this; + } + /** + * repeated bytes result_approval_signatures = 4; + * @return This builder for chaining. + */ + public Builder clearResultApprovalSignatures() { + resultApprovalSignatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.BlockSeal) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.BlockSeal) + private static final Entities.BlockSeal DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.BlockSeal(); + } + + public static Entities.BlockSeal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BlockSeal parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BlockSeal(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.BlockSeal getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccountSignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.AccountSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes account = 1; + * @return The account. + */ + com.google.protobuf.ByteString getAccount(); + + /** + * bytes signature = 2; + * @return The signature. + */ + com.google.protobuf.ByteString getSignature(); + } + /** + * Protobuf type {@code flow.sdk.entities.AccountSignature} + */ + public static final class AccountSignature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.AccountSignature) + AccountSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccountSignature.newBuilder() to construct. + private AccountSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AccountSignature() { + account_ = com.google.protobuf.ByteString.EMPTY; + signature_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AccountSignature(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AccountSignature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + account_ = input.readBytes(); + break; + } + case 18: { + + signature_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Entities.internal_static_flow_sdk_entities_AccountSignature_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_AccountSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.AccountSignature.class, Entities.AccountSignature.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString account_; + /** + * bytes account = 1; + * @return The account. + */ + public com.google.protobuf.ByteString getAccount() { + return account_; + } + + public static final int SIGNATURE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString signature_; + /** + * bytes signature = 2; + * @return The signature. + */ + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!account_.isEmpty()) { + output.writeBytes(1, account_); + } + if (!signature_.isEmpty()) { + output.writeBytes(2, signature_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!account_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, account_); + } + if (!signature_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, signature_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.AccountSignature)) { + return super.equals(obj); + } + Entities.AccountSignature other = (Entities.AccountSignature) obj; + + if (!getAccount() + .equals(other.getAccount())) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.AccountSignature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.AccountSignature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.AccountSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.AccountSignature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.AccountSignature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.AccountSignature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.AccountSignature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.AccountSignature 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 Entities.AccountSignature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.AccountSignature 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 Entities.AccountSignature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.AccountSignature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.AccountSignature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.AccountSignature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.AccountSignature) + Entities.AccountSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_AccountSignature_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_AccountSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.AccountSignature.class, Entities.AccountSignature.Builder.class); + } + + // Construct using Entities.AccountSignature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + account_ = com.google.protobuf.ByteString.EMPTY; + + signature_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_AccountSignature_descriptor; + } + + @Override + public Entities.AccountSignature getDefaultInstanceForType() { + return Entities.AccountSignature.getDefaultInstance(); + } + + @Override + public Entities.AccountSignature build() { + Entities.AccountSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.AccountSignature buildPartial() { + Entities.AccountSignature result = new Entities.AccountSignature(this); + result.account_ = account_; + result.signature_ = signature_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.AccountSignature) { + return mergeFrom((Entities.AccountSignature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.AccountSignature other) { + if (other == Entities.AccountSignature.getDefaultInstance()) return this; + if (other.getAccount() != com.google.protobuf.ByteString.EMPTY) { + setAccount(other.getAccount()); + } + if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { + setSignature(other.getSignature()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.AccountSignature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.AccountSignature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString account_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes account = 1; + * @return The account. + */ + public com.google.protobuf.ByteString getAccount() { + return account_; + } + /** + * bytes account = 1; + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * bytes account = 1; + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes signature = 2; + * @return The signature. + */ + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + /** + * bytes signature = 2; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + signature_ = value; + onChanged(); + return this; + } + /** + * bytes signature = 2; + * @return This builder for chaining. + */ + public Builder clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.AccountSignature) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.AccountSignature) + private static final Entities.AccountSignature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.AccountSignature(); + } + + public static Entities.AccountSignature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AccountSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccountSignature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.AccountSignature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TransactionOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.Transaction) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes script = 1; + * @return The script. + */ + com.google.protobuf.ByteString getScript(); + + /** + * bytes reference_block_id = 2; + * @return The referenceBlockId. + */ + com.google.protobuf.ByteString getReferenceBlockId(); + + /** + * bytes payer_account = 3; + * @return The payerAccount. + */ + com.google.protobuf.ByteString getPayerAccount(); + + /** + * repeated bytes script_accounts = 4; + * @return A list containing the scriptAccounts. + */ + java.util.List getScriptAccountsList(); + /** + * repeated bytes script_accounts = 4; + * @return The count of scriptAccounts. + */ + int getScriptAccountsCount(); + /** + * repeated bytes script_accounts = 4; + * @param index The index of the element to return. + * @return The scriptAccounts at the given index. + */ + com.google.protobuf.ByteString getScriptAccounts(int index); + + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + java.util.List + getSignaturesList(); + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + Entities.AccountSignature getSignatures(int index); + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + int getSignaturesCount(); + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + java.util.List + getSignaturesOrBuilderList(); + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + Entities.AccountSignatureOrBuilder getSignaturesOrBuilder( + int index); + + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return The status. + */ + Entities.TransactionStatus getStatus(); + } + /** + * Protobuf type {@code flow.sdk.entities.Transaction} + */ + public static final class Transaction extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.Transaction) + TransactionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Transaction.newBuilder() to construct. + private Transaction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Transaction() { + script_ = com.google.protobuf.ByteString.EMPTY; + referenceBlockId_ = com.google.protobuf.ByteString.EMPTY; + payerAccount_ = com.google.protobuf.ByteString.EMPTY; + scriptAccounts_ = java.util.Collections.emptyList(); + signatures_ = java.util.Collections.emptyList(); + status_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new Transaction(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Transaction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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: { + + script_ = input.readBytes(); + break; + } + case 18: { + + referenceBlockId_ = input.readBytes(); + break; + } + case 26: { + + payerAccount_ = input.readBytes(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + scriptAccounts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + scriptAccounts_.add(input.readBytes()); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + signatures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + signatures_.add( + input.readMessage(Entities.AccountSignature.parser(), extensionRegistry)); + break; + } + case 48: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + scriptAccounts_ = java.util.Collections.unmodifiableList(scriptAccounts_); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Transaction_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Transaction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Transaction.class, Entities.Transaction.Builder.class); + } + + public static final int SCRIPT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString script_; + /** + * bytes script = 1; + * @return The script. + */ + public com.google.protobuf.ByteString getScript() { + return script_; + } + + public static final int REFERENCE_BLOCK_ID_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString referenceBlockId_; + /** + * bytes reference_block_id = 2; + * @return The referenceBlockId. + */ + public com.google.protobuf.ByteString getReferenceBlockId() { + return referenceBlockId_; + } + + public static final int PAYER_ACCOUNT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payerAccount_; + /** + * bytes payer_account = 3; + * @return The payerAccount. + */ + public com.google.protobuf.ByteString getPayerAccount() { + return payerAccount_; + } + + public static final int SCRIPT_ACCOUNTS_FIELD_NUMBER = 4; + private java.util.List scriptAccounts_; + /** + * repeated bytes script_accounts = 4; + * @return A list containing the scriptAccounts. + */ + public java.util.List + getScriptAccountsList() { + return scriptAccounts_; + } + /** + * repeated bytes script_accounts = 4; + * @return The count of scriptAccounts. + */ + public int getScriptAccountsCount() { + return scriptAccounts_.size(); + } + /** + * repeated bytes script_accounts = 4; + * @param index The index of the element to return. + * @return The scriptAccounts at the given index. + */ + public com.google.protobuf.ByteString getScriptAccounts(int index) { + return scriptAccounts_.get(index); + } + + public static final int SIGNATURES_FIELD_NUMBER = 5; + private java.util.List signatures_; + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public java.util.List getSignaturesList() { + return signatures_; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public java.util.List + getSignaturesOrBuilderList() { + return signatures_; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignature getSignatures(int index) { + return signatures_.get(index); + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignatureOrBuilder getSignaturesOrBuilder( + int index) { + return signatures_.get(index); + } + + public static final int STATUS_FIELD_NUMBER = 6; + private int status_; + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return The status. + */ + public Entities.TransactionStatus getStatus() { + @SuppressWarnings("deprecation") + Entities.TransactionStatus result = Entities.TransactionStatus.valueOf(status_); + return result == null ? Entities.TransactionStatus.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!script_.isEmpty()) { + output.writeBytes(1, script_); + } + if (!referenceBlockId_.isEmpty()) { + output.writeBytes(2, referenceBlockId_); + } + if (!payerAccount_.isEmpty()) { + output.writeBytes(3, payerAccount_); + } + for (int i = 0; i < scriptAccounts_.size(); i++) { + output.writeBytes(4, scriptAccounts_.get(i)); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(5, signatures_.get(i)); + } + if (status_ != Entities.TransactionStatus.STATUS_UNKNOWN.getNumber()) { + output.writeEnum(6, status_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!script_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, script_); + } + if (!referenceBlockId_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, referenceBlockId_); + } + if (!payerAccount_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, payerAccount_); + } + { + int dataSize = 0; + for (int i = 0; i < scriptAccounts_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(scriptAccounts_.get(i)); + } + size += dataSize; + size += 1 * getScriptAccountsList().size(); + } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, signatures_.get(i)); + } + if (status_ != Entities.TransactionStatus.STATUS_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, status_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.Transaction)) { + return super.equals(obj); + } + Entities.Transaction other = (Entities.Transaction) obj; + + if (!getScript() + .equals(other.getScript())) return false; + if (!getReferenceBlockId() + .equals(other.getReferenceBlockId())) return false; + if (!getPayerAccount() + .equals(other.getPayerAccount())) return false; + if (!getScriptAccountsList() + .equals(other.getScriptAccountsList())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (status_ != other.status_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + hash = (37 * hash) + REFERENCE_BLOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + getReferenceBlockId().hashCode(); + hash = (37 * hash) + PAYER_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getPayerAccount().hashCode(); + if (getScriptAccountsCount() > 0) { + hash = (37 * hash) + SCRIPT_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getScriptAccountsList().hashCode(); + } + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.Transaction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Transaction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Transaction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Transaction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Transaction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Transaction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Transaction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Transaction 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 Entities.Transaction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.Transaction 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 Entities.Transaction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Transaction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.Transaction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.Transaction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.Transaction) + Entities.TransactionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Transaction_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Transaction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Transaction.class, Entities.Transaction.Builder.class); + } + + // Construct using Entities.Transaction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSignaturesFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + script_ = com.google.protobuf.ByteString.EMPTY; + + referenceBlockId_ = com.google.protobuf.ByteString.EMPTY; + + payerAccount_ = com.google.protobuf.ByteString.EMPTY; + + scriptAccounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + signaturesBuilder_.clear(); + } + status_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_Transaction_descriptor; + } + + @Override + public Entities.Transaction getDefaultInstanceForType() { + return Entities.Transaction.getDefaultInstance(); + } + + @Override + public Entities.Transaction build() { + Entities.Transaction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.Transaction buildPartial() { + Entities.Transaction result = new Entities.Transaction(this); + int from_bitField0_ = bitField0_; + result.script_ = script_; + result.referenceBlockId_ = referenceBlockId_; + result.payerAccount_ = payerAccount_; + if (((bitField0_ & 0x00000001) != 0)) { + scriptAccounts_ = java.util.Collections.unmodifiableList(scriptAccounts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.scriptAccounts_ = scriptAccounts_; + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } + result.status_ = status_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.Transaction) { + return mergeFrom((Entities.Transaction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.Transaction other) { + if (other == Entities.Transaction.getDefaultInstance()) return this; + if (other.getScript() != com.google.protobuf.ByteString.EMPTY) { + setScript(other.getScript()); + } + if (other.getReferenceBlockId() != com.google.protobuf.ByteString.EMPTY) { + setReferenceBlockId(other.getReferenceBlockId()); + } + if (other.getPayerAccount() != com.google.protobuf.ByteString.EMPTY) { + setPayerAccount(other.getPayerAccount()); + } + if (!other.scriptAccounts_.isEmpty()) { + if (scriptAccounts_.isEmpty()) { + scriptAccounts_ = other.scriptAccounts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureScriptAccountsIsMutable(); + scriptAccounts_.addAll(other.scriptAccounts_); + } + onChanged(); + } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000002); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSignaturesFieldBuilder() : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.Transaction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.Transaction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString script_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes script = 1; + * @return The script. + */ + public com.google.protobuf.ByteString getScript() { + return script_; + } + /** + * bytes script = 1; + * @param value The script to set. + * @return This builder for chaining. + */ + public Builder setScript(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + script_ = value; + onChanged(); + return this; + } + /** + * bytes script = 1; + * @return This builder for chaining. + */ + public Builder clearScript() { + + script_ = getDefaultInstance().getScript(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString referenceBlockId_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes reference_block_id = 2; + * @return The referenceBlockId. + */ + public com.google.protobuf.ByteString getReferenceBlockId() { + return referenceBlockId_; + } + /** + * bytes reference_block_id = 2; + * @param value The referenceBlockId to set. + * @return This builder for chaining. + */ + public Builder setReferenceBlockId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + referenceBlockId_ = value; + onChanged(); + return this; + } + /** + * bytes reference_block_id = 2; + * @return This builder for chaining. + */ + public Builder clearReferenceBlockId() { + + referenceBlockId_ = getDefaultInstance().getReferenceBlockId(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payerAccount_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payer_account = 3; + * @return The payerAccount. + */ + public com.google.protobuf.ByteString getPayerAccount() { + return payerAccount_; + } + /** + * bytes payer_account = 3; + * @param value The payerAccount to set. + * @return This builder for chaining. + */ + public Builder setPayerAccount(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + payerAccount_ = value; + onChanged(); + return this; + } + /** + * bytes payer_account = 3; + * @return This builder for chaining. + */ + public Builder clearPayerAccount() { + + payerAccount_ = getDefaultInstance().getPayerAccount(); + onChanged(); + return this; + } + + private java.util.List scriptAccounts_ = java.util.Collections.emptyList(); + private void ensureScriptAccountsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + scriptAccounts_ = new java.util.ArrayList(scriptAccounts_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes script_accounts = 4; + * @return A list containing the scriptAccounts. + */ + public java.util.List + getScriptAccountsList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(scriptAccounts_) : scriptAccounts_; + } + /** + * repeated bytes script_accounts = 4; + * @return The count of scriptAccounts. + */ + public int getScriptAccountsCount() { + return scriptAccounts_.size(); + } + /** + * repeated bytes script_accounts = 4; + * @param index The index of the element to return. + * @return The scriptAccounts at the given index. + */ + public com.google.protobuf.ByteString getScriptAccounts(int index) { + return scriptAccounts_.get(index); + } + /** + * repeated bytes script_accounts = 4; + * @param index The index to set the value at. + * @param value The scriptAccounts to set. + * @return This builder for chaining. + */ + public Builder setScriptAccounts( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScriptAccountsIsMutable(); + scriptAccounts_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes script_accounts = 4; + * @param value The scriptAccounts to add. + * @return This builder for chaining. + */ + public Builder addScriptAccounts(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScriptAccountsIsMutable(); + scriptAccounts_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes script_accounts = 4; + * @param values The scriptAccounts to add. + * @return This builder for chaining. + */ + public Builder addAllScriptAccounts( + Iterable values) { + ensureScriptAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, scriptAccounts_); + onChanged(); + return this; + } + /** + * repeated bytes script_accounts = 4; + * @return This builder for chaining. + */ + public Builder clearScriptAccounts() { + scriptAccounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List signatures_ = + java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.AccountSignature, Entities.AccountSignature.Builder, Entities.AccountSignatureOrBuilder> signaturesBuilder_; + + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public java.util.List getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder setSignatures( + int index, Entities.AccountSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder setSignatures( + int index, Entities.AccountSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder addSignatures(Entities.AccountSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder addSignatures( + int index, Entities.AccountSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder addSignatures( + Entities.AccountSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder addSignatures( + int index, Entities.AccountSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder addAllSignatures( + Iterable values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignature.Builder getSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignatureOrBuilder getSignaturesOrBuilder( + int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public java.util.List + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignature.Builder addSignaturesBuilder() { + return getSignaturesFieldBuilder().addBuilder( + Entities.AccountSignature.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public Entities.AccountSignature.Builder addSignaturesBuilder( + int index) { + return getSignaturesFieldBuilder().addBuilder( + index, Entities.AccountSignature.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.AccountSignature signatures = 5; + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.AccountSignature, Entities.AccountSignature.Builder, Entities.AccountSignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.AccountSignature, Entities.AccountSignature.Builder, Entities.AccountSignatureOrBuilder>( + signatures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + + private int status_ = 0; + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + onChanged(); + return this; + } + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return The status. + */ + public Entities.TransactionStatus getStatus() { + @SuppressWarnings("deprecation") + Entities.TransactionStatus result = Entities.TransactionStatus.valueOf(status_); + return result == null ? Entities.TransactionStatus.UNRECOGNIZED : result; + } + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(Entities.TransactionStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .flow.sdk.entities.TransactionStatus status = 6; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.Transaction) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.Transaction) + private static final Entities.Transaction DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.Transaction(); + } + + public static Entities.Transaction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public Transaction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transaction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.Transaction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CollectionOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.Collection) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + java.util.List + getTransactionsList(); + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + Entities.Transaction getTransactions(int index); + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + int getTransactionsCount(); + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + java.util.List + getTransactionsOrBuilderList(); + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + Entities.TransactionOrBuilder getTransactionsOrBuilder( + int index); + } + /** + * Protobuf type {@code flow.sdk.entities.Collection} + */ + public static final class Collection extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.Collection) + CollectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Collection.newBuilder() to construct. + private Collection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Collection() { + transactions_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new Collection(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Collection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transactions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transactions_.add( + input.readMessage(Entities.Transaction.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transactions_ = java.util.Collections.unmodifiableList(transactions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Collection_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Collection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Collection.class, Entities.Collection.Builder.class); + } + + public static final int TRANSACTIONS_FIELD_NUMBER = 1; + private java.util.List transactions_; + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public java.util.List getTransactionsList() { + return transactions_; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public java.util.List + getTransactionsOrBuilderList() { + return transactions_; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public int getTransactionsCount() { + return transactions_.size(); + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.Transaction getTransactions(int index) { + return transactions_.get(index); + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.TransactionOrBuilder getTransactionsOrBuilder( + int index) { + return transactions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < transactions_.size(); i++) { + output.writeMessage(1, transactions_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < transactions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, transactions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.Collection)) { + return super.equals(obj); + } + Entities.Collection other = (Entities.Collection) obj; + + if (!getTransactionsList() + .equals(other.getTransactionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTransactionsCount() > 0) { + hash = (37 * hash) + TRANSACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransactionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.Collection parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Collection parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Collection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Collection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Collection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Collection parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Collection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Collection 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 Entities.Collection parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.Collection 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 Entities.Collection parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Collection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.Collection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.Collection} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.Collection) + Entities.CollectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Collection_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Collection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Collection.class, Entities.Collection.Builder.class); + } + + // Construct using Entities.Collection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTransactionsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + if (transactionsBuilder_ == null) { + transactions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transactionsBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_Collection_descriptor; + } + + @Override + public Entities.Collection getDefaultInstanceForType() { + return Entities.Collection.getDefaultInstance(); + } + + @Override + public Entities.Collection build() { + Entities.Collection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.Collection buildPartial() { + Entities.Collection result = new Entities.Collection(this); + int from_bitField0_ = bitField0_; + if (transactionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transactions_ = java.util.Collections.unmodifiableList(transactions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transactions_ = transactions_; + } else { + result.transactions_ = transactionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.Collection) { + return mergeFrom((Entities.Collection)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.Collection other) { + if (other == Entities.Collection.getDefaultInstance()) return this; + if (transactionsBuilder_ == null) { + if (!other.transactions_.isEmpty()) { + if (transactions_.isEmpty()) { + transactions_ = other.transactions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransactionsIsMutable(); + transactions_.addAll(other.transactions_); + } + onChanged(); + } + } else { + if (!other.transactions_.isEmpty()) { + if (transactionsBuilder_.isEmpty()) { + transactionsBuilder_.dispose(); + transactionsBuilder_ = null; + transactions_ = other.transactions_; + bitField0_ = (bitField0_ & ~0x00000001); + transactionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTransactionsFieldBuilder() : null; + } else { + transactionsBuilder_.addAllMessages(other.transactions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.Collection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.Collection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List transactions_ = + java.util.Collections.emptyList(); + private void ensureTransactionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transactions_ = new java.util.ArrayList(transactions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder> transactionsBuilder_; + + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public java.util.List getTransactionsList() { + if (transactionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transactions_); + } else { + return transactionsBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public int getTransactionsCount() { + if (transactionsBuilder_ == null) { + return transactions_.size(); + } else { + return transactionsBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.Transaction getTransactions(int index) { + if (transactionsBuilder_ == null) { + return transactions_.get(index); + } else { + return transactionsBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder setTransactions( + int index, Entities.Transaction value) { + if (transactionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransactionsIsMutable(); + transactions_.set(index, value); + onChanged(); + } else { + transactionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder setTransactions( + int index, Entities.Transaction.Builder builderForValue) { + if (transactionsBuilder_ == null) { + ensureTransactionsIsMutable(); + transactions_.set(index, builderForValue.build()); + onChanged(); + } else { + transactionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder addTransactions(Entities.Transaction value) { + if (transactionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransactionsIsMutable(); + transactions_.add(value); + onChanged(); + } else { + transactionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder addTransactions( + int index, Entities.Transaction value) { + if (transactionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransactionsIsMutable(); + transactions_.add(index, value); + onChanged(); + } else { + transactionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder addTransactions( + Entities.Transaction.Builder builderForValue) { + if (transactionsBuilder_ == null) { + ensureTransactionsIsMutable(); + transactions_.add(builderForValue.build()); + onChanged(); + } else { + transactionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder addTransactions( + int index, Entities.Transaction.Builder builderForValue) { + if (transactionsBuilder_ == null) { + ensureTransactionsIsMutable(); + transactions_.add(index, builderForValue.build()); + onChanged(); + } else { + transactionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder addAllTransactions( + Iterable values) { + if (transactionsBuilder_ == null) { + ensureTransactionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, transactions_); + onChanged(); + } else { + transactionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder clearTransactions() { + if (transactionsBuilder_ == null) { + transactions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transactionsBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Builder removeTransactions(int index) { + if (transactionsBuilder_ == null) { + ensureTransactionsIsMutable(); + transactions_.remove(index); + onChanged(); + } else { + transactionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.Transaction.Builder getTransactionsBuilder( + int index) { + return getTransactionsFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.TransactionOrBuilder getTransactionsOrBuilder( + int index) { + if (transactionsBuilder_ == null) { + return transactions_.get(index); } else { + return transactionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public java.util.List + getTransactionsOrBuilderList() { + if (transactionsBuilder_ != null) { + return transactionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transactions_); + } + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.Transaction.Builder addTransactionsBuilder() { + return getTransactionsFieldBuilder().addBuilder( + Entities.Transaction.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public Entities.Transaction.Builder addTransactionsBuilder( + int index) { + return getTransactionsFieldBuilder().addBuilder( + index, Entities.Transaction.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.Transaction transactions = 1; + */ + public java.util.List + getTransactionsBuilderList() { + return getTransactionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder> + getTransactionsFieldBuilder() { + if (transactionsBuilder_ == null) { + transactionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder>( + transactions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transactions_ = null; + } + return transactionsBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.Collection) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.Collection) + private static final Entities.Collection DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.Collection(); + } + + public static Entities.Collection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public Collection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Collection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.Collection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CollectionGuaranteeOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.CollectionGuarantee) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes collectionHash = 1; + * @return The collectionHash. + */ + com.google.protobuf.ByteString getCollectionHash(); + + /** + * repeated bytes signatures = 2; + * @return A list containing the signatures. + */ + java.util.List getSignaturesList(); + /** + * repeated bytes signatures = 2; + * @return The count of signatures. + */ + int getSignaturesCount(); + /** + * repeated bytes signatures = 2; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + com.google.protobuf.ByteString getSignatures(int index); + } + /** + * Protobuf type {@code flow.sdk.entities.CollectionGuarantee} + */ + public static final class CollectionGuarantee extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.CollectionGuarantee) + CollectionGuaranteeOrBuilder { + private static final long serialVersionUID = 0L; + // Use CollectionGuarantee.newBuilder() to construct. + private CollectionGuarantee(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CollectionGuarantee() { + collectionHash_ = com.google.protobuf.ByteString.EMPTY; + signatures_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new CollectionGuarantee(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CollectionGuarantee( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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: { + + collectionHash_ = input.readBytes(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + signatures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + signatures_.add(input.readBytes()); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_CollectionGuarantee_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_CollectionGuarantee_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.CollectionGuarantee.class, Entities.CollectionGuarantee.Builder.class); + } + + public static final int COLLECTIONHASH_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString collectionHash_; + /** + * bytes collectionHash = 1; + * @return The collectionHash. + */ + public com.google.protobuf.ByteString getCollectionHash() { + return collectionHash_; + } + + public static final int SIGNATURES_FIELD_NUMBER = 2; + private java.util.List signatures_; + /** + * repeated bytes signatures = 2; + * @return A list containing the signatures. + */ + public java.util.List + getSignaturesList() { + return signatures_; + } + /** + * repeated bytes signatures = 2; + * @return The count of signatures. + */ + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated bytes signatures = 2; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + public com.google.protobuf.ByteString getSignatures(int index) { + return signatures_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!collectionHash_.isEmpty()) { + output.writeBytes(1, collectionHash_); + } + for (int i = 0; i < signatures_.size(); i++) { + output.writeBytes(2, signatures_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!collectionHash_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, collectionHash_); + } + { + int dataSize = 0; + for (int i = 0; i < signatures_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(signatures_.get(i)); + } + size += dataSize; + size += 1 * getSignaturesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.CollectionGuarantee)) { + return super.equals(obj); + } + Entities.CollectionGuarantee other = (Entities.CollectionGuarantee) obj; + + if (!getCollectionHash() + .equals(other.getCollectionHash())) return false; + if (!getSignaturesList() + .equals(other.getSignaturesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTIONHASH_FIELD_NUMBER; + hash = (53 * hash) + getCollectionHash().hashCode(); + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.CollectionGuarantee parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.CollectionGuarantee parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.CollectionGuarantee parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.CollectionGuarantee parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.CollectionGuarantee parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.CollectionGuarantee parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.CollectionGuarantee parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.CollectionGuarantee 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 Entities.CollectionGuarantee parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.CollectionGuarantee 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 Entities.CollectionGuarantee parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.CollectionGuarantee parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.CollectionGuarantee prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.CollectionGuarantee} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.CollectionGuarantee) + Entities.CollectionGuaranteeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_CollectionGuarantee_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_CollectionGuarantee_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.CollectionGuarantee.class, Entities.CollectionGuarantee.Builder.class); + } + + // Construct using Entities.CollectionGuarantee.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + collectionHash_ = com.google.protobuf.ByteString.EMPTY; + + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_CollectionGuarantee_descriptor; + } + + @Override + public Entities.CollectionGuarantee getDefaultInstanceForType() { + return Entities.CollectionGuarantee.getDefaultInstance(); + } + + @Override + public Entities.CollectionGuarantee build() { + Entities.CollectionGuarantee result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.CollectionGuarantee buildPartial() { + Entities.CollectionGuarantee result = new Entities.CollectionGuarantee(this); + int from_bitField0_ = bitField0_; + result.collectionHash_ = collectionHash_; + if (((bitField0_ & 0x00000001) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.signatures_ = signatures_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.CollectionGuarantee) { + return mergeFrom((Entities.CollectionGuarantee)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.CollectionGuarantee other) { + if (other == Entities.CollectionGuarantee.getDefaultInstance()) return this; + if (other.getCollectionHash() != com.google.protobuf.ByteString.EMPTY) { + setCollectionHash(other.getCollectionHash()); + } + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.CollectionGuarantee parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.CollectionGuarantee) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString collectionHash_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes collectionHash = 1; + * @return The collectionHash. + */ + public com.google.protobuf.ByteString getCollectionHash() { + return collectionHash_; + } + /** + * bytes collectionHash = 1; + * @param value The collectionHash to set. + * @return This builder for chaining. + */ + public Builder setCollectionHash(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + collectionHash_ = value; + onChanged(); + return this; + } + /** + * bytes collectionHash = 1; + * @return This builder for chaining. + */ + public Builder clearCollectionHash() { + + collectionHash_ = getDefaultInstance().getCollectionHash(); + onChanged(); + return this; + } + + private java.util.List signatures_ = java.util.Collections.emptyList(); + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + signatures_ = new java.util.ArrayList(signatures_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated bytes signatures = 2; + * @return A list containing the signatures. + */ + public java.util.List + getSignaturesList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(signatures_) : signatures_; + } + /** + * repeated bytes signatures = 2; + * @return The count of signatures. + */ + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated bytes signatures = 2; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + public com.google.protobuf.ByteString getSignatures(int index) { + return signatures_.get(index); + } + /** + * repeated bytes signatures = 2; + * @param index The index to set the value at. + * @param value The signatures to set. + * @return This builder for chaining. + */ + public Builder setSignatures( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + return this; + } + /** + * repeated bytes signatures = 2; + * @param value The signatures to add. + * @return This builder for chaining. + */ + public Builder addSignatures(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + return this; + } + /** + * repeated bytes signatures = 2; + * @param values The signatures to add. + * @return This builder for chaining. + */ + public Builder addAllSignatures( + Iterable values) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, signatures_); + onChanged(); + return this; + } + /** + * repeated bytes signatures = 2; + * @return This builder for chaining. + */ + public Builder clearSignatures() { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.CollectionGuarantee) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.CollectionGuarantee) + private static final Entities.CollectionGuarantee DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.CollectionGuarantee(); + } + + public static Entities.CollectionGuarantee getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public CollectionGuarantee parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CollectionGuarantee(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.CollectionGuarantee getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccountOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.Account) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes address = 1; + * @return The address. + */ + com.google.protobuf.ByteString getAddress(); + + /** + * uint64 balance = 2; + * @return The balance. + */ + long getBalance(); + + /** + * bytes code = 3; + * @return The code. + */ + com.google.protobuf.ByteString getCode(); + + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + java.util.List + getKeysList(); + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + Entities.AccountPublicKey getKeys(int index); + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + int getKeysCount(); + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + java.util.List + getKeysOrBuilderList(); + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + Entities.AccountPublicKeyOrBuilder getKeysOrBuilder( + int index); + } + /** + * Protobuf type {@code flow.sdk.entities.Account} + */ + public static final class Account extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.Account) + AccountOrBuilder { + private static final long serialVersionUID = 0L; + // Use Account.newBuilder() to construct. + private Account(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Account() { + address_ = com.google.protobuf.ByteString.EMPTY; + code_ = com.google.protobuf.ByteString.EMPTY; + keys_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new Account(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Account( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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: { + + address_ = input.readBytes(); + break; + } + case 16: { + + balance_ = input.readUInt64(); + break; + } + case 26: { + + code_ = input.readBytes(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + keys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + keys_.add( + input.readMessage(Entities.AccountPublicKey.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + keys_ = java.util.Collections.unmodifiableList(keys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Account_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Account_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Account.class, Entities.Account.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString address_; + /** + * bytes address = 1; + * @return The address. + */ + public com.google.protobuf.ByteString getAddress() { + return address_; + } + + public static final int BALANCE_FIELD_NUMBER = 2; + private long balance_; + /** + * uint64 balance = 2; + * @return The balance. + */ + public long getBalance() { + return balance_; + } + + public static final int CODE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString code_; + /** + * bytes code = 3; + * @return The code. + */ + public com.google.protobuf.ByteString getCode() { + return code_; + } + + public static final int KEYS_FIELD_NUMBER = 4; + private java.util.List keys_; + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public java.util.List getKeysList() { + return keys_; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public java.util.List + getKeysOrBuilderList() { + return keys_; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public int getKeysCount() { + return keys_.size(); + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKey getKeys(int index) { + return keys_.get(index); + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKeyOrBuilder getKeysOrBuilder( + int index) { + return keys_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!address_.isEmpty()) { + output.writeBytes(1, address_); + } + if (balance_ != 0L) { + output.writeUInt64(2, balance_); + } + if (!code_.isEmpty()) { + output.writeBytes(3, code_); + } + for (int i = 0; i < keys_.size(); i++) { + output.writeMessage(4, keys_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!address_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, address_); + } + if (balance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, balance_); + } + if (!code_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, code_); + } + for (int i = 0; i < keys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, keys_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.Account)) { + return super.equals(obj); + } + Entities.Account other = (Entities.Account) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (getBalance() + != other.getBalance()) return false; + if (!getCode() + .equals(other.getCode())) return false; + if (!getKeysList() + .equals(other.getKeysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + BALANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBalance()); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + if (getKeysCount() > 0) { + hash = (37 * hash) + KEYS_FIELD_NUMBER; + hash = (53 * hash) + getKeysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.Account parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Account parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Account parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Account parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Account parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Account parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Account parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Account 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 Entities.Account parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.Account 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 Entities.Account parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Account parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.Account prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.Account} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.Account) + Entities.AccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Account_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Account_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Account.class, Entities.Account.Builder.class); + } + + // Construct using Entities.Account.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKeysFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + address_ = com.google.protobuf.ByteString.EMPTY; + + balance_ = 0L; + + code_ = com.google.protobuf.ByteString.EMPTY; + + if (keysBuilder_ == null) { + keys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + keysBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_Account_descriptor; + } + + @Override + public Entities.Account getDefaultInstanceForType() { + return Entities.Account.getDefaultInstance(); + } + + @Override + public Entities.Account build() { + Entities.Account result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.Account buildPartial() { + Entities.Account result = new Entities.Account(this); + int from_bitField0_ = bitField0_; + result.address_ = address_; + result.balance_ = balance_; + result.code_ = code_; + if (keysBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + keys_ = java.util.Collections.unmodifiableList(keys_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.keys_ = keys_; + } else { + result.keys_ = keysBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.Account) { + return mergeFrom((Entities.Account)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.Account other) { + if (other == Entities.Account.getDefaultInstance()) return this; + if (other.getAddress() != com.google.protobuf.ByteString.EMPTY) { + setAddress(other.getAddress()); + } + if (other.getBalance() != 0L) { + setBalance(other.getBalance()); + } + if (other.getCode() != com.google.protobuf.ByteString.EMPTY) { + setCode(other.getCode()); + } + if (keysBuilder_ == null) { + if (!other.keys_.isEmpty()) { + if (keys_.isEmpty()) { + keys_ = other.keys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKeysIsMutable(); + keys_.addAll(other.keys_); + } + onChanged(); + } + } else { + if (!other.keys_.isEmpty()) { + if (keysBuilder_.isEmpty()) { + keysBuilder_.dispose(); + keysBuilder_ = null; + keys_ = other.keys_; + bitField0_ = (bitField0_ & ~0x00000001); + keysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getKeysFieldBuilder() : null; + } else { + keysBuilder_.addAllMessages(other.keys_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.Account parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.Account) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString address_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes address = 1; + * @return The address. + */ + public com.google.protobuf.ByteString getAddress() { + return address_; + } + /** + * bytes address = 1; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + * bytes address = 1; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + + private long balance_ ; + /** + * uint64 balance = 2; + * @return The balance. + */ + public long getBalance() { + return balance_; + } + /** + * uint64 balance = 2; + * @param value The balance to set. + * @return This builder for chaining. + */ + public Builder setBalance(long value) { + + balance_ = value; + onChanged(); + return this; + } + /** + * uint64 balance = 2; + * @return This builder for chaining. + */ + public Builder clearBalance() { + + balance_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString code_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes code = 3; + * @return The code. + */ + public com.google.protobuf.ByteString getCode() { + return code_; + } + /** + * bytes code = 3; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value; + onChanged(); + return this; + } + /** + * bytes code = 3; + * @return This builder for chaining. + */ + public Builder clearCode() { + + code_ = getDefaultInstance().getCode(); + onChanged(); + return this; + } + + private java.util.List keys_ = + java.util.Collections.emptyList(); + private void ensureKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + keys_ = new java.util.ArrayList(keys_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.AccountPublicKey, Entities.AccountPublicKey.Builder, Entities.AccountPublicKeyOrBuilder> keysBuilder_; + + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public java.util.List getKeysList() { + if (keysBuilder_ == null) { + return java.util.Collections.unmodifiableList(keys_); + } else { + return keysBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public int getKeysCount() { + if (keysBuilder_ == null) { + return keys_.size(); + } else { + return keysBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKey getKeys(int index) { + if (keysBuilder_ == null) { + return keys_.get(index); + } else { + return keysBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder setKeys( + int index, Entities.AccountPublicKey value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.set(index, value); + onChanged(); + } else { + keysBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder setKeys( + int index, Entities.AccountPublicKey.Builder builderForValue) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.set(index, builderForValue.build()); + onChanged(); + } else { + keysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder addKeys(Entities.AccountPublicKey value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.add(value); + onChanged(); + } else { + keysBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder addKeys( + int index, Entities.AccountPublicKey value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeysIsMutable(); + keys_.add(index, value); + onChanged(); + } else { + keysBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder addKeys( + Entities.AccountPublicKey.Builder builderForValue) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.add(builderForValue.build()); + onChanged(); + } else { + keysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder addKeys( + int index, Entities.AccountPublicKey.Builder builderForValue) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.add(index, builderForValue.build()); + onChanged(); + } else { + keysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder addAllKeys( + Iterable values) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, keys_); + onChanged(); + } else { + keysBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder clearKeys() { + if (keysBuilder_ == null) { + keys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + keysBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Builder removeKeys(int index) { + if (keysBuilder_ == null) { + ensureKeysIsMutable(); + keys_.remove(index); + onChanged(); + } else { + keysBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKey.Builder getKeysBuilder( + int index) { + return getKeysFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKeyOrBuilder getKeysOrBuilder( + int index) { + if (keysBuilder_ == null) { + return keys_.get(index); } else { + return keysBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public java.util.List + getKeysOrBuilderList() { + if (keysBuilder_ != null) { + return keysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(keys_); + } + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKey.Builder addKeysBuilder() { + return getKeysFieldBuilder().addBuilder( + Entities.AccountPublicKey.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public Entities.AccountPublicKey.Builder addKeysBuilder( + int index) { + return getKeysFieldBuilder().addBuilder( + index, Entities.AccountPublicKey.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.AccountPublicKey keys = 4; + */ + public java.util.List + getKeysBuilderList() { + return getKeysFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.AccountPublicKey, Entities.AccountPublicKey.Builder, Entities.AccountPublicKeyOrBuilder> + getKeysFieldBuilder() { + if (keysBuilder_ == null) { + keysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.AccountPublicKey, Entities.AccountPublicKey.Builder, Entities.AccountPublicKeyOrBuilder>( + keys_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + keys_ = null; + } + return keysBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.Account) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.Account) + private static final Entities.Account DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.Account(); + } + + public static Entities.Account getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public Account parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Account(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.Account getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccountPublicKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.AccountPublicKey) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes public_key = 1; + * @return The publicKey. + */ + com.google.protobuf.ByteString getPublicKey(); + + /** + * uint32 sign_algo = 2; + * @return The signAlgo. + */ + int getSignAlgo(); + + /** + * uint32 hash_algo = 3; + * @return The hashAlgo. + */ + int getHashAlgo(); + + /** + * uint32 weight = 4; + * @return The weight. + */ + int getWeight(); + } + /** + * Protobuf type {@code flow.sdk.entities.AccountPublicKey} + */ + public static final class AccountPublicKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.AccountPublicKey) + AccountPublicKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccountPublicKey.newBuilder() to construct. + private AccountPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AccountPublicKey() { + publicKey_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AccountPublicKey(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AccountPublicKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + publicKey_ = input.readBytes(); + break; + } + case 16: { + + signAlgo_ = input.readUInt32(); + break; + } + case 24: { + + hashAlgo_ = input.readUInt32(); + break; + } + case 32: { + + weight_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + 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 Entities.internal_static_flow_sdk_entities_AccountPublicKey_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_AccountPublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.AccountPublicKey.class, Entities.AccountPublicKey.Builder.class); + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString publicKey_; + /** + * bytes public_key = 1; + * @return The publicKey. + */ + public com.google.protobuf.ByteString getPublicKey() { + return publicKey_; + } + + public static final int SIGN_ALGO_FIELD_NUMBER = 2; + private int signAlgo_; + /** + * uint32 sign_algo = 2; + * @return The signAlgo. + */ + public int getSignAlgo() { + return signAlgo_; + } + + public static final int HASH_ALGO_FIELD_NUMBER = 3; + private int hashAlgo_; + /** + * uint32 hash_algo = 3; + * @return The hashAlgo. + */ + public int getHashAlgo() { + return hashAlgo_; + } + + public static final int WEIGHT_FIELD_NUMBER = 4; + private int weight_; + /** + * uint32 weight = 4; + * @return The weight. + */ + public int getWeight() { + return weight_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!publicKey_.isEmpty()) { + output.writeBytes(1, publicKey_); + } + if (signAlgo_ != 0) { + output.writeUInt32(2, signAlgo_); + } + if (hashAlgo_ != 0) { + output.writeUInt32(3, hashAlgo_); + } + if (weight_ != 0) { + output.writeUInt32(4, weight_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!publicKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, publicKey_); + } + if (signAlgo_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, signAlgo_); + } + if (hashAlgo_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, hashAlgo_); + } + if (weight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, weight_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.AccountPublicKey)) { + return super.equals(obj); + } + Entities.AccountPublicKey other = (Entities.AccountPublicKey) obj; + + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (getSignAlgo() + != other.getSignAlgo()) return false; + if (getHashAlgo() + != other.getHashAlgo()) return false; + if (getWeight() + != other.getWeight()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + SIGN_ALGO_FIELD_NUMBER; + hash = (53 * hash) + getSignAlgo(); + hash = (37 * hash) + HASH_ALGO_FIELD_NUMBER; + hash = (53 * hash) + getHashAlgo(); + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.AccountPublicKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.AccountPublicKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.AccountPublicKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.AccountPublicKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.AccountPublicKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.AccountPublicKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.AccountPublicKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.AccountPublicKey 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 Entities.AccountPublicKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.AccountPublicKey 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 Entities.AccountPublicKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.AccountPublicKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.AccountPublicKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.AccountPublicKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.AccountPublicKey) + Entities.AccountPublicKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_AccountPublicKey_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_AccountPublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.AccountPublicKey.class, Entities.AccountPublicKey.Builder.class); + } + + // Construct using Entities.AccountPublicKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + publicKey_ = com.google.protobuf.ByteString.EMPTY; + + signAlgo_ = 0; + + hashAlgo_ = 0; + + weight_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_AccountPublicKey_descriptor; + } + + @Override + public Entities.AccountPublicKey getDefaultInstanceForType() { + return Entities.AccountPublicKey.getDefaultInstance(); + } + + @Override + public Entities.AccountPublicKey build() { + Entities.AccountPublicKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.AccountPublicKey buildPartial() { + Entities.AccountPublicKey result = new Entities.AccountPublicKey(this); + result.publicKey_ = publicKey_; + result.signAlgo_ = signAlgo_; + result.hashAlgo_ = hashAlgo_; + result.weight_ = weight_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.AccountPublicKey) { + return mergeFrom((Entities.AccountPublicKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.AccountPublicKey other) { + if (other == Entities.AccountPublicKey.getDefaultInstance()) return this; + if (other.getPublicKey() != com.google.protobuf.ByteString.EMPTY) { + setPublicKey(other.getPublicKey()); + } + if (other.getSignAlgo() != 0) { + setSignAlgo(other.getSignAlgo()); + } + if (other.getHashAlgo() != 0) { + setHashAlgo(other.getHashAlgo()); + } + if (other.getWeight() != 0) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.AccountPublicKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.AccountPublicKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString publicKey_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes public_key = 1; + * @return The publicKey. + */ + public com.google.protobuf.ByteString getPublicKey() { + return publicKey_; + } + /** + * bytes public_key = 1; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + * bytes public_key = 1; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + + private int signAlgo_ ; + /** + * uint32 sign_algo = 2; + * @return The signAlgo. + */ + public int getSignAlgo() { + return signAlgo_; + } + /** + * uint32 sign_algo = 2; + * @param value The signAlgo to set. + * @return This builder for chaining. + */ + public Builder setSignAlgo(int value) { + + signAlgo_ = value; + onChanged(); + return this; + } + /** + * uint32 sign_algo = 2; + * @return This builder for chaining. + */ + public Builder clearSignAlgo() { + + signAlgo_ = 0; + onChanged(); + return this; + } + + private int hashAlgo_ ; + /** + * uint32 hash_algo = 3; + * @return The hashAlgo. + */ + public int getHashAlgo() { + return hashAlgo_; + } + /** + * uint32 hash_algo = 3; + * @param value The hashAlgo to set. + * @return This builder for chaining. + */ + public Builder setHashAlgo(int value) { + + hashAlgo_ = value; + onChanged(); + return this; + } + /** + * uint32 hash_algo = 3; + * @return This builder for chaining. + */ + public Builder clearHashAlgo() { + + hashAlgo_ = 0; + onChanged(); + return this; + } + + private int weight_ ; + /** + * uint32 weight = 4; + * @return The weight. + */ + public int getWeight() { + return weight_; + } + /** + * uint32 weight = 4; + * @param value The weight to set. + * @return This builder for chaining. + */ + public Builder setWeight(int value) { + + weight_ = value; + onChanged(); + return this; + } + /** + * uint32 weight = 4; + * @return This builder for chaining. + */ + public Builder clearWeight() { + + weight_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.AccountPublicKey) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.AccountPublicKey) + private static final Entities.AccountPublicKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.AccountPublicKey(); + } + + public static Entities.AccountPublicKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AccountPublicKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccountPublicKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.AccountPublicKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.sdk.entities.Event) + com.google.protobuf.MessageOrBuilder { + + /** + * string type = 1; + * @return The type. + */ + String getType(); + /** + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * bytes transaction_id = 2; + * @return The transactionId. + */ + com.google.protobuf.ByteString getTransactionId(); + + /** + * uint32 index = 3; + * @return The index. + */ + int getIndex(); + + /** + * bytes payload = 4; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + } + /** + * Protobuf type {@code flow.sdk.entities.Event} + */ + public static final class Event extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.sdk.entities.Event) + EventOrBuilder { + private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Event() { + type_ = ""; + transactionId_ = com.google.protobuf.ByteString.EMPTY; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new Event(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Event( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 18: { + + transactionId_ = input.readBytes(); + break; + } + case 24: { + + index_ = input.readUInt32(); + break; + } + case 34: { + + payload_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Entities.internal_static_flow_sdk_entities_Event_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Event.class, Entities.Event.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile Object type_; + /** + * string type = 1; + * @return The type. + */ + public String getType() { + Object ref = type_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString transactionId_; + /** + * bytes transaction_id = 2; + * @return The transactionId. + */ + public com.google.protobuf.ByteString getTransactionId() { + return transactionId_; + } + + public static final int INDEX_FIELD_NUMBER = 3; + private int index_; + /** + * uint32 index = 3; + * @return The index. + */ + public int getIndex() { + return index_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString payload_; + /** + * bytes payload = 4; + * @return The payload. + */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!transactionId_.isEmpty()) { + output.writeBytes(2, transactionId_); + } + if (index_ != 0) { + output.writeUInt32(3, index_); + } + if (!payload_.isEmpty()) { + output.writeBytes(4, payload_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!transactionId_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, transactionId_); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, index_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, payload_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Entities.Event)) { + return super.equals(obj); + } + Entities.Event other = (Entities.Event) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (getIndex() + != other.getIndex()) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @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) + getType().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Entities.Event parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Event parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Entities.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Entities.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Event 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 Entities.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Entities.Event 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 Entities.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Entities.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Entities.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.sdk.entities.Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.sdk.entities.Event) + Entities.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Entities.internal_static_flow_sdk_entities_Event_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Entities.internal_static_flow_sdk_entities_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Entities.Event.class, Entities.Event.Builder.class); + } + + // Construct using Entities.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + type_ = ""; + + transactionId_ = com.google.protobuf.ByteString.EMPTY; + + index_ = 0; + + payload_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Entities.internal_static_flow_sdk_entities_Event_descriptor; + } + + @Override + public Entities.Event getDefaultInstanceForType() { + return Entities.Event.getDefaultInstance(); + } + + @Override + public Entities.Event build() { + Entities.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Entities.Event buildPartial() { + Entities.Event result = new Entities.Event(this); + result.type_ = type_; + result.transactionId_ = transactionId_; + result.index_ = index_; + result.payload_ = payload_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Entities.Event) { + return mergeFrom((Entities.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Entities.Event other) { + if (other == Entities.Event.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.getTransactionId() != com.google.protobuf.ByteString.EMPTY) { + setTransactionId(other.getTransactionId()); + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Entities.Event parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Entities.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Object type_ = ""; + /** + * string type = 1; + * @return The type. + */ + public String getType() { + Object ref = type_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString transactionId_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes transaction_id = 2; + * @return The transactionId. + */ + public com.google.protobuf.ByteString getTransactionId() { + return transactionId_; + } + /** + * bytes transaction_id = 2; + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionId_ = value; + onChanged(); + return this; + } + /** + * bytes transaction_id = 2; + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + + private int index_ ; + /** + * uint32 index = 3; + * @return The index. + */ + public int getIndex() { + return index_; + } + /** + * uint32 index = 3; + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + onChanged(); + return this; + } + /** + * uint32 index = 3; + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 4; + * @return The payload. + */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 4; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + payload_ = value; + onChanged(); + return this; + } + /** + * bytes payload = 4; + * @return This builder for chaining. + */ + public Builder clearPayload() { + + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.sdk.entities.Event) + } + + // @@protoc_insertion_point(class_scope:flow.sdk.entities.Event) + private static final Entities.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Entities.Event(); + } + + public static Entities.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Event(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Entities.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_BlockHeader_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_BlockHeader_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_Block_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_Block_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_BlockSeal_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_BlockSeal_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_AccountSignature_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_AccountSignature_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_Transaction_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_Transaction_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_Collection_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_Collection_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_CollectionGuarantee_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_CollectionGuarantee_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_Account_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_Account_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_AccountPublicKey_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_AccountPublicKey_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_sdk_entities_Event_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_sdk_entities_Event_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\033sdk/entities/entities.proto\022\021flow.sdk." + + "entities\032\037google/protobuf/timestamp.prot" + + "o\"<\n\013BlockHeader\022\n\n\002id\030\001 \001(\014\022\021\n\tparent_i" + + "d\030\002 \001(\014\022\016\n\006height\030\003 \001(\004\"\347\001\n\005Block\022\016\n\006hei" + + "ght\030\001 \001(\004\022\021\n\tparent_id\030\002 \001(\014\022-\n\ttimestam" + + "p\030\003 \001(\0132\032.google.protobuf.Timestamp\022E\n\025c" + + "ollection_guarantees\030\004 \003(\0132&.flow.sdk.en" + + "tities.CollectionGuarantee\0221\n\013block_seal" + + "s\030\005 \003(\0132\034.flow.sdk.entities.BlockSeal\022\022\n" + + "\nsignatures\030\006 \003(\014\"\205\001\n\tBlockSeal\022\020\n\010block" + + "_id\030\001 \001(\014\022\034\n\024execution_receipt_id\030\002 \001(\014\022" + + "$\n\034execution_receipt_signatures\030\003 \003(\014\022\"\n" + + "\032result_approval_signatures\030\004 \003(\014\"6\n\020Acc" + + "ountSignature\022\017\n\007account\030\001 \001(\014\022\021\n\tsignat" + + "ure\030\002 \001(\014\"\330\001\n\013Transaction\022\016\n\006script\030\001 \001(" + + "\014\022\032\n\022reference_block_id\030\002 \001(\014\022\025\n\rpayer_a" + + "ccount\030\003 \001(\014\022\027\n\017script_accounts\030\004 \003(\014\0227\n" + + "\nsignatures\030\005 \003(\0132#.flow.sdk.entities.Ac" + + "countSignature\0224\n\006status\030\006 \001(\0162$.flow.sd" + + "k.entities.TransactionStatus\"B\n\nCollecti" + + "on\0224\n\014transactions\030\001 \003(\0132\036.flow.sdk.enti" + + "ties.Transaction\"A\n\023CollectionGuarantee\022" + + "\026\n\016collectionHash\030\001 \001(\014\022\022\n\nsignatures\030\002 " + + "\003(\014\"l\n\007Account\022\017\n\007address\030\001 \001(\014\022\017\n\007balan" + + "ce\030\002 \001(\004\022\014\n\004code\030\003 \001(\014\0221\n\004keys\030\004 \003(\0132#.f" + + "low.sdk.entities.AccountPublicKey\"\\\n\020Acc" + + "ountPublicKey\022\022\n\npublic_key\030\001 \001(\014\022\021\n\tsig" + + "n_algo\030\002 \001(\r\022\021\n\thash_algo\030\003 \001(\r\022\016\n\006weigh" + + "t\030\004 \001(\r\"M\n\005Event\022\014\n\004type\030\001 \001(\t\022\026\n\016transa" + + "ction_id\030\002 \001(\014\022\r\n\005index\030\003 \001(\r\022\017\n\007payload" + + "\030\004 \001(\014*y\n\021TransactionStatus\022\022\n\016STATUS_UN" + + "KNOWN\020\000\022\022\n\016STATUS_PENDING\020\001\022\024\n\020STATUS_FI" + + "NALIZED\020\002\022\023\n\017STATUS_EXECUTED\020\003\022\021\n\rSTATUS" + + "_SEALED\020\004B\nZ\010entitiesb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_flow_sdk_entities_BlockHeader_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_flow_sdk_entities_BlockHeader_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_BlockHeader_descriptor, + new String[] { "Id", "ParentId", "Height", }); + internal_static_flow_sdk_entities_Block_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_flow_sdk_entities_Block_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_Block_descriptor, + new String[] { "Height", "ParentId", "Timestamp", "CollectionGuarantees", "BlockSeals", "Signatures", }); + internal_static_flow_sdk_entities_BlockSeal_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_flow_sdk_entities_BlockSeal_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_BlockSeal_descriptor, + new String[] { "BlockId", "ExecutionReceiptId", "ExecutionReceiptSignatures", "ResultApprovalSignatures", }); + internal_static_flow_sdk_entities_AccountSignature_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_flow_sdk_entities_AccountSignature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_AccountSignature_descriptor, + new String[] { "Account", "Signature", }); + internal_static_flow_sdk_entities_Transaction_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_flow_sdk_entities_Transaction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_Transaction_descriptor, + new String[] { "Script", "ReferenceBlockId", "PayerAccount", "ScriptAccounts", "Signatures", "Status", }); + internal_static_flow_sdk_entities_Collection_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_flow_sdk_entities_Collection_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_Collection_descriptor, + new String[] { "Transactions", }); + internal_static_flow_sdk_entities_CollectionGuarantee_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_flow_sdk_entities_CollectionGuarantee_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_CollectionGuarantee_descriptor, + new String[] { "CollectionHash", "Signatures", }); + internal_static_flow_sdk_entities_Account_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_flow_sdk_entities_Account_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_Account_descriptor, + new String[] { "Address", "Balance", "Code", "Keys", }); + internal_static_flow_sdk_entities_AccountPublicKey_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_flow_sdk_entities_AccountPublicKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_AccountPublicKey_descriptor, + new String[] { "PublicKey", "SignAlgo", "HashAlgo", "Weight", }); + internal_static_flow_sdk_entities_Event_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_flow_sdk_entities_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_sdk_entities_Event_descriptor, + new String[] { "Type", "TransactionId", "Index", "Payload", }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/app/src/main/java/com/tangem/wallet/flowDemo/proto/Observation.java b/app/src/main/java/com/tangem/wallet/flowDemo/proto/Observation.java new file mode 100644 index 0000000000..0de3dfa975 --- /dev/null +++ b/app/src/main/java/com/tangem/wallet/flowDemo/proto/Observation.java @@ -0,0 +1,13161 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: services/observation/observation.proto + +package com.tangem.wallet.flowDemo.proto; + +public final class Observation { + private Observation() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PingRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.PingRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code flow.services.observation.PingRequest} + */ + public static final class PingRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.PingRequest) + PingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PingRequest.newBuilder() to construct. + private PingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PingRequest() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new PingRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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; + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_PingRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_PingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.PingRequest.class, Observation.PingRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.PingRequest)) { + return super.equals(obj); + } + Observation.PingRequest other = (Observation.PingRequest) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.PingRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.PingRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.PingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.PingRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.PingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.PingRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.PingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.PingRequest 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 Observation.PingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.PingRequest 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 Observation.PingRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.PingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.PingRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.PingRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.PingRequest) + Observation.PingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_PingRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_PingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.PingRequest.class, Observation.PingRequest.Builder.class); + } + + // Construct using Observation.PingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_PingRequest_descriptor; + } + + @Override + public Observation.PingRequest getDefaultInstanceForType() { + return Observation.PingRequest.getDefaultInstance(); + } + + @Override + public Observation.PingRequest build() { + Observation.PingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.PingRequest buildPartial() { + Observation.PingRequest result = new Observation.PingRequest(this); + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.PingRequest) { + return mergeFrom((Observation.PingRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.PingRequest other) { + if (other == Observation.PingRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.PingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.PingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.PingRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.PingRequest) + private static final Observation.PingRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.PingRequest(); + } + + public static Observation.PingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public PingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PingRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.PingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.PingResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code flow.services.observation.PingResponse} + */ + public static final class PingResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.PingResponse) + PingResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PingResponse.newBuilder() to construct. + private PingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PingResponse() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new PingResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PingResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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; + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_PingResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_PingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.PingResponse.class, Observation.PingResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.PingResponse)) { + return super.equals(obj); + } + Observation.PingResponse other = (Observation.PingResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.PingResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.PingResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.PingResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.PingResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.PingResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.PingResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.PingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.PingResponse 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 Observation.PingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.PingResponse 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 Observation.PingResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.PingResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.PingResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.PingResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.PingResponse) + Observation.PingResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_PingResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_PingResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.PingResponse.class, Observation.PingResponse.Builder.class); + } + + // Construct using Observation.PingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_PingResponse_descriptor; + } + + @Override + public Observation.PingResponse getDefaultInstanceForType() { + return Observation.PingResponse.getDefaultInstance(); + } + + @Override + public Observation.PingResponse build() { + Observation.PingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.PingResponse buildPartial() { + Observation.PingResponse result = new Observation.PingResponse(this); + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.PingResponse) { + return mergeFrom((Observation.PingResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.PingResponse other) { + if (other == Observation.PingResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.PingResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.PingResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.PingResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.PingResponse) + private static final Observation.PingResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.PingResponse(); + } + + public static Observation.PingResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public PingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PingResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.PingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetLatestBlockHeaderRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetLatestBlockHeaderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bool is_sealed = 1; + * @return The isSealed. + */ + boolean getIsSealed(); + } + /** + * Protobuf type {@code flow.services.observation.GetLatestBlockHeaderRequest} + */ + public static final class GetLatestBlockHeaderRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetLatestBlockHeaderRequest) + GetLatestBlockHeaderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetLatestBlockHeaderRequest.newBuilder() to construct. + private GetLatestBlockHeaderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetLatestBlockHeaderRequest() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetLatestBlockHeaderRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLatestBlockHeaderRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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 8: { + + isSealed_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetLatestBlockHeaderRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetLatestBlockHeaderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetLatestBlockHeaderRequest.class, Observation.GetLatestBlockHeaderRequest.Builder.class); + } + + public static final int IS_SEALED_FIELD_NUMBER = 1; + private boolean isSealed_; + /** + * bool is_sealed = 1; + * @return The isSealed. + */ + public boolean getIsSealed() { + return isSealed_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (isSealed_ != false) { + output.writeBool(1, isSealed_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isSealed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isSealed_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetLatestBlockHeaderRequest)) { + return super.equals(obj); + } + Observation.GetLatestBlockHeaderRequest other = (Observation.GetLatestBlockHeaderRequest) obj; + + if (getIsSealed() + != other.getIsSealed()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_SEALED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsSealed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetLatestBlockHeaderRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetLatestBlockHeaderRequest 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 Observation.GetLatestBlockHeaderRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetLatestBlockHeaderRequest 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 Observation.GetLatestBlockHeaderRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetLatestBlockHeaderRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetLatestBlockHeaderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetLatestBlockHeaderRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetLatestBlockHeaderRequest) + Observation.GetLatestBlockHeaderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetLatestBlockHeaderRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetLatestBlockHeaderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetLatestBlockHeaderRequest.class, Observation.GetLatestBlockHeaderRequest.Builder.class); + } + + // Construct using Observation.GetLatestBlockHeaderRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + isSealed_ = false; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetLatestBlockHeaderRequest_descriptor; + } + + @Override + public Observation.GetLatestBlockHeaderRequest getDefaultInstanceForType() { + return Observation.GetLatestBlockHeaderRequest.getDefaultInstance(); + } + + @Override + public Observation.GetLatestBlockHeaderRequest build() { + Observation.GetLatestBlockHeaderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetLatestBlockHeaderRequest buildPartial() { + Observation.GetLatestBlockHeaderRequest result = new Observation.GetLatestBlockHeaderRequest(this); + result.isSealed_ = isSealed_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetLatestBlockHeaderRequest) { + return mergeFrom((Observation.GetLatestBlockHeaderRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetLatestBlockHeaderRequest other) { + if (other == Observation.GetLatestBlockHeaderRequest.getDefaultInstance()) return this; + if (other.getIsSealed() != false) { + setIsSealed(other.getIsSealed()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetLatestBlockHeaderRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetLatestBlockHeaderRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean isSealed_ ; + /** + * bool is_sealed = 1; + * @return The isSealed. + */ + public boolean getIsSealed() { + return isSealed_; + } + /** + * bool is_sealed = 1; + * @param value The isSealed to set. + * @return This builder for chaining. + */ + public Builder setIsSealed(boolean value) { + + isSealed_ = value; + onChanged(); + return this; + } + /** + * bool is_sealed = 1; + * @return This builder for chaining. + */ + public Builder clearIsSealed() { + + isSealed_ = false; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetLatestBlockHeaderRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetLatestBlockHeaderRequest) + private static final Observation.GetLatestBlockHeaderRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetLatestBlockHeaderRequest(); + } + + public static Observation.GetLatestBlockHeaderRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetLatestBlockHeaderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLatestBlockHeaderRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetLatestBlockHeaderRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockHeaderByIDRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetBlockHeaderByIDRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes id = 1; + * @return The id. + */ + com.google.protobuf.ByteString getId(); + } + /** + * Protobuf type {@code flow.services.observation.GetBlockHeaderByIDRequest} + */ + public static final class GetBlockHeaderByIDRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetBlockHeaderByIDRequest) + GetBlockHeaderByIDRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockHeaderByIDRequest.newBuilder() to construct. + private GetBlockHeaderByIDRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockHeaderByIDRequest() { + id_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockHeaderByIDRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetBlockHeaderByIDRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + id_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetBlockHeaderByIDRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByIDRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockHeaderByIDRequest.class, Observation.GetBlockHeaderByIDRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString id_; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!id_.isEmpty()) { + output.writeBytes(1, id_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!id_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetBlockHeaderByIDRequest)) { + return super.equals(obj); + } + Observation.GetBlockHeaderByIDRequest other = (Observation.GetBlockHeaderByIDRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetBlockHeaderByIDRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockHeaderByIDRequest 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 Observation.GetBlockHeaderByIDRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetBlockHeaderByIDRequest 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 Observation.GetBlockHeaderByIDRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockHeaderByIDRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetBlockHeaderByIDRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetBlockHeaderByIDRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetBlockHeaderByIDRequest) + Observation.GetBlockHeaderByIDRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByIDRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByIDRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockHeaderByIDRequest.class, Observation.GetBlockHeaderByIDRequest.Builder.class); + } + + // Construct using Observation.GetBlockHeaderByIDRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByIDRequest_descriptor; + } + + @Override + public Observation.GetBlockHeaderByIDRequest getDefaultInstanceForType() { + return Observation.GetBlockHeaderByIDRequest.getDefaultInstance(); + } + + @Override + public Observation.GetBlockHeaderByIDRequest build() { + Observation.GetBlockHeaderByIDRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetBlockHeaderByIDRequest buildPartial() { + Observation.GetBlockHeaderByIDRequest result = new Observation.GetBlockHeaderByIDRequest(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetBlockHeaderByIDRequest) { + return mergeFrom((Observation.GetBlockHeaderByIDRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetBlockHeaderByIDRequest other) { + if (other == Observation.GetBlockHeaderByIDRequest.getDefaultInstance()) return this; + if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + setId(other.getId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetBlockHeaderByIDRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetBlockHeaderByIDRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + /** + * bytes id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * bytes id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetBlockHeaderByIDRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetBlockHeaderByIDRequest) + private static final Observation.GetBlockHeaderByIDRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetBlockHeaderByIDRequest(); + } + + public static Observation.GetBlockHeaderByIDRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetBlockHeaderByIDRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetBlockHeaderByIDRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetBlockHeaderByIDRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockHeaderByHeightRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetBlockHeaderByHeightRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 height = 1; + * @return The height. + */ + long getHeight(); + } + /** + * Protobuf type {@code flow.services.observation.GetBlockHeaderByHeightRequest} + */ + public static final class GetBlockHeaderByHeightRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetBlockHeaderByHeightRequest) + GetBlockHeaderByHeightRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockHeaderByHeightRequest.newBuilder() to construct. + private GetBlockHeaderByHeightRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockHeaderByHeightRequest() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockHeaderByHeightRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetBlockHeaderByHeightRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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 8: { + + height_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockHeaderByHeightRequest.class, Observation.GetBlockHeaderByHeightRequest.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private long height_; + /** + * uint64 height = 1; + * @return The height. + */ + public long getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0L) { + output.writeUInt64(1, height_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, height_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetBlockHeaderByHeightRequest)) { + return super.equals(obj); + } + Observation.GetBlockHeaderByHeightRequest other = (Observation.GetBlockHeaderByHeightRequest) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeight()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetBlockHeaderByHeightRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockHeaderByHeightRequest 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 Observation.GetBlockHeaderByHeightRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetBlockHeaderByHeightRequest 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 Observation.GetBlockHeaderByHeightRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockHeaderByHeightRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetBlockHeaderByHeightRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetBlockHeaderByHeightRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetBlockHeaderByHeightRequest) + Observation.GetBlockHeaderByHeightRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockHeaderByHeightRequest.class, Observation.GetBlockHeaderByHeightRequest.Builder.class); + } + + // Construct using Observation.GetBlockHeaderByHeightRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + height_ = 0L; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_descriptor; + } + + @Override + public Observation.GetBlockHeaderByHeightRequest getDefaultInstanceForType() { + return Observation.GetBlockHeaderByHeightRequest.getDefaultInstance(); + } + + @Override + public Observation.GetBlockHeaderByHeightRequest build() { + Observation.GetBlockHeaderByHeightRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetBlockHeaderByHeightRequest buildPartial() { + Observation.GetBlockHeaderByHeightRequest result = new Observation.GetBlockHeaderByHeightRequest(this); + result.height_ = height_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetBlockHeaderByHeightRequest) { + return mergeFrom((Observation.GetBlockHeaderByHeightRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetBlockHeaderByHeightRequest other) { + if (other == Observation.GetBlockHeaderByHeightRequest.getDefaultInstance()) return this; + if (other.getHeight() != 0L) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetBlockHeaderByHeightRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetBlockHeaderByHeightRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long height_ ; + /** + * uint64 height = 1; + * @return The height. + */ + public long getHeight() { + return height_; + } + /** + * uint64 height = 1; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + + height_ = value; + onChanged(); + return this; + } + /** + * uint64 height = 1; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0L; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetBlockHeaderByHeightRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetBlockHeaderByHeightRequest) + private static final Observation.GetBlockHeaderByHeightRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetBlockHeaderByHeightRequest(); + } + + public static Observation.GetBlockHeaderByHeightRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetBlockHeaderByHeightRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetBlockHeaderByHeightRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetBlockHeaderByHeightRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockHeaderResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.BlockHeaderResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.BlockHeader block = 1; + * @return Whether the block field is set. + */ + boolean hasBlock(); + /** + * .flow.sdk.entities.BlockHeader block = 1; + * @return The block. + */ + Entities.BlockHeader getBlock(); + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + Entities.BlockHeaderOrBuilder getBlockOrBuilder(); + } + /** + * Protobuf type {@code flow.services.observation.BlockHeaderResponse} + */ + public static final class BlockHeaderResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.BlockHeaderResponse) + BlockHeaderResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockHeaderResponse.newBuilder() to construct. + private BlockHeaderResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockHeaderResponse() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BlockHeaderResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BlockHeaderResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + Entities.BlockHeader.Builder subBuilder = null; + if (block_ != null) { + subBuilder = block_.toBuilder(); + } + block_ = input.readMessage(Entities.BlockHeader.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(block_); + block_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_BlockHeaderResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_BlockHeaderResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.BlockHeaderResponse.class, Observation.BlockHeaderResponse.Builder.class); + } + + public static final int BLOCK_FIELD_NUMBER = 1; + private Entities.BlockHeader block_; + /** + * .flow.sdk.entities.BlockHeader block = 1; + * @return Whether the block field is set. + */ + public boolean hasBlock() { + return block_ != null; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + * @return The block. + */ + public Entities.BlockHeader getBlock() { + return block_ == null ? Entities.BlockHeader.getDefaultInstance() : block_; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Entities.BlockHeaderOrBuilder getBlockOrBuilder() { + return getBlock(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (block_ != null) { + output.writeMessage(1, getBlock()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (block_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBlock()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.BlockHeaderResponse)) { + return super.equals(obj); + } + Observation.BlockHeaderResponse other = (Observation.BlockHeaderResponse) obj; + + if (hasBlock() != other.hasBlock()) return false; + if (hasBlock()) { + if (!getBlock() + .equals(other.getBlock())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBlock()) { + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.BlockHeaderResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.BlockHeaderResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.BlockHeaderResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.BlockHeaderResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.BlockHeaderResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.BlockHeaderResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.BlockHeaderResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.BlockHeaderResponse 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 Observation.BlockHeaderResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.BlockHeaderResponse 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 Observation.BlockHeaderResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.BlockHeaderResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.BlockHeaderResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.BlockHeaderResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.BlockHeaderResponse) + Observation.BlockHeaderResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_BlockHeaderResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_BlockHeaderResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.BlockHeaderResponse.class, Observation.BlockHeaderResponse.Builder.class); + } + + // Construct using Observation.BlockHeaderResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (blockBuilder_ == null) { + block_ = null; + } else { + block_ = null; + blockBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_BlockHeaderResponse_descriptor; + } + + @Override + public Observation.BlockHeaderResponse getDefaultInstanceForType() { + return Observation.BlockHeaderResponse.getDefaultInstance(); + } + + @Override + public Observation.BlockHeaderResponse build() { + Observation.BlockHeaderResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.BlockHeaderResponse buildPartial() { + Observation.BlockHeaderResponse result = new Observation.BlockHeaderResponse(this); + if (blockBuilder_ == null) { + result.block_ = block_; + } else { + result.block_ = blockBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.BlockHeaderResponse) { + return mergeFrom((Observation.BlockHeaderResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.BlockHeaderResponse other) { + if (other == Observation.BlockHeaderResponse.getDefaultInstance()) return this; + if (other.hasBlock()) { + mergeBlock(other.getBlock()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.BlockHeaderResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.BlockHeaderResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Entities.BlockHeader block_; + private com.google.protobuf.SingleFieldBuilderV3< + Entities.BlockHeader, Entities.BlockHeader.Builder, Entities.BlockHeaderOrBuilder> blockBuilder_; + /** + * .flow.sdk.entities.BlockHeader block = 1; + * @return Whether the block field is set. + */ + public boolean hasBlock() { + return blockBuilder_ != null || block_ != null; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + * @return The block. + */ + public Entities.BlockHeader getBlock() { + if (blockBuilder_ == null) { + return block_ == null ? Entities.BlockHeader.getDefaultInstance() : block_; + } else { + return blockBuilder_.getMessage(); + } + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Builder setBlock(Entities.BlockHeader value) { + if (blockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + blockBuilder_.setMessage(value); + } + + return this; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Builder setBlock( + Entities.BlockHeader.Builder builderForValue) { + if (blockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + blockBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Builder mergeBlock(Entities.BlockHeader value) { + if (blockBuilder_ == null) { + if (block_ != null) { + block_ = + Entities.BlockHeader.newBuilder(block_).mergeFrom(value).buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + blockBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Builder clearBlock() { + if (blockBuilder_ == null) { + block_ = null; + onChanged(); + } else { + block_ = null; + blockBuilder_ = null; + } + + return this; + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Entities.BlockHeader.Builder getBlockBuilder() { + + onChanged(); + return getBlockFieldBuilder().getBuilder(); + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + public Entities.BlockHeaderOrBuilder getBlockOrBuilder() { + if (blockBuilder_ != null) { + return blockBuilder_.getMessageOrBuilder(); + } else { + return block_ == null ? + Entities.BlockHeader.getDefaultInstance() : block_; + } + } + /** + * .flow.sdk.entities.BlockHeader block = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Entities.BlockHeader, Entities.BlockHeader.Builder, Entities.BlockHeaderOrBuilder> + getBlockFieldBuilder() { + if (blockBuilder_ == null) { + blockBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + Entities.BlockHeader, Entities.BlockHeader.Builder, Entities.BlockHeaderOrBuilder>( + getBlock(), + getParentForChildren(), + isClean()); + block_ = null; + } + return blockBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.BlockHeaderResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.BlockHeaderResponse) + private static final Observation.BlockHeaderResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.BlockHeaderResponse(); + } + + public static Observation.BlockHeaderResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BlockHeaderResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BlockHeaderResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.BlockHeaderResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetLatestBlockRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetLatestBlockRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bool is_sealed = 1; + * @return The isSealed. + */ + boolean getIsSealed(); + } + /** + * Protobuf type {@code flow.services.observation.GetLatestBlockRequest} + */ + public static final class GetLatestBlockRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetLatestBlockRequest) + GetLatestBlockRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetLatestBlockRequest.newBuilder() to construct. + private GetLatestBlockRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetLatestBlockRequest() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetLatestBlockRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLatestBlockRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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 8: { + + isSealed_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetLatestBlockRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetLatestBlockRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetLatestBlockRequest.class, Observation.GetLatestBlockRequest.Builder.class); + } + + public static final int IS_SEALED_FIELD_NUMBER = 1; + private boolean isSealed_; + /** + * bool is_sealed = 1; + * @return The isSealed. + */ + public boolean getIsSealed() { + return isSealed_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (isSealed_ != false) { + output.writeBool(1, isSealed_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isSealed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isSealed_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetLatestBlockRequest)) { + return super.equals(obj); + } + Observation.GetLatestBlockRequest other = (Observation.GetLatestBlockRequest) obj; + + if (getIsSealed() + != other.getIsSealed()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_SEALED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsSealed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetLatestBlockRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetLatestBlockRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetLatestBlockRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetLatestBlockRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetLatestBlockRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetLatestBlockRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetLatestBlockRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetLatestBlockRequest 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 Observation.GetLatestBlockRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetLatestBlockRequest 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 Observation.GetLatestBlockRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetLatestBlockRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetLatestBlockRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetLatestBlockRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetLatestBlockRequest) + Observation.GetLatestBlockRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetLatestBlockRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetLatestBlockRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetLatestBlockRequest.class, Observation.GetLatestBlockRequest.Builder.class); + } + + // Construct using Observation.GetLatestBlockRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + isSealed_ = false; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetLatestBlockRequest_descriptor; + } + + @Override + public Observation.GetLatestBlockRequest getDefaultInstanceForType() { + return Observation.GetLatestBlockRequest.getDefaultInstance(); + } + + @Override + public Observation.GetLatestBlockRequest build() { + Observation.GetLatestBlockRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetLatestBlockRequest buildPartial() { + Observation.GetLatestBlockRequest result = new Observation.GetLatestBlockRequest(this); + result.isSealed_ = isSealed_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetLatestBlockRequest) { + return mergeFrom((Observation.GetLatestBlockRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetLatestBlockRequest other) { + if (other == Observation.GetLatestBlockRequest.getDefaultInstance()) return this; + if (other.getIsSealed() != false) { + setIsSealed(other.getIsSealed()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetLatestBlockRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetLatestBlockRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean isSealed_ ; + /** + * bool is_sealed = 1; + * @return The isSealed. + */ + public boolean getIsSealed() { + return isSealed_; + } + /** + * bool is_sealed = 1; + * @param value The isSealed to set. + * @return This builder for chaining. + */ + public Builder setIsSealed(boolean value) { + + isSealed_ = value; + onChanged(); + return this; + } + /** + * bool is_sealed = 1; + * @return This builder for chaining. + */ + public Builder clearIsSealed() { + + isSealed_ = false; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetLatestBlockRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetLatestBlockRequest) + private static final Observation.GetLatestBlockRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetLatestBlockRequest(); + } + + public static Observation.GetLatestBlockRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetLatestBlockRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLatestBlockRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetLatestBlockRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockByIDRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetBlockByIDRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes id = 1; + * @return The id. + */ + com.google.protobuf.ByteString getId(); + } + /** + * Protobuf type {@code flow.services.observation.GetBlockByIDRequest} + */ + public static final class GetBlockByIDRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetBlockByIDRequest) + GetBlockByIDRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockByIDRequest.newBuilder() to construct. + private GetBlockByIDRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockByIDRequest() { + id_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockByIDRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetBlockByIDRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + id_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetBlockByIDRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockByIDRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockByIDRequest.class, Observation.GetBlockByIDRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString id_; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!id_.isEmpty()) { + output.writeBytes(1, id_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!id_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetBlockByIDRequest)) { + return super.equals(obj); + } + Observation.GetBlockByIDRequest other = (Observation.GetBlockByIDRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetBlockByIDRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockByIDRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockByIDRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockByIDRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockByIDRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockByIDRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockByIDRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockByIDRequest 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 Observation.GetBlockByIDRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetBlockByIDRequest 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 Observation.GetBlockByIDRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockByIDRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetBlockByIDRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetBlockByIDRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetBlockByIDRequest) + Observation.GetBlockByIDRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetBlockByIDRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockByIDRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockByIDRequest.class, Observation.GetBlockByIDRequest.Builder.class); + } + + // Construct using Observation.GetBlockByIDRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetBlockByIDRequest_descriptor; + } + + @Override + public Observation.GetBlockByIDRequest getDefaultInstanceForType() { + return Observation.GetBlockByIDRequest.getDefaultInstance(); + } + + @Override + public Observation.GetBlockByIDRequest build() { + Observation.GetBlockByIDRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetBlockByIDRequest buildPartial() { + Observation.GetBlockByIDRequest result = new Observation.GetBlockByIDRequest(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetBlockByIDRequest) { + return mergeFrom((Observation.GetBlockByIDRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetBlockByIDRequest other) { + if (other == Observation.GetBlockByIDRequest.getDefaultInstance()) return this; + if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + setId(other.getId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetBlockByIDRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetBlockByIDRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + /** + * bytes id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * bytes id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetBlockByIDRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetBlockByIDRequest) + private static final Observation.GetBlockByIDRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetBlockByIDRequest(); + } + + public static Observation.GetBlockByIDRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetBlockByIDRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetBlockByIDRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetBlockByIDRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockByHeightRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetBlockByHeightRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * uint64 height = 1; + * @return The height. + */ + long getHeight(); + } + /** + * Protobuf type {@code flow.services.observation.GetBlockByHeightRequest} + */ + public static final class GetBlockByHeightRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetBlockByHeightRequest) + GetBlockByHeightRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockByHeightRequest.newBuilder() to construct. + private GetBlockByHeightRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockByHeightRequest() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockByHeightRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetBlockByHeightRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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 8: { + + height_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetBlockByHeightRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockByHeightRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockByHeightRequest.class, Observation.GetBlockByHeightRequest.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private long height_; + /** + * uint64 height = 1; + * @return The height. + */ + public long getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0L) { + output.writeUInt64(1, height_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, height_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetBlockByHeightRequest)) { + return super.equals(obj); + } + Observation.GetBlockByHeightRequest other = (Observation.GetBlockByHeightRequest) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeight()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetBlockByHeightRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockByHeightRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockByHeightRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockByHeightRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockByHeightRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetBlockByHeightRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetBlockByHeightRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockByHeightRequest 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 Observation.GetBlockByHeightRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetBlockByHeightRequest 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 Observation.GetBlockByHeightRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetBlockByHeightRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetBlockByHeightRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetBlockByHeightRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetBlockByHeightRequest) + Observation.GetBlockByHeightRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetBlockByHeightRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetBlockByHeightRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetBlockByHeightRequest.class, Observation.GetBlockByHeightRequest.Builder.class); + } + + // Construct using Observation.GetBlockByHeightRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + height_ = 0L; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetBlockByHeightRequest_descriptor; + } + + @Override + public Observation.GetBlockByHeightRequest getDefaultInstanceForType() { + return Observation.GetBlockByHeightRequest.getDefaultInstance(); + } + + @Override + public Observation.GetBlockByHeightRequest build() { + Observation.GetBlockByHeightRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetBlockByHeightRequest buildPartial() { + Observation.GetBlockByHeightRequest result = new Observation.GetBlockByHeightRequest(this); + result.height_ = height_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetBlockByHeightRequest) { + return mergeFrom((Observation.GetBlockByHeightRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetBlockByHeightRequest other) { + if (other == Observation.GetBlockByHeightRequest.getDefaultInstance()) return this; + if (other.getHeight() != 0L) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetBlockByHeightRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetBlockByHeightRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long height_ ; + /** + * uint64 height = 1; + * @return The height. + */ + public long getHeight() { + return height_; + } + /** + * uint64 height = 1; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + + height_ = value; + onChanged(); + return this; + } + /** + * uint64 height = 1; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0L; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetBlockByHeightRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetBlockByHeightRequest) + private static final Observation.GetBlockByHeightRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetBlockByHeightRequest(); + } + + public static Observation.GetBlockByHeightRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetBlockByHeightRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetBlockByHeightRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetBlockByHeightRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.BlockResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.Block block = 1; + * @return Whether the block field is set. + */ + boolean hasBlock(); + /** + * .flow.sdk.entities.Block block = 1; + * @return The block. + */ + Entities.Block getBlock(); + /** + * .flow.sdk.entities.Block block = 1; + */ + Entities.BlockOrBuilder getBlockOrBuilder(); + } + /** + * Protobuf type {@code flow.services.observation.BlockResponse} + */ + public static final class BlockResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.BlockResponse) + BlockResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockResponse.newBuilder() to construct. + private BlockResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockResponse() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BlockResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BlockResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + Entities.Block.Builder subBuilder = null; + if (block_ != null) { + subBuilder = block_.toBuilder(); + } + block_ = input.readMessage(Entities.Block.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(block_); + block_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_BlockResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_BlockResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.BlockResponse.class, Observation.BlockResponse.Builder.class); + } + + public static final int BLOCK_FIELD_NUMBER = 1; + private Entities.Block block_; + /** + * .flow.sdk.entities.Block block = 1; + * @return Whether the block field is set. + */ + public boolean hasBlock() { + return block_ != null; + } + /** + * .flow.sdk.entities.Block block = 1; + * @return The block. + */ + public Entities.Block getBlock() { + return block_ == null ? Entities.Block.getDefaultInstance() : block_; + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Entities.BlockOrBuilder getBlockOrBuilder() { + return getBlock(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (block_ != null) { + output.writeMessage(1, getBlock()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (block_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBlock()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.BlockResponse)) { + return super.equals(obj); + } + Observation.BlockResponse other = (Observation.BlockResponse) obj; + + if (hasBlock() != other.hasBlock()) return false; + if (hasBlock()) { + if (!getBlock() + .equals(other.getBlock())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBlock()) { + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.BlockResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.BlockResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.BlockResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.BlockResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.BlockResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.BlockResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.BlockResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.BlockResponse 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 Observation.BlockResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.BlockResponse 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 Observation.BlockResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.BlockResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.BlockResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.BlockResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.BlockResponse) + Observation.BlockResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_BlockResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_BlockResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.BlockResponse.class, Observation.BlockResponse.Builder.class); + } + + // Construct using Observation.BlockResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (blockBuilder_ == null) { + block_ = null; + } else { + block_ = null; + blockBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_BlockResponse_descriptor; + } + + @Override + public Observation.BlockResponse getDefaultInstanceForType() { + return Observation.BlockResponse.getDefaultInstance(); + } + + @Override + public Observation.BlockResponse build() { + Observation.BlockResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.BlockResponse buildPartial() { + Observation.BlockResponse result = new Observation.BlockResponse(this); + if (blockBuilder_ == null) { + result.block_ = block_; + } else { + result.block_ = blockBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.BlockResponse) { + return mergeFrom((Observation.BlockResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.BlockResponse other) { + if (other == Observation.BlockResponse.getDefaultInstance()) return this; + if (other.hasBlock()) { + mergeBlock(other.getBlock()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.BlockResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.BlockResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Entities.Block block_; + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Block, Entities.Block.Builder, Entities.BlockOrBuilder> blockBuilder_; + /** + * .flow.sdk.entities.Block block = 1; + * @return Whether the block field is set. + */ + public boolean hasBlock() { + return blockBuilder_ != null || block_ != null; + } + /** + * .flow.sdk.entities.Block block = 1; + * @return The block. + */ + public Entities.Block getBlock() { + if (blockBuilder_ == null) { + return block_ == null ? Entities.Block.getDefaultInstance() : block_; + } else { + return blockBuilder_.getMessage(); + } + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Builder setBlock(Entities.Block value) { + if (blockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + blockBuilder_.setMessage(value); + } + + return this; + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Builder setBlock( + Entities.Block.Builder builderForValue) { + if (blockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + blockBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Builder mergeBlock(Entities.Block value) { + if (blockBuilder_ == null) { + if (block_ != null) { + block_ = + Entities.Block.newBuilder(block_).mergeFrom(value).buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + blockBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Builder clearBlock() { + if (blockBuilder_ == null) { + block_ = null; + onChanged(); + } else { + block_ = null; + blockBuilder_ = null; + } + + return this; + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Entities.Block.Builder getBlockBuilder() { + + onChanged(); + return getBlockFieldBuilder().getBuilder(); + } + /** + * .flow.sdk.entities.Block block = 1; + */ + public Entities.BlockOrBuilder getBlockOrBuilder() { + if (blockBuilder_ != null) { + return blockBuilder_.getMessageOrBuilder(); + } else { + return block_ == null ? + Entities.Block.getDefaultInstance() : block_; + } + } + /** + * .flow.sdk.entities.Block block = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Block, Entities.Block.Builder, Entities.BlockOrBuilder> + getBlockFieldBuilder() { + if (blockBuilder_ == null) { + blockBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + Entities.Block, Entities.Block.Builder, Entities.BlockOrBuilder>( + getBlock(), + getParentForChildren(), + isClean()); + block_ = null; + } + return blockBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.BlockResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.BlockResponse) + private static final Observation.BlockResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.BlockResponse(); + } + + public static Observation.BlockResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BlockResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BlockResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.BlockResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetCollectionByIDRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetCollectionByIDRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes id = 1; + * @return The id. + */ + com.google.protobuf.ByteString getId(); + } + /** + * Protobuf type {@code flow.services.observation.GetCollectionByIDRequest} + */ + public static final class GetCollectionByIDRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetCollectionByIDRequest) + GetCollectionByIDRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCollectionByIDRequest.newBuilder() to construct. + private GetCollectionByIDRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetCollectionByIDRequest() { + id_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetCollectionByIDRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetCollectionByIDRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + id_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetCollectionByIDRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetCollectionByIDRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetCollectionByIDRequest.class, Observation.GetCollectionByIDRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString id_; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!id_.isEmpty()) { + output.writeBytes(1, id_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!id_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetCollectionByIDRequest)) { + return super.equals(obj); + } + Observation.GetCollectionByIDRequest other = (Observation.GetCollectionByIDRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetCollectionByIDRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetCollectionByIDRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetCollectionByIDRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetCollectionByIDRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetCollectionByIDRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetCollectionByIDRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetCollectionByIDRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetCollectionByIDRequest 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 Observation.GetCollectionByIDRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetCollectionByIDRequest 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 Observation.GetCollectionByIDRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetCollectionByIDRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetCollectionByIDRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetCollectionByIDRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetCollectionByIDRequest) + Observation.GetCollectionByIDRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetCollectionByIDRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetCollectionByIDRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetCollectionByIDRequest.class, Observation.GetCollectionByIDRequest.Builder.class); + } + + // Construct using Observation.GetCollectionByIDRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetCollectionByIDRequest_descriptor; + } + + @Override + public Observation.GetCollectionByIDRequest getDefaultInstanceForType() { + return Observation.GetCollectionByIDRequest.getDefaultInstance(); + } + + @Override + public Observation.GetCollectionByIDRequest build() { + Observation.GetCollectionByIDRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetCollectionByIDRequest buildPartial() { + Observation.GetCollectionByIDRequest result = new Observation.GetCollectionByIDRequest(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetCollectionByIDRequest) { + return mergeFrom((Observation.GetCollectionByIDRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetCollectionByIDRequest other) { + if (other == Observation.GetCollectionByIDRequest.getDefaultInstance()) return this; + if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + setId(other.getId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetCollectionByIDRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetCollectionByIDRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + /** + * bytes id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * bytes id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetCollectionByIDRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetCollectionByIDRequest) + private static final Observation.GetCollectionByIDRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetCollectionByIDRequest(); + } + + public static Observation.GetCollectionByIDRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetCollectionByIDRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCollectionByIDRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetCollectionByIDRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CollectionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.CollectionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.Collection collection = 1; + * @return Whether the collection field is set. + */ + boolean hasCollection(); + /** + * .flow.sdk.entities.Collection collection = 1; + * @return The collection. + */ + Entities.Collection getCollection(); + /** + * .flow.sdk.entities.Collection collection = 1; + */ + Entities.CollectionOrBuilder getCollectionOrBuilder(); + } + /** + * Protobuf type {@code flow.services.observation.CollectionResponse} + */ + public static final class CollectionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.CollectionResponse) + CollectionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CollectionResponse.newBuilder() to construct. + private CollectionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CollectionResponse() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new CollectionResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CollectionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + Entities.Collection.Builder subBuilder = null; + if (collection_ != null) { + subBuilder = collection_.toBuilder(); + } + collection_ = input.readMessage(Entities.Collection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(collection_); + collection_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_CollectionResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_CollectionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.CollectionResponse.class, Observation.CollectionResponse.Builder.class); + } + + public static final int COLLECTION_FIELD_NUMBER = 1; + private Entities.Collection collection_; + /** + * .flow.sdk.entities.Collection collection = 1; + * @return Whether the collection field is set. + */ + public boolean hasCollection() { + return collection_ != null; + } + /** + * .flow.sdk.entities.Collection collection = 1; + * @return The collection. + */ + public Entities.Collection getCollection() { + return collection_ == null ? Entities.Collection.getDefaultInstance() : collection_; + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Entities.CollectionOrBuilder getCollectionOrBuilder() { + return getCollection(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (collection_ != null) { + output.writeMessage(1, getCollection()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (collection_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCollection()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.CollectionResponse)) { + return super.equals(obj); + } + Observation.CollectionResponse other = (Observation.CollectionResponse) obj; + + if (hasCollection() != other.hasCollection()) return false; + if (hasCollection()) { + if (!getCollection() + .equals(other.getCollection())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCollection()) { + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.CollectionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.CollectionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.CollectionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.CollectionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.CollectionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.CollectionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.CollectionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.CollectionResponse 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 Observation.CollectionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.CollectionResponse 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 Observation.CollectionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.CollectionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.CollectionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.CollectionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.CollectionResponse) + Observation.CollectionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_CollectionResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_CollectionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.CollectionResponse.class, Observation.CollectionResponse.Builder.class); + } + + // Construct using Observation.CollectionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (collectionBuilder_ == null) { + collection_ = null; + } else { + collection_ = null; + collectionBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_CollectionResponse_descriptor; + } + + @Override + public Observation.CollectionResponse getDefaultInstanceForType() { + return Observation.CollectionResponse.getDefaultInstance(); + } + + @Override + public Observation.CollectionResponse build() { + Observation.CollectionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.CollectionResponse buildPartial() { + Observation.CollectionResponse result = new Observation.CollectionResponse(this); + if (collectionBuilder_ == null) { + result.collection_ = collection_; + } else { + result.collection_ = collectionBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.CollectionResponse) { + return mergeFrom((Observation.CollectionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.CollectionResponse other) { + if (other == Observation.CollectionResponse.getDefaultInstance()) return this; + if (other.hasCollection()) { + mergeCollection(other.getCollection()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.CollectionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.CollectionResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Entities.Collection collection_; + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Collection, Entities.Collection.Builder, Entities.CollectionOrBuilder> collectionBuilder_; + /** + * .flow.sdk.entities.Collection collection = 1; + * @return Whether the collection field is set. + */ + public boolean hasCollection() { + return collectionBuilder_ != null || collection_ != null; + } + /** + * .flow.sdk.entities.Collection collection = 1; + * @return The collection. + */ + public Entities.Collection getCollection() { + if (collectionBuilder_ == null) { + return collection_ == null ? Entities.Collection.getDefaultInstance() : collection_; + } else { + return collectionBuilder_.getMessage(); + } + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Builder setCollection(Entities.Collection value) { + if (collectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + collection_ = value; + onChanged(); + } else { + collectionBuilder_.setMessage(value); + } + + return this; + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Builder setCollection( + Entities.Collection.Builder builderForValue) { + if (collectionBuilder_ == null) { + collection_ = builderForValue.build(); + onChanged(); + } else { + collectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Builder mergeCollection(Entities.Collection value) { + if (collectionBuilder_ == null) { + if (collection_ != null) { + collection_ = + Entities.Collection.newBuilder(collection_).mergeFrom(value).buildPartial(); + } else { + collection_ = value; + } + onChanged(); + } else { + collectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Builder clearCollection() { + if (collectionBuilder_ == null) { + collection_ = null; + onChanged(); + } else { + collection_ = null; + collectionBuilder_ = null; + } + + return this; + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Entities.Collection.Builder getCollectionBuilder() { + + onChanged(); + return getCollectionFieldBuilder().getBuilder(); + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + public Entities.CollectionOrBuilder getCollectionOrBuilder() { + if (collectionBuilder_ != null) { + return collectionBuilder_.getMessageOrBuilder(); + } else { + return collection_ == null ? + Entities.Collection.getDefaultInstance() : collection_; + } + } + /** + * .flow.sdk.entities.Collection collection = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Collection, Entities.Collection.Builder, Entities.CollectionOrBuilder> + getCollectionFieldBuilder() { + if (collectionBuilder_ == null) { + collectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + Entities.Collection, Entities.Collection.Builder, Entities.CollectionOrBuilder>( + getCollection(), + getParentForChildren(), + isClean()); + collection_ = null; + } + return collectionBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.CollectionResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.CollectionResponse) + private static final Observation.CollectionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.CollectionResponse(); + } + + public static Observation.CollectionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public CollectionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CollectionResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.CollectionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SendTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.SendTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return Whether the transaction field is set. + */ + boolean hasTransaction(); + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return The transaction. + */ + Entities.Transaction getTransaction(); + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + Entities.TransactionOrBuilder getTransactionOrBuilder(); + } + /** + * Protobuf type {@code flow.services.observation.SendTransactionRequest} + */ + public static final class SendTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.SendTransactionRequest) + SendTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SendTransactionRequest.newBuilder() to construct. + private SendTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SendTransactionRequest() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new SendTransactionRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SendTransactionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + Entities.Transaction.Builder subBuilder = null; + if (transaction_ != null) { + subBuilder = transaction_.toBuilder(); + } + transaction_ = input.readMessage(Entities.Transaction.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transaction_); + transaction_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_SendTransactionRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_SendTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.SendTransactionRequest.class, Observation.SendTransactionRequest.Builder.class); + } + + public static final int TRANSACTION_FIELD_NUMBER = 1; + private Entities.Transaction transaction_; + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return Whether the transaction field is set. + */ + public boolean hasTransaction() { + return transaction_ != null; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return The transaction. + */ + public Entities.Transaction getTransaction() { + return transaction_ == null ? Entities.Transaction.getDefaultInstance() : transaction_; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Entities.TransactionOrBuilder getTransactionOrBuilder() { + return getTransaction(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (transaction_ != null) { + output.writeMessage(1, getTransaction()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transaction_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTransaction()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.SendTransactionRequest)) { + return super.equals(obj); + } + Observation.SendTransactionRequest other = (Observation.SendTransactionRequest) obj; + + if (hasTransaction() != other.hasTransaction()) return false; + if (hasTransaction()) { + if (!getTransaction() + .equals(other.getTransaction())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.SendTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.SendTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.SendTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.SendTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.SendTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.SendTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.SendTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.SendTransactionRequest 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 Observation.SendTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.SendTransactionRequest 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 Observation.SendTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.SendTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.SendTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.SendTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.SendTransactionRequest) + Observation.SendTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_SendTransactionRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_SendTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.SendTransactionRequest.class, Observation.SendTransactionRequest.Builder.class); + } + + // Construct using Observation.SendTransactionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (transactionBuilder_ == null) { + transaction_ = null; + } else { + transaction_ = null; + transactionBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_SendTransactionRequest_descriptor; + } + + @Override + public Observation.SendTransactionRequest getDefaultInstanceForType() { + return Observation.SendTransactionRequest.getDefaultInstance(); + } + + @Override + public Observation.SendTransactionRequest build() { + Observation.SendTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.SendTransactionRequest buildPartial() { + Observation.SendTransactionRequest result = new Observation.SendTransactionRequest(this); + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.SendTransactionRequest) { + return mergeFrom((Observation.SendTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.SendTransactionRequest other) { + if (other == Observation.SendTransactionRequest.getDefaultInstance()) return this; + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.SendTransactionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.SendTransactionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Entities.Transaction transaction_; + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder> transactionBuilder_; + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return Whether the transaction field is set. + */ + public boolean hasTransaction() { + return transactionBuilder_ != null || transaction_ != null; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return The transaction. + */ + public Entities.Transaction getTransaction() { + if (transactionBuilder_ == null) { + return transaction_ == null ? Entities.Transaction.getDefaultInstance() : transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder setTransaction(Entities.Transaction value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder setTransaction( + Entities.Transaction.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder mergeTransaction(Entities.Transaction value) { + if (transactionBuilder_ == null) { + if (transaction_ != null) { + transaction_ = + Entities.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = null; + onChanged(); + } else { + transaction_ = null; + transactionBuilder_ = null; + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Entities.Transaction.Builder getTransactionBuilder() { + + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Entities.TransactionOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_ == null ? + Entities.Transaction.getDefaultInstance() : transaction_; + } + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder>( + getTransaction(), + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.SendTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.SendTransactionRequest) + private static final Observation.SendTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.SendTransactionRequest(); + } + + public static Observation.SendTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public SendTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SendTransactionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.SendTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SendTransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.SendTransactionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes id = 1; + * @return The id. + */ + com.google.protobuf.ByteString getId(); + } + /** + * Protobuf type {@code flow.services.observation.SendTransactionResponse} + */ + public static final class SendTransactionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.SendTransactionResponse) + SendTransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SendTransactionResponse.newBuilder() to construct. + private SendTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SendTransactionResponse() { + id_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new SendTransactionResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SendTransactionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + id_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_SendTransactionResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_SendTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.SendTransactionResponse.class, Observation.SendTransactionResponse.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString id_; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!id_.isEmpty()) { + output.writeBytes(1, id_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!id_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.SendTransactionResponse)) { + return super.equals(obj); + } + Observation.SendTransactionResponse other = (Observation.SendTransactionResponse) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.SendTransactionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.SendTransactionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.SendTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.SendTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.SendTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.SendTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.SendTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.SendTransactionResponse 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 Observation.SendTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.SendTransactionResponse 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 Observation.SendTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.SendTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.SendTransactionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.SendTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.SendTransactionResponse) + Observation.SendTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_SendTransactionResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_SendTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.SendTransactionResponse.class, Observation.SendTransactionResponse.Builder.class); + } + + // Construct using Observation.SendTransactionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_SendTransactionResponse_descriptor; + } + + @Override + public Observation.SendTransactionResponse getDefaultInstanceForType() { + return Observation.SendTransactionResponse.getDefaultInstance(); + } + + @Override + public Observation.SendTransactionResponse build() { + Observation.SendTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.SendTransactionResponse buildPartial() { + Observation.SendTransactionResponse result = new Observation.SendTransactionResponse(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.SendTransactionResponse) { + return mergeFrom((Observation.SendTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.SendTransactionResponse other) { + if (other == Observation.SendTransactionResponse.getDefaultInstance()) return this; + if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + setId(other.getId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.SendTransactionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.SendTransactionResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + /** + * bytes id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * bytes id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.SendTransactionResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.SendTransactionResponse) + private static final Observation.SendTransactionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.SendTransactionResponse(); + } + + public static Observation.SendTransactionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public SendTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SendTransactionResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.SendTransactionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes id = 1; + * @return The id. + */ + com.google.protobuf.ByteString getId(); + } + /** + * Protobuf type {@code flow.services.observation.GetTransactionRequest} + */ + public static final class GetTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetTransactionRequest) + GetTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTransactionRequest.newBuilder() to construct. + private GetTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTransactionRequest() { + id_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetTransactionRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetTransactionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + id_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetTransactionRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetTransactionRequest.class, Observation.GetTransactionRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString id_; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!id_.isEmpty()) { + output.writeBytes(1, id_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!id_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetTransactionRequest)) { + return super.equals(obj); + } + Observation.GetTransactionRequest other = (Observation.GetTransactionRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetTransactionRequest 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 Observation.GetTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetTransactionRequest 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 Observation.GetTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetTransactionRequest) + Observation.GetTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetTransactionRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetTransactionRequest.class, Observation.GetTransactionRequest.Builder.class); + } + + // Construct using Observation.GetTransactionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetTransactionRequest_descriptor; + } + + @Override + public Observation.GetTransactionRequest getDefaultInstanceForType() { + return Observation.GetTransactionRequest.getDefaultInstance(); + } + + @Override + public Observation.GetTransactionRequest build() { + Observation.GetTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetTransactionRequest buildPartial() { + Observation.GetTransactionRequest result = new Observation.GetTransactionRequest(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetTransactionRequest) { + return mergeFrom((Observation.GetTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetTransactionRequest other) { + if (other == Observation.GetTransactionRequest.getDefaultInstance()) return this; + if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + setId(other.getId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetTransactionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetTransactionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes id = 1; + * @return The id. + */ + public com.google.protobuf.ByteString getId() { + return id_; + } + /** + * bytes id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * bytes id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetTransactionRequest) + private static final Observation.GetTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetTransactionRequest(); + } + + public static Observation.GetTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTransactionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.TransactionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return Whether the transaction field is set. + */ + boolean hasTransaction(); + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return The transaction. + */ + Entities.Transaction getTransaction(); + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + Entities.TransactionOrBuilder getTransactionOrBuilder(); + } + /** + * Protobuf type {@code flow.services.observation.TransactionResponse} + */ + public static final class TransactionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.TransactionResponse) + TransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransactionResponse.newBuilder() to construct. + private TransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransactionResponse() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new TransactionResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransactionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + Entities.Transaction.Builder subBuilder = null; + if (transaction_ != null) { + subBuilder = transaction_.toBuilder(); + } + transaction_ = input.readMessage(Entities.Transaction.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transaction_); + transaction_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_TransactionResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_TransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.TransactionResponse.class, Observation.TransactionResponse.Builder.class); + } + + public static final int TRANSACTION_FIELD_NUMBER = 1; + private Entities.Transaction transaction_; + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return Whether the transaction field is set. + */ + public boolean hasTransaction() { + return transaction_ != null; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return The transaction. + */ + public Entities.Transaction getTransaction() { + return transaction_ == null ? Entities.Transaction.getDefaultInstance() : transaction_; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Entities.TransactionOrBuilder getTransactionOrBuilder() { + return getTransaction(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (transaction_ != null) { + output.writeMessage(1, getTransaction()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transaction_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTransaction()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.TransactionResponse)) { + return super.equals(obj); + } + Observation.TransactionResponse other = (Observation.TransactionResponse) obj; + + if (hasTransaction() != other.hasTransaction()) return false; + if (hasTransaction()) { + if (!getTransaction() + .equals(other.getTransaction())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.TransactionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.TransactionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.TransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.TransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.TransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.TransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.TransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.TransactionResponse 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 Observation.TransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.TransactionResponse 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 Observation.TransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.TransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.TransactionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.TransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.TransactionResponse) + Observation.TransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_TransactionResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_TransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.TransactionResponse.class, Observation.TransactionResponse.Builder.class); + } + + // Construct using Observation.TransactionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (transactionBuilder_ == null) { + transaction_ = null; + } else { + transaction_ = null; + transactionBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_TransactionResponse_descriptor; + } + + @Override + public Observation.TransactionResponse getDefaultInstanceForType() { + return Observation.TransactionResponse.getDefaultInstance(); + } + + @Override + public Observation.TransactionResponse build() { + Observation.TransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.TransactionResponse buildPartial() { + Observation.TransactionResponse result = new Observation.TransactionResponse(this); + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.TransactionResponse) { + return mergeFrom((Observation.TransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.TransactionResponse other) { + if (other == Observation.TransactionResponse.getDefaultInstance()) return this; + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.TransactionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.TransactionResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Entities.Transaction transaction_; + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder> transactionBuilder_; + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return Whether the transaction field is set. + */ + public boolean hasTransaction() { + return transactionBuilder_ != null || transaction_ != null; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + * @return The transaction. + */ + public Entities.Transaction getTransaction() { + if (transactionBuilder_ == null) { + return transaction_ == null ? Entities.Transaction.getDefaultInstance() : transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder setTransaction(Entities.Transaction value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder setTransaction( + Entities.Transaction.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder mergeTransaction(Entities.Transaction value) { + if (transactionBuilder_ == null) { + if (transaction_ != null) { + transaction_ = + Entities.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = null; + onChanged(); + } else { + transaction_ = null; + transactionBuilder_ = null; + } + + return this; + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Entities.Transaction.Builder getTransactionBuilder() { + + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + public Entities.TransactionOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_ == null ? + Entities.Transaction.getDefaultInstance() : transaction_; + } + } + /** + * .flow.sdk.entities.Transaction transaction = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + Entities.Transaction, Entities.Transaction.Builder, Entities.TransactionOrBuilder>( + getTransaction(), + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.TransactionResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.TransactionResponse) + private static final Observation.TransactionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.TransactionResponse(); + } + + public static Observation.TransactionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public TransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransactionResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.TransactionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TransactionResultResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.TransactionResultResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return The status. + */ + Entities.TransactionStatus getStatus(); + + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + java.util.List + getEventsList(); + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + Entities.Event getEvents(int index); + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + int getEventsCount(); + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + java.util.List + getEventsOrBuilderList(); + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + Entities.EventOrBuilder getEventsOrBuilder( + int index); + } + /** + * Protobuf type {@code flow.services.observation.TransactionResultResponse} + */ + public static final class TransactionResultResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.TransactionResultResponse) + TransactionResultResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransactionResultResponse.newBuilder() to construct. + private TransactionResultResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransactionResultResponse() { + status_ = 0; + events_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new TransactionResultResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransactionResultResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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 8: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + events_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + events_.add( + input.readMessage(Entities.Event.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_TransactionResultResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_TransactionResultResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.TransactionResultResponse.class, Observation.TransactionResultResponse.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private int status_; + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return The status. + */ + public Entities.TransactionStatus getStatus() { + @SuppressWarnings("deprecation") + Entities.TransactionStatus result = Entities.TransactionStatus.valueOf(status_); + return result == null ? Entities.TransactionStatus.UNRECOGNIZED : result; + } + + public static final int EVENTS_FIELD_NUMBER = 2; + private java.util.List events_; + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public java.util.List getEventsList() { + return events_; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public int getEventsCount() { + return events_.size(); + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.Event getEvents(int index) { + return events_.get(index); + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.EventOrBuilder getEventsOrBuilder( + int index) { + return events_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (status_ != Entities.TransactionStatus.STATUS_UNKNOWN.getNumber()) { + output.writeEnum(1, status_); + } + for (int i = 0; i < events_.size(); i++) { + output.writeMessage(2, events_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != Entities.TransactionStatus.STATUS_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, status_); + } + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, events_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.TransactionResultResponse)) { + return super.equals(obj); + } + Observation.TransactionResultResponse other = (Observation.TransactionResultResponse) obj; + + if (status_ != other.status_) return false; + if (!getEventsList() + .equals(other.getEventsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.TransactionResultResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.TransactionResultResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.TransactionResultResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.TransactionResultResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.TransactionResultResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.TransactionResultResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.TransactionResultResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.TransactionResultResponse 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 Observation.TransactionResultResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.TransactionResultResponse 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 Observation.TransactionResultResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.TransactionResultResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.TransactionResultResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.TransactionResultResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.TransactionResultResponse) + Observation.TransactionResultResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_TransactionResultResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_TransactionResultResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.TransactionResultResponse.class, Observation.TransactionResultResponse.Builder.class); + } + + // Construct using Observation.TransactionResultResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEventsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + status_ = 0; + + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + eventsBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_TransactionResultResponse_descriptor; + } + + @Override + public Observation.TransactionResultResponse getDefaultInstanceForType() { + return Observation.TransactionResultResponse.getDefaultInstance(); + } + + @Override + public Observation.TransactionResultResponse build() { + Observation.TransactionResultResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.TransactionResultResponse buildPartial() { + Observation.TransactionResultResponse result = new Observation.TransactionResultResponse(this); + int from_bitField0_ = bitField0_; + result.status_ = status_; + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.TransactionResultResponse) { + return mergeFrom((Observation.TransactionResultResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.TransactionResultResponse other) { + if (other == Observation.TransactionResultResponse.getDefaultInstance()) return this; + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEventsFieldBuilder() : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.TransactionResultResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.TransactionResultResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int status_ = 0; + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + onChanged(); + return this; + } + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return The status. + */ + public Entities.TransactionStatus getStatus() { + @SuppressWarnings("deprecation") + Entities.TransactionStatus result = Entities.TransactionStatus.valueOf(status_); + return result == null ? Entities.TransactionStatus.UNRECOGNIZED : result; + } + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(Entities.TransactionStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .flow.sdk.entities.TransactionStatus status = 1; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private java.util.List events_ = + java.util.Collections.emptyList(); + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + events_ = new java.util.ArrayList(events_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Event, Entities.Event.Builder, Entities.EventOrBuilder> eventsBuilder_; + + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.Event getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder setEvents( + int index, Entities.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder setEvents( + int index, Entities.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder addEvents(Entities.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder addEvents( + int index, Entities.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder addEvents( + Entities.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder addEvents( + int index, Entities.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder addAllEvents( + Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.Event.Builder getEventsBuilder( + int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.EventOrBuilder getEventsOrBuilder( + int index) { + if (eventsBuilder_ == null) { + return events_.get(index); } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.Event.Builder addEventsBuilder() { + return getEventsFieldBuilder().addBuilder( + Entities.Event.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public Entities.Event.Builder addEventsBuilder( + int index) { + return getEventsFieldBuilder().addBuilder( + index, Entities.Event.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.Event events = 2; + */ + public java.util.List + getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Event, Entities.Event.Builder, Entities.EventOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Event, Entities.Event.Builder, Entities.EventOrBuilder>( + events_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + events_ = null; + } + return eventsBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.TransactionResultResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.TransactionResultResponse) + private static final Observation.TransactionResultResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.TransactionResultResponse(); + } + + public static Observation.TransactionResultResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public TransactionResultResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransactionResultResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.TransactionResultResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAccountRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes address = 1; + * @return The address. + */ + com.google.protobuf.ByteString getAddress(); + } + /** + * Protobuf type {@code flow.services.observation.GetAccountRequest} + */ + public static final class GetAccountRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetAccountRequest) + GetAccountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAccountRequest.newBuilder() to construct. + private GetAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAccountRequest() { + address_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetAccountRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAccountRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + address_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetAccountRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetAccountRequest.class, Observation.GetAccountRequest.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString address_; + /** + * bytes address = 1; + * @return The address. + */ + public com.google.protobuf.ByteString getAddress() { + return address_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!address_.isEmpty()) { + output.writeBytes(1, address_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!address_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, address_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetAccountRequest)) { + return super.equals(obj); + } + Observation.GetAccountRequest other = (Observation.GetAccountRequest) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetAccountRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetAccountRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetAccountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetAccountRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetAccountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetAccountRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetAccountRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetAccountRequest 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 Observation.GetAccountRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetAccountRequest 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 Observation.GetAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetAccountRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetAccountRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetAccountRequest) + Observation.GetAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetAccountRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetAccountRequest.class, Observation.GetAccountRequest.Builder.class); + } + + // Construct using Observation.GetAccountRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + address_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetAccountRequest_descriptor; + } + + @Override + public Observation.GetAccountRequest getDefaultInstanceForType() { + return Observation.GetAccountRequest.getDefaultInstance(); + } + + @Override + public Observation.GetAccountRequest build() { + Observation.GetAccountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetAccountRequest buildPartial() { + Observation.GetAccountRequest result = new Observation.GetAccountRequest(this); + result.address_ = address_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetAccountRequest) { + return mergeFrom((Observation.GetAccountRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetAccountRequest other) { + if (other == Observation.GetAccountRequest.getDefaultInstance()) return this; + if (other.getAddress() != com.google.protobuf.ByteString.EMPTY) { + setAddress(other.getAddress()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetAccountRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetAccountRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString address_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes address = 1; + * @return The address. + */ + public com.google.protobuf.ByteString getAddress() { + return address_; + } + /** + * bytes address = 1; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + * bytes address = 1; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetAccountRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetAccountRequest) + private static final Observation.GetAccountRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetAccountRequest(); + } + + public static Observation.GetAccountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAccountRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetAccountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAccountResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetAccountResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flow.sdk.entities.Account account = 1; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + * .flow.sdk.entities.Account account = 1; + * @return The account. + */ + Entities.Account getAccount(); + /** + * .flow.sdk.entities.Account account = 1; + */ + Entities.AccountOrBuilder getAccountOrBuilder(); + } + /** + * Protobuf type {@code flow.services.observation.GetAccountResponse} + */ + public static final class GetAccountResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetAccountResponse) + GetAccountResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAccountResponse.newBuilder() to construct. + private GetAccountResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAccountResponse() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetAccountResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAccountResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + Entities.Account.Builder subBuilder = null; + if (account_ != null) { + subBuilder = account_.toBuilder(); + } + account_ = input.readMessage(Entities.Account.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(account_); + account_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetAccountResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetAccountResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetAccountResponse.class, Observation.GetAccountResponse.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private Entities.Account account_; + /** + * .flow.sdk.entities.Account account = 1; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return account_ != null; + } + /** + * .flow.sdk.entities.Account account = 1; + * @return The account. + */ + public Entities.Account getAccount() { + return account_ == null ? Entities.Account.getDefaultInstance() : account_; + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Entities.AccountOrBuilder getAccountOrBuilder() { + return getAccount(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (account_ != null) { + output.writeMessage(1, getAccount()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (account_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetAccountResponse)) { + return super.equals(obj); + } + Observation.GetAccountResponse other = (Observation.GetAccountResponse) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetAccountResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetAccountResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetAccountResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetAccountResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetAccountResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetAccountResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetAccountResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetAccountResponse 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 Observation.GetAccountResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetAccountResponse 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 Observation.GetAccountResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetAccountResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetAccountResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetAccountResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetAccountResponse) + Observation.GetAccountResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetAccountResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetAccountResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetAccountResponse.class, Observation.GetAccountResponse.Builder.class); + } + + // Construct using Observation.GetAccountResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (accountBuilder_ == null) { + account_ = null; + } else { + account_ = null; + accountBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetAccountResponse_descriptor; + } + + @Override + public Observation.GetAccountResponse getDefaultInstanceForType() { + return Observation.GetAccountResponse.getDefaultInstance(); + } + + @Override + public Observation.GetAccountResponse build() { + Observation.GetAccountResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetAccountResponse buildPartial() { + Observation.GetAccountResponse result = new Observation.GetAccountResponse(this); + if (accountBuilder_ == null) { + result.account_ = account_; + } else { + result.account_ = accountBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetAccountResponse) { + return mergeFrom((Observation.GetAccountResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetAccountResponse other) { + if (other == Observation.GetAccountResponse.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetAccountResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetAccountResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Entities.Account account_; + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Account, Entities.Account.Builder, Entities.AccountOrBuilder> accountBuilder_; + /** + * .flow.sdk.entities.Account account = 1; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return accountBuilder_ != null || account_ != null; + } + /** + * .flow.sdk.entities.Account account = 1; + * @return The account. + */ + public Entities.Account getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? Entities.Account.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Builder setAccount(Entities.Account value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + onChanged(); + } else { + accountBuilder_.setMessage(value); + } + + return this; + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Builder setAccount( + Entities.Account.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + onChanged(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Builder mergeAccount(Entities.Account value) { + if (accountBuilder_ == null) { + if (account_ != null) { + account_ = + Entities.Account.newBuilder(account_).mergeFrom(value).buildPartial(); + } else { + account_ = value; + } + onChanged(); + } else { + accountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Builder clearAccount() { + if (accountBuilder_ == null) { + account_ = null; + onChanged(); + } else { + account_ = null; + accountBuilder_ = null; + } + + return this; + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Entities.Account.Builder getAccountBuilder() { + + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + * .flow.sdk.entities.Account account = 1; + */ + public Entities.AccountOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + Entities.Account.getDefaultInstance() : account_; + } + } + /** + * .flow.sdk.entities.Account account = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Entities.Account, Entities.Account.Builder, Entities.AccountOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + Entities.Account, Entities.Account.Builder, Entities.AccountOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetAccountResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetAccountResponse) + private static final Observation.GetAccountResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetAccountResponse(); + } + + public static Observation.GetAccountResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetAccountResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAccountResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetAccountResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExecuteScriptRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.ExecuteScriptRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes script = 1; + * @return The script. + */ + com.google.protobuf.ByteString getScript(); + } + /** + * Protobuf type {@code flow.services.observation.ExecuteScriptRequest} + */ + public static final class ExecuteScriptRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.ExecuteScriptRequest) + ExecuteScriptRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecuteScriptRequest.newBuilder() to construct. + private ExecuteScriptRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExecuteScriptRequest() { + script_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new ExecuteScriptRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExecuteScriptRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + script_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_ExecuteScriptRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_ExecuteScriptRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.ExecuteScriptRequest.class, Observation.ExecuteScriptRequest.Builder.class); + } + + public static final int SCRIPT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString script_; + /** + * bytes script = 1; + * @return The script. + */ + public com.google.protobuf.ByteString getScript() { + return script_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!script_.isEmpty()) { + output.writeBytes(1, script_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!script_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, script_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.ExecuteScriptRequest)) { + return super.equals(obj); + } + Observation.ExecuteScriptRequest other = (Observation.ExecuteScriptRequest) obj; + + if (!getScript() + .equals(other.getScript())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.ExecuteScriptRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.ExecuteScriptRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.ExecuteScriptRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.ExecuteScriptRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.ExecuteScriptRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.ExecuteScriptRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.ExecuteScriptRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.ExecuteScriptRequest 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 Observation.ExecuteScriptRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.ExecuteScriptRequest 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 Observation.ExecuteScriptRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.ExecuteScriptRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.ExecuteScriptRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.ExecuteScriptRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.ExecuteScriptRequest) + Observation.ExecuteScriptRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_ExecuteScriptRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_ExecuteScriptRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.ExecuteScriptRequest.class, Observation.ExecuteScriptRequest.Builder.class); + } + + // Construct using Observation.ExecuteScriptRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + script_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_ExecuteScriptRequest_descriptor; + } + + @Override + public Observation.ExecuteScriptRequest getDefaultInstanceForType() { + return Observation.ExecuteScriptRequest.getDefaultInstance(); + } + + @Override + public Observation.ExecuteScriptRequest build() { + Observation.ExecuteScriptRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.ExecuteScriptRequest buildPartial() { + Observation.ExecuteScriptRequest result = new Observation.ExecuteScriptRequest(this); + result.script_ = script_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.ExecuteScriptRequest) { + return mergeFrom((Observation.ExecuteScriptRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.ExecuteScriptRequest other) { + if (other == Observation.ExecuteScriptRequest.getDefaultInstance()) return this; + if (other.getScript() != com.google.protobuf.ByteString.EMPTY) { + setScript(other.getScript()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.ExecuteScriptRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.ExecuteScriptRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString script_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes script = 1; + * @return The script. + */ + public com.google.protobuf.ByteString getScript() { + return script_; + } + /** + * bytes script = 1; + * @param value The script to set. + * @return This builder for chaining. + */ + public Builder setScript(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + script_ = value; + onChanged(); + return this; + } + /** + * bytes script = 1; + * @return This builder for chaining. + */ + public Builder clearScript() { + + script_ = getDefaultInstance().getScript(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.ExecuteScriptRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.ExecuteScriptRequest) + private static final Observation.ExecuteScriptRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.ExecuteScriptRequest(); + } + + public static Observation.ExecuteScriptRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public ExecuteScriptRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecuteScriptRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.ExecuteScriptRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExecuteScriptResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.ExecuteScriptResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes value = 1; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); + } + /** + * Protobuf type {@code flow.services.observation.ExecuteScriptResponse} + */ + public static final class ExecuteScriptResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.ExecuteScriptResponse) + ExecuteScriptResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecuteScriptResponse.newBuilder() to construct. + private ExecuteScriptResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExecuteScriptResponse() { + value_ = com.google.protobuf.ByteString.EMPTY; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new ExecuteScriptResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExecuteScriptResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + + value_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_ExecuteScriptResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_ExecuteScriptResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.ExecuteScriptResponse.class, Observation.ExecuteScriptResponse.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString value_; + /** + * bytes value = 1; + * @return The value. + */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!value_.isEmpty()) { + output.writeBytes(1, value_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.ExecuteScriptResponse)) { + return super.equals(obj); + } + Observation.ExecuteScriptResponse other = (Observation.ExecuteScriptResponse) obj; + + if (!getValue() + .equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.ExecuteScriptResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.ExecuteScriptResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.ExecuteScriptResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.ExecuteScriptResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.ExecuteScriptResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.ExecuteScriptResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.ExecuteScriptResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.ExecuteScriptResponse 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 Observation.ExecuteScriptResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.ExecuteScriptResponse 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 Observation.ExecuteScriptResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.ExecuteScriptResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.ExecuteScriptResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.ExecuteScriptResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.ExecuteScriptResponse) + Observation.ExecuteScriptResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_ExecuteScriptResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_ExecuteScriptResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.ExecuteScriptResponse.class, Observation.ExecuteScriptResponse.Builder.class); + } + + // Construct using Observation.ExecuteScriptResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + value_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_ExecuteScriptResponse_descriptor; + } + + @Override + public Observation.ExecuteScriptResponse getDefaultInstanceForType() { + return Observation.ExecuteScriptResponse.getDefaultInstance(); + } + + @Override + public Observation.ExecuteScriptResponse build() { + Observation.ExecuteScriptResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.ExecuteScriptResponse buildPartial() { + Observation.ExecuteScriptResponse result = new Observation.ExecuteScriptResponse(this); + result.value_ = value_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.ExecuteScriptResponse) { + return mergeFrom((Observation.ExecuteScriptResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.ExecuteScriptResponse other) { + if (other == Observation.ExecuteScriptResponse.getDefaultInstance()) return this; + if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.ExecuteScriptResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.ExecuteScriptResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes value = 1; + * @return The value. + */ + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * bytes value = 1; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * bytes value = 1; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.ExecuteScriptResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.ExecuteScriptResponse) + private static final Observation.ExecuteScriptResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.ExecuteScriptResponse(); + } + + public static Observation.ExecuteScriptResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public ExecuteScriptResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecuteScriptResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.ExecuteScriptResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetEventsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string type = 1; + * @return The type. + */ + String getType(); + /** + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * uint64 start_block = 2; + * @return The startBlock. + */ + long getStartBlock(); + + /** + * uint64 end_block = 3; + * @return The endBlock. + */ + long getEndBlock(); + } + /** + * Protobuf type {@code flow.services.observation.GetEventsRequest} + */ + public static final class GetEventsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetEventsRequest) + GetEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEventsRequest.newBuilder() to construct. + private GetEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetEventsRequest() { + type_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetEventsRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetEventsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + 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: { + String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 16: { + + startBlock_ = input.readUInt64(); + break; + } + case 24: { + + endBlock_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + 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 Observation.internal_static_flow_services_observation_GetEventsRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetEventsRequest.class, Observation.GetEventsRequest.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile Object type_; + /** + * string type = 1; + * @return The type. + */ + public String getType() { + Object ref = type_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_BLOCK_FIELD_NUMBER = 2; + private long startBlock_; + /** + * uint64 start_block = 2; + * @return The startBlock. + */ + public long getStartBlock() { + return startBlock_; + } + + public static final int END_BLOCK_FIELD_NUMBER = 3; + private long endBlock_; + /** + * uint64 end_block = 3; + * @return The endBlock. + */ + public long getEndBlock() { + return endBlock_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (startBlock_ != 0L) { + output.writeUInt64(2, startBlock_); + } + if (endBlock_ != 0L) { + output.writeUInt64(3, endBlock_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (startBlock_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, startBlock_); + } + if (endBlock_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, endBlock_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetEventsRequest)) { + return super.equals(obj); + } + Observation.GetEventsRequest other = (Observation.GetEventsRequest) obj; + + if (!getType() + .equals(other.getType())) return false; + if (getStartBlock() + != other.getStartBlock()) return false; + if (getEndBlock() + != other.getEndBlock()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @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) + getType().hashCode(); + hash = (37 * hash) + START_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartBlock()); + hash = (37 * hash) + END_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEndBlock()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetEventsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetEventsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetEventsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetEventsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetEventsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetEventsRequest 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 Observation.GetEventsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetEventsRequest 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 Observation.GetEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetEventsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetEventsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetEventsRequest) + Observation.GetEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetEventsRequest_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetEventsRequest.class, Observation.GetEventsRequest.Builder.class); + } + + // Construct using Observation.GetEventsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + type_ = ""; + + startBlock_ = 0L; + + endBlock_ = 0L; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetEventsRequest_descriptor; + } + + @Override + public Observation.GetEventsRequest getDefaultInstanceForType() { + return Observation.GetEventsRequest.getDefaultInstance(); + } + + @Override + public Observation.GetEventsRequest build() { + Observation.GetEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetEventsRequest buildPartial() { + Observation.GetEventsRequest result = new Observation.GetEventsRequest(this); + result.type_ = type_; + result.startBlock_ = startBlock_; + result.endBlock_ = endBlock_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetEventsRequest) { + return mergeFrom((Observation.GetEventsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetEventsRequest other) { + if (other == Observation.GetEventsRequest.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.getStartBlock() != 0L) { + setStartBlock(other.getStartBlock()); + } + if (other.getEndBlock() != 0L) { + setEndBlock(other.getEndBlock()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetEventsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetEventsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Object type_ = ""; + /** + * string type = 1; + * @return The type. + */ + public String getType() { + Object ref = type_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private long startBlock_ ; + /** + * uint64 start_block = 2; + * @return The startBlock. + */ + public long getStartBlock() { + return startBlock_; + } + /** + * uint64 start_block = 2; + * @param value The startBlock to set. + * @return This builder for chaining. + */ + public Builder setStartBlock(long value) { + + startBlock_ = value; + onChanged(); + return this; + } + /** + * uint64 start_block = 2; + * @return This builder for chaining. + */ + public Builder clearStartBlock() { + + startBlock_ = 0L; + onChanged(); + return this; + } + + private long endBlock_ ; + /** + * uint64 end_block = 3; + * @return The endBlock. + */ + public long getEndBlock() { + return endBlock_; + } + /** + * uint64 end_block = 3; + * @param value The endBlock to set. + * @return This builder for chaining. + */ + public Builder setEndBlock(long value) { + + endBlock_ = value; + onChanged(); + return this; + } + /** + * uint64 end_block = 3; + * @return This builder for chaining. + */ + public Builder clearEndBlock() { + + endBlock_ = 0L; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetEventsRequest) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetEventsRequest) + private static final Observation.GetEventsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetEventsRequest(); + } + + public static Observation.GetEventsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEventsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetEventsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetEventsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flow.services.observation.GetEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + java.util.List + getEventsList(); + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + Entities.Event getEvents(int index); + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + int getEventsCount(); + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + java.util.List + getEventsOrBuilderList(); + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + Entities.EventOrBuilder getEventsOrBuilder( + int index); + } + /** + * Protobuf type {@code flow.services.observation.GetEventsResponse} + */ + public static final class GetEventsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flow.services.observation.GetEventsResponse) + GetEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEventsResponse.newBuilder() to construct. + private GetEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetEventsResponse() { + events_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GetEventsResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetEventsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + events_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + events_.add( + input.readMessage(Entities.Event.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetEventsResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetEventsResponse.class, Observation.GetEventsResponse.Builder.class); + } + + public static final int EVENTS_FIELD_NUMBER = 1; + private java.util.List events_; + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public java.util.List getEventsList() { + return events_; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public int getEventsCount() { + return events_.size(); + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.Event getEvents(int index) { + return events_.get(index); + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.EventOrBuilder getEventsOrBuilder( + int index) { + return events_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < events_.size(); i++) { + output.writeMessage(1, events_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, events_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Observation.GetEventsResponse)) { + return super.equals(obj); + } + Observation.GetEventsResponse other = (Observation.GetEventsResponse) obj; + + if (!getEventsList() + .equals(other.getEventsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Observation.GetEventsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetEventsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetEventsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetEventsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static Observation.GetEventsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static Observation.GetEventsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetEventsResponse 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 Observation.GetEventsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static Observation.GetEventsResponse 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 Observation.GetEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static Observation.GetEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(Observation.GetEventsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code flow.services.observation.GetEventsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flow.services.observation.GetEventsResponse) + Observation.GetEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Observation.internal_static_flow_services_observation_GetEventsResponse_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Observation.internal_static_flow_services_observation_GetEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + Observation.GetEventsResponse.class, Observation.GetEventsResponse.Builder.class); + } + + // Construct using Observation.GetEventsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEventsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + eventsBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Observation.internal_static_flow_services_observation_GetEventsResponse_descriptor; + } + + @Override + public Observation.GetEventsResponse getDefaultInstanceForType() { + return Observation.GetEventsResponse.getDefaultInstance(); + } + + @Override + public Observation.GetEventsResponse build() { + Observation.GetEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Observation.GetEventsResponse buildPartial() { + Observation.GetEventsResponse result = new Observation.GetEventsResponse(this); + int from_bitField0_ = bitField0_; + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Observation.GetEventsResponse) { + return mergeFrom((Observation.GetEventsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Observation.GetEventsResponse other) { + if (other == Observation.GetEventsResponse.getDefaultInstance()) return this; + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEventsFieldBuilder() : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Observation.GetEventsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Observation.GetEventsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List events_ = + java.util.Collections.emptyList(); + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + events_ = new java.util.ArrayList(events_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Event, Entities.Event.Builder, Entities.EventOrBuilder> eventsBuilder_; + + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.Event getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder setEvents( + int index, Entities.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder setEvents( + int index, Entities.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder addEvents(Entities.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder addEvents( + int index, Entities.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder addEvents( + Entities.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder addEvents( + int index, Entities.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder addAllEvents( + Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.Event.Builder getEventsBuilder( + int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.EventOrBuilder getEventsOrBuilder( + int index) { + if (eventsBuilder_ == null) { + return events_.get(index); } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.Event.Builder addEventsBuilder() { + return getEventsFieldBuilder().addBuilder( + Entities.Event.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public Entities.Event.Builder addEventsBuilder( + int index) { + return getEventsFieldBuilder().addBuilder( + index, Entities.Event.getDefaultInstance()); + } + /** + * repeated .flow.sdk.entities.Event events = 1; + */ + public java.util.List + getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Event, Entities.Event.Builder, Entities.EventOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + Entities.Event, Entities.Event.Builder, Entities.EventOrBuilder>( + events_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + events_ = null; + } + return eventsBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flow.services.observation.GetEventsResponse) + } + + // @@protoc_insertion_point(class_scope:flow.services.observation.GetEventsResponse) + private static final Observation.GetEventsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new Observation.GetEventsResponse(); + } + + public static Observation.GetEventsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GetEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEventsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Observation.GetEventsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_PingRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_PingRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_PingResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_PingResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetLatestBlockHeaderRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetLatestBlockHeaderRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetBlockHeaderByIDRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetBlockHeaderByIDRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_BlockHeaderResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_BlockHeaderResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetLatestBlockRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetLatestBlockRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetBlockByIDRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetBlockByIDRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetBlockByHeightRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetBlockByHeightRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_BlockResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_BlockResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetCollectionByIDRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetCollectionByIDRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_CollectionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_CollectionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_SendTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_SendTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_SendTransactionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_SendTransactionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_TransactionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_TransactionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_TransactionResultResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_TransactionResultResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetAccountRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetAccountRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetAccountResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetAccountResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_ExecuteScriptRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_ExecuteScriptRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_ExecuteScriptResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_ExecuteScriptResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetEventsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetEventsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flow_services_observation_GetEventsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flow_services_observation_GetEventsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n&services/observation/observation.proto" + + "\022\031flow.services.observation\032\033sdk/entitie" + + "s/entities.proto\"\r\n\013PingRequest\"\016\n\014PingR" + + "esponse\"0\n\033GetLatestBlockHeaderRequest\022\021" + + "\n\tis_sealed\030\001 \001(\010\"\'\n\031GetBlockHeaderByIDR" + + "equest\022\n\n\002id\030\001 \001(\014\"/\n\035GetBlockHeaderByHe" + + "ightRequest\022\016\n\006height\030\001 \001(\004\"D\n\023BlockHead" + + "erResponse\022-\n\005block\030\001 \001(\0132\036.flow.sdk.ent" + + "ities.BlockHeader\"*\n\025GetLatestBlockReque" + + "st\022\021\n\tis_sealed\030\001 \001(\010\"!\n\023GetBlockByIDReq" + + "uest\022\n\n\002id\030\001 \001(\014\")\n\027GetBlockByHeightRequ" + + "est\022\016\n\006height\030\001 \001(\004\"8\n\rBlockResponse\022\'\n\005" + + "block\030\001 \001(\0132\030.flow.sdk.entities.Block\"&\n" + + "\030GetCollectionByIDRequest\022\n\n\002id\030\001 \001(\014\"G\n" + + "\022CollectionResponse\0221\n\ncollection\030\001 \001(\0132" + + "\035.flow.sdk.entities.Collection\"M\n\026SendTr" + + "ansactionRequest\0223\n\013transaction\030\001 \001(\0132\036." + + "flow.sdk.entities.Transaction\"%\n\027SendTra" + + "nsactionResponse\022\n\n\002id\030\001 \001(\014\"#\n\025GetTrans" + + "actionRequest\022\n\n\002id\030\001 \001(\014\"J\n\023Transaction" + + "Response\0223\n\013transaction\030\001 \001(\0132\036.flow.sdk" + + ".entities.Transaction\"{\n\031TransactionResu" + + "ltResponse\0224\n\006status\030\001 \001(\0162$.flow.sdk.en" + + "tities.TransactionStatus\022(\n\006events\030\002 \003(\013" + + "2\030.flow.sdk.entities.Event\"$\n\021GetAccount" + + "Request\022\017\n\007address\030\001 \001(\014\"A\n\022GetAccountRe" + + "sponse\022+\n\007account\030\001 \001(\0132\032.flow.sdk.entit" + + "ies.Account\"&\n\024ExecuteScriptRequest\022\016\n\006s" + + "cript\030\001 \001(\014\"&\n\025ExecuteScriptResponse\022\r\n\005" + + "value\030\001 \001(\014\"H\n\020GetEventsRequest\022\014\n\004type\030" + + "\001 \001(\t\022\023\n\013start_block\030\002 \001(\004\022\021\n\tend_block\030" + + "\003 \001(\004\"=\n\021GetEventsResponse\022(\n\006events\030\001 \003" + + "(\0132\030.flow.sdk.entities.Event2\342\014\n\016Observe" + + "Service\022W\n\004Ping\022&.flow.services.observat" + + "ion.PingRequest\032\'.flow.services.observat" + + "ion.PingResponse\022~\n\024GetLatestBlockHeader" + + "\0226.flow.services.observation.GetLatestBl" + + "ockHeaderRequest\032..flow.services.observa" + + "tion.BlockHeaderResponse\022z\n\022GetBlockHead" + + "erByID\0224.flow.services.observation.GetBl" + + "ockHeaderByIDRequest\032..flow.services.obs" + + "ervation.BlockHeaderResponse\022\202\001\n\026GetBloc" + + "kHeaderByHeight\0228.flow.services.observat" + + "ion.GetBlockHeaderByHeightRequest\032..flow" + + ".services.observation.BlockHeaderRespons" + + "e\022l\n\016GetLatestBlock\0220.flow.services.obse" + + "rvation.GetLatestBlockRequest\032(.flow.ser" + + "vices.observation.BlockResponse\022h\n\014GetBl" + + "ockByID\022..flow.services.observation.GetB" + + "lockByIDRequest\032(.flow.services.observat" + + "ion.BlockResponse\022p\n\020GetBlockByHeight\0222." + + "flow.services.observation.GetBlockByHeig" + + "htRequest\032(.flow.services.observation.Bl" + + "ockResponse\022w\n\021GetCollectionByID\0223.flow." + + "services.observation.GetCollectionByIDRe" + + "quest\032-.flow.services.observation.Collec" + + "tionResponse\022x\n\017SendTransaction\0221.flow.s" + + "ervices.observation.SendTransactionReque" + + "st\0322.flow.services.observation.SendTrans" + + "actionResponse\022r\n\016GetTransaction\0220.flow." + + "services.observation.GetTransactionReque" + + "st\032..flow.services.observation.Transacti" + + "onResponse\022~\n\024GetTransactionResult\0220.flo" + + "w.services.observation.GetTransactionReq" + + "uest\0324.flow.services.observation.Transac" + + "tionResultResponse\022i\n\nGetAccount\022,.flow." + + "services.observation.GetAccountRequest\032-" + + ".flow.services.observation.GetAccountRes" + + "ponse\022r\n\rExecuteScript\022/.flow.services.o" + + "bservation.ExecuteScriptRequest\0320.flow.s" + + "ervices.observation.ExecuteScriptRespons" + + "e\022f\n\tGetEvents\022+.flow.services.observati" + + "on.GetEventsRequest\032,.flow.services.obse" + + "rvation.GetEventsResponseB\rZ\013observation" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + Entities.getDescriptor(), + }); + internal_static_flow_services_observation_PingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_flow_services_observation_PingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_PingRequest_descriptor, + new String[] { }); + internal_static_flow_services_observation_PingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_flow_services_observation_PingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_PingResponse_descriptor, + new String[] { }); + internal_static_flow_services_observation_GetLatestBlockHeaderRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_flow_services_observation_GetLatestBlockHeaderRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetLatestBlockHeaderRequest_descriptor, + new String[] { "IsSealed", }); + internal_static_flow_services_observation_GetBlockHeaderByIDRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_flow_services_observation_GetBlockHeaderByIDRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetBlockHeaderByIDRequest_descriptor, + new String[] { "Id", }); + internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetBlockHeaderByHeightRequest_descriptor, + new String[] { "Height", }); + internal_static_flow_services_observation_BlockHeaderResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_flow_services_observation_BlockHeaderResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_BlockHeaderResponse_descriptor, + new String[] { "Block", }); + internal_static_flow_services_observation_GetLatestBlockRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_flow_services_observation_GetLatestBlockRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetLatestBlockRequest_descriptor, + new String[] { "IsSealed", }); + internal_static_flow_services_observation_GetBlockByIDRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_flow_services_observation_GetBlockByIDRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetBlockByIDRequest_descriptor, + new String[] { "Id", }); + internal_static_flow_services_observation_GetBlockByHeightRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_flow_services_observation_GetBlockByHeightRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetBlockByHeightRequest_descriptor, + new String[] { "Height", }); + internal_static_flow_services_observation_BlockResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_flow_services_observation_BlockResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_BlockResponse_descriptor, + new String[] { "Block", }); + internal_static_flow_services_observation_GetCollectionByIDRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_flow_services_observation_GetCollectionByIDRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetCollectionByIDRequest_descriptor, + new String[] { "Id", }); + internal_static_flow_services_observation_CollectionResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_flow_services_observation_CollectionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_CollectionResponse_descriptor, + new String[] { "Collection", }); + internal_static_flow_services_observation_SendTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_flow_services_observation_SendTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_SendTransactionRequest_descriptor, + new String[] { "Transaction", }); + internal_static_flow_services_observation_SendTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_flow_services_observation_SendTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_SendTransactionResponse_descriptor, + new String[] { "Id", }); + internal_static_flow_services_observation_GetTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_flow_services_observation_GetTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetTransactionRequest_descriptor, + new String[] { "Id", }); + internal_static_flow_services_observation_TransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_flow_services_observation_TransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_TransactionResponse_descriptor, + new String[] { "Transaction", }); + internal_static_flow_services_observation_TransactionResultResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_flow_services_observation_TransactionResultResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_TransactionResultResponse_descriptor, + new String[] { "Status", "Events", }); + internal_static_flow_services_observation_GetAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_flow_services_observation_GetAccountRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetAccountRequest_descriptor, + new String[] { "Address", }); + internal_static_flow_services_observation_GetAccountResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_flow_services_observation_GetAccountResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetAccountResponse_descriptor, + new String[] { "Account", }); + internal_static_flow_services_observation_ExecuteScriptRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_flow_services_observation_ExecuteScriptRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_ExecuteScriptRequest_descriptor, + new String[] { "Script", }); + internal_static_flow_services_observation_ExecuteScriptResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_flow_services_observation_ExecuteScriptResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_ExecuteScriptResponse_descriptor, + new String[] { "Value", }); + internal_static_flow_services_observation_GetEventsRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_flow_services_observation_GetEventsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetEventsRequest_descriptor, + new String[] { "Type", "StartBlock", "EndBlock", }); + internal_static_flow_services_observation_GetEventsResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_flow_services_observation_GetEventsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flow_services_observation_GetEventsResponse_descriptor, + new String[] { "Events", }); + Entities.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/app/src/main/java/com/tangem/wallet/flowDemo/proto/ObserveServiceGrpc.java b/app/src/main/java/com/tangem/wallet/flowDemo/proto/ObserveServiceGrpc.java new file mode 100644 index 0000000000..f9b793fa49 --- /dev/null +++ b/app/src/main/java/com/tangem/wallet/flowDemo/proto/ObserveServiceGrpc.java @@ -0,0 +1,1423 @@ +package com.tangem.wallet.flowDemo.proto; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * ObserveService is the public-facing API provided by observation nodes.
+ * 
+ */ + +public final class ObserveServiceGrpc { + + private ObserveServiceGrpc() {} + + public static final String SERVICE_NAME = "flow.services.observation.ObserveService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getPingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Ping", + requestType = Observation.PingRequest.class, + responseType = Observation.PingResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPingMethod() { + io.grpc.MethodDescriptor getPingMethod; + if ((getPingMethod = ObserveServiceGrpc.getPingMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getPingMethod = ObserveServiceGrpc.getPingMethod) == null) { + ObserveServiceGrpc.getPingMethod = getPingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Ping")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.PingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.PingResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("Ping")) + .build(); + } + } + } + return getPingMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLatestBlockHeaderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLatestBlockHeader", + requestType = Observation.GetLatestBlockHeaderRequest.class, + responseType = Observation.BlockHeaderResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetLatestBlockHeaderMethod() { + io.grpc.MethodDescriptor getGetLatestBlockHeaderMethod; + if ((getGetLatestBlockHeaderMethod = ObserveServiceGrpc.getGetLatestBlockHeaderMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetLatestBlockHeaderMethod = ObserveServiceGrpc.getGetLatestBlockHeaderMethod) == null) { + ObserveServiceGrpc.getGetLatestBlockHeaderMethod = getGetLatestBlockHeaderMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLatestBlockHeader")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetLatestBlockHeaderRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.BlockHeaderResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetLatestBlockHeader")) + .build(); + } + } + } + return getGetLatestBlockHeaderMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockHeaderByIDMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockHeaderByID", + requestType = Observation.GetBlockHeaderByIDRequest.class, + responseType = Observation.BlockHeaderResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockHeaderByIDMethod() { + io.grpc.MethodDescriptor getGetBlockHeaderByIDMethod; + if ((getGetBlockHeaderByIDMethod = ObserveServiceGrpc.getGetBlockHeaderByIDMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetBlockHeaderByIDMethod = ObserveServiceGrpc.getGetBlockHeaderByIDMethod) == null) { + ObserveServiceGrpc.getGetBlockHeaderByIDMethod = getGetBlockHeaderByIDMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockHeaderByID")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetBlockHeaderByIDRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.BlockHeaderResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetBlockHeaderByID")) + .build(); + } + } + } + return getGetBlockHeaderByIDMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockHeaderByHeightMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockHeaderByHeight", + requestType = Observation.GetBlockHeaderByHeightRequest.class, + responseType = Observation.BlockHeaderResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockHeaderByHeightMethod() { + io.grpc.MethodDescriptor getGetBlockHeaderByHeightMethod; + if ((getGetBlockHeaderByHeightMethod = ObserveServiceGrpc.getGetBlockHeaderByHeightMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetBlockHeaderByHeightMethod = ObserveServiceGrpc.getGetBlockHeaderByHeightMethod) == null) { + ObserveServiceGrpc.getGetBlockHeaderByHeightMethod = getGetBlockHeaderByHeightMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockHeaderByHeight")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetBlockHeaderByHeightRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.BlockHeaderResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetBlockHeaderByHeight")) + .build(); + } + } + } + return getGetBlockHeaderByHeightMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLatestBlockMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLatestBlock", + requestType = Observation.GetLatestBlockRequest.class, + responseType = Observation.BlockResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetLatestBlockMethod() { + io.grpc.MethodDescriptor getGetLatestBlockMethod; + if ((getGetLatestBlockMethod = ObserveServiceGrpc.getGetLatestBlockMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetLatestBlockMethod = ObserveServiceGrpc.getGetLatestBlockMethod) == null) { + ObserveServiceGrpc.getGetLatestBlockMethod = getGetLatestBlockMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLatestBlock")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetLatestBlockRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.BlockResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetLatestBlock")) + .build(); + } + } + } + return getGetLatestBlockMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockByIDMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockByID", + requestType = Observation.GetBlockByIDRequest.class, + responseType = Observation.BlockResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockByIDMethod() { + io.grpc.MethodDescriptor getGetBlockByIDMethod; + if ((getGetBlockByIDMethod = ObserveServiceGrpc.getGetBlockByIDMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetBlockByIDMethod = ObserveServiceGrpc.getGetBlockByIDMethod) == null) { + ObserveServiceGrpc.getGetBlockByIDMethod = getGetBlockByIDMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockByID")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetBlockByIDRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.BlockResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetBlockByID")) + .build(); + } + } + } + return getGetBlockByIDMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockByHeightMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockByHeight", + requestType = Observation.GetBlockByHeightRequest.class, + responseType = Observation.BlockResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockByHeightMethod() { + io.grpc.MethodDescriptor getGetBlockByHeightMethod; + if ((getGetBlockByHeightMethod = ObserveServiceGrpc.getGetBlockByHeightMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetBlockByHeightMethod = ObserveServiceGrpc.getGetBlockByHeightMethod) == null) { + ObserveServiceGrpc.getGetBlockByHeightMethod = getGetBlockByHeightMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockByHeight")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetBlockByHeightRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.BlockResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetBlockByHeight")) + .build(); + } + } + } + return getGetBlockByHeightMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetCollectionByIDMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCollectionByID", + requestType = Observation.GetCollectionByIDRequest.class, + responseType = Observation.CollectionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetCollectionByIDMethod() { + io.grpc.MethodDescriptor getGetCollectionByIDMethod; + if ((getGetCollectionByIDMethod = ObserveServiceGrpc.getGetCollectionByIDMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetCollectionByIDMethod = ObserveServiceGrpc.getGetCollectionByIDMethod) == null) { + ObserveServiceGrpc.getGetCollectionByIDMethod = getGetCollectionByIDMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCollectionByID")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetCollectionByIDRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.CollectionResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetCollectionByID")) + .build(); + } + } + } + return getGetCollectionByIDMethod; + } + + private static volatile io.grpc.MethodDescriptor getSendTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SendTransaction", + requestType = Observation.SendTransactionRequest.class, + responseType = Observation.SendTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSendTransactionMethod() { + io.grpc.MethodDescriptor getSendTransactionMethod; + if ((getSendTransactionMethod = ObserveServiceGrpc.getSendTransactionMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getSendTransactionMethod = ObserveServiceGrpc.getSendTransactionMethod) == null) { + ObserveServiceGrpc.getSendTransactionMethod = getSendTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SendTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.SendTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.SendTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("SendTransaction")) + .build(); + } + } + } + return getSendTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTransaction", + requestType = Observation.GetTransactionRequest.class, + responseType = Observation.TransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTransactionMethod() { + io.grpc.MethodDescriptor getGetTransactionMethod; + if ((getGetTransactionMethod = ObserveServiceGrpc.getGetTransactionMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetTransactionMethod = ObserveServiceGrpc.getGetTransactionMethod) == null) { + ObserveServiceGrpc.getGetTransactionMethod = getGetTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.TransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetTransaction")) + .build(); + } + } + } + return getGetTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTransactionResultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTransactionResult", + requestType = Observation.GetTransactionRequest.class, + responseType = Observation.TransactionResultResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTransactionResultMethod() { + io.grpc.MethodDescriptor getGetTransactionResultMethod; + if ((getGetTransactionResultMethod = ObserveServiceGrpc.getGetTransactionResultMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetTransactionResultMethod = ObserveServiceGrpc.getGetTransactionResultMethod) == null) { + ObserveServiceGrpc.getGetTransactionResultMethod = getGetTransactionResultMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransactionResult")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.TransactionResultResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetTransactionResult")) + .build(); + } + } + } + return getGetTransactionResultMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAccount", + requestType = Observation.GetAccountRequest.class, + responseType = Observation.GetAccountResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAccountMethod() { + io.grpc.MethodDescriptor getGetAccountMethod; + if ((getGetAccountMethod = ObserveServiceGrpc.getGetAccountMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetAccountMethod = ObserveServiceGrpc.getGetAccountMethod) == null) { + ObserveServiceGrpc.getGetAccountMethod = getGetAccountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetAccountRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetAccountResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetAccount")) + .build(); + } + } + } + return getGetAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor getExecuteScriptMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecuteScript", + requestType = Observation.ExecuteScriptRequest.class, + responseType = Observation.ExecuteScriptResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExecuteScriptMethod() { + io.grpc.MethodDescriptor getExecuteScriptMethod; + if ((getExecuteScriptMethod = ObserveServiceGrpc.getExecuteScriptMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getExecuteScriptMethod = ObserveServiceGrpc.getExecuteScriptMethod) == null) { + ObserveServiceGrpc.getExecuteScriptMethod = getExecuteScriptMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteScript")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.ExecuteScriptRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.ExecuteScriptResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("ExecuteScript")) + .build(); + } + } + } + return getExecuteScriptMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEvents", + requestType = Observation.GetEventsRequest.class, + responseType = Observation.GetEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetEventsMethod() { + io.grpc.MethodDescriptor getGetEventsMethod; + if ((getGetEventsMethod = ObserveServiceGrpc.getGetEventsMethod) == null) { + synchronized (ObserveServiceGrpc.class) { + if ((getGetEventsMethod = ObserveServiceGrpc.getGetEventsMethod) == null) { + ObserveServiceGrpc.getGetEventsMethod = getGetEventsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetEventsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + Observation.GetEventsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ObserveServiceMethodDescriptorSupplier("GetEvents")) + .build(); + } + } + } + return getGetEventsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ObserveServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @Override + public ObserveServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObserveServiceStub(channel, callOptions); + } + }; + return ObserveServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ObserveServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @Override + public ObserveServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObserveServiceBlockingStub(channel, callOptions); + } + }; + return ObserveServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ObserveServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @Override + public ObserveServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObserveServiceFutureStub(channel, callOptions); + } + }; + return ObserveServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * ObserveService is the public-facing API provided by observation nodes.
+   * 
+ */ + public static abstract class ObserveServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * Ping is used to check if the observation node is alive and healthy.
+     * 
+ */ + public void ping(Observation.PingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPingMethod(), responseObserver); + } + + /** + *
+     * GetLatestBlockHeader gets the latest sealed or unsealed block header.
+     * 
+ */ + public void getLatestBlockHeader(Observation.GetLatestBlockHeaderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetLatestBlockHeaderMethod(), responseObserver); + } + + /** + *
+     * GetBlockHeaderByID gets a block header by ID.
+     * 
+ */ + public void getBlockHeaderByID(Observation.GetBlockHeaderByIDRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetBlockHeaderByIDMethod(), responseObserver); + } + + /** + *
+     * GetBlockHeaderByHeight gets a block header by height.
+     * 
+ */ + public void getBlockHeaderByHeight(Observation.GetBlockHeaderByHeightRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetBlockHeaderByHeightMethod(), responseObserver); + } + + /** + *
+     * GetLatestBlock gets the full payload of the latest sealed or unsealed block.
+     * 
+ */ + public void getLatestBlock(Observation.GetLatestBlockRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetLatestBlockMethod(), responseObserver); + } + + /** + *
+     * GetBlockByID gets a full block by ID.
+     * 
+ */ + public void getBlockByID(Observation.GetBlockByIDRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetBlockByIDMethod(), responseObserver); + } + + /** + *
+     * GetBlockByHeight gets a full block by height.
+     * 
+ */ + public void getBlockByHeight(Observation.GetBlockByHeightRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetBlockByHeightMethod(), responseObserver); + } + + /** + *
+     * GetCollectionByID gets a collection by ID.
+     * 
+ */ + public void getCollectionByID(Observation.GetCollectionByIDRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetCollectionByIDMethod(), responseObserver); + } + + /** + *
+     * SendTransaction submits a transaction to the network.
+     * 
+ */ + public void sendTransaction(Observation.SendTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSendTransactionMethod(), responseObserver); + } + + /** + *
+     * GetTransaction gets a transaction by ID.
+     * 
+ */ + public void getTransaction(Observation.GetTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetTransactionMethod(), responseObserver); + } + + /** + *
+     * GetTransactionResult gets the result of a transaction.
+     * 
+ */ + public void getTransactionResult(Observation.GetTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetTransactionResultMethod(), responseObserver); + } + + /** + *
+     * GetAccount gets an account by address.
+     * 
+ */ + public void getAccount(Observation.GetAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetAccountMethod(), responseObserver); + } + + /** + *
+     * ExecuteScript executes a script against the latest sealed world state.
+     * 
+ */ + public void executeScript(Observation.ExecuteScriptRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExecuteScriptMethod(), responseObserver); + } + + /** + *
+     * GetEvents retrieves events matching the given query.
+     * 
+ */ + public void getEvents(Observation.GetEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetEventsMethod(), responseObserver); + } + + @Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getPingMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.PingRequest, + Observation.PingResponse>( + this, METHODID_PING))) + .addMethod( + getGetLatestBlockHeaderMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetLatestBlockHeaderRequest, + Observation.BlockHeaderResponse>( + this, METHODID_GET_LATEST_BLOCK_HEADER))) + .addMethod( + getGetBlockHeaderByIDMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetBlockHeaderByIDRequest, + Observation.BlockHeaderResponse>( + this, METHODID_GET_BLOCK_HEADER_BY_ID))) + .addMethod( + getGetBlockHeaderByHeightMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetBlockHeaderByHeightRequest, + Observation.BlockHeaderResponse>( + this, METHODID_GET_BLOCK_HEADER_BY_HEIGHT))) + .addMethod( + getGetLatestBlockMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetLatestBlockRequest, + Observation.BlockResponse>( + this, METHODID_GET_LATEST_BLOCK))) + .addMethod( + getGetBlockByIDMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetBlockByIDRequest, + Observation.BlockResponse>( + this, METHODID_GET_BLOCK_BY_ID))) + .addMethod( + getGetBlockByHeightMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetBlockByHeightRequest, + Observation.BlockResponse>( + this, METHODID_GET_BLOCK_BY_HEIGHT))) + .addMethod( + getGetCollectionByIDMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetCollectionByIDRequest, + Observation.CollectionResponse>( + this, METHODID_GET_COLLECTION_BY_ID))) + .addMethod( + getSendTransactionMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.SendTransactionRequest, + Observation.SendTransactionResponse>( + this, METHODID_SEND_TRANSACTION))) + .addMethod( + getGetTransactionMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetTransactionRequest, + Observation.TransactionResponse>( + this, METHODID_GET_TRANSACTION))) + .addMethod( + getGetTransactionResultMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetTransactionRequest, + Observation.TransactionResultResponse>( + this, METHODID_GET_TRANSACTION_RESULT))) + .addMethod( + getGetAccountMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetAccountRequest, + Observation.GetAccountResponse>( + this, METHODID_GET_ACCOUNT))) + .addMethod( + getExecuteScriptMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.ExecuteScriptRequest, + Observation.ExecuteScriptResponse>( + this, METHODID_EXECUTE_SCRIPT))) + .addMethod( + getGetEventsMethod(), + asyncUnaryCall( + new MethodHandlers< + Observation.GetEventsRequest, + Observation.GetEventsResponse>( + this, METHODID_GET_EVENTS))) + .build(); + } + } + + /** + *
+   * ObserveService is the public-facing API provided by observation nodes.
+   * 
+ */ + public static final class ObserveServiceStub extends io.grpc.stub.AbstractAsyncStub { + private ObserveServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @Override + protected ObserveServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObserveServiceStub(channel, callOptions); + } + + /** + *
+     * Ping is used to check if the observation node is alive and healthy.
+     * 
+ */ + public void ping(Observation.PingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPingMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetLatestBlockHeader gets the latest sealed or unsealed block header.
+     * 
+ */ + public void getLatestBlockHeader(Observation.GetLatestBlockHeaderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetLatestBlockHeaderMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockHeaderByID gets a block header by ID.
+     * 
+ */ + public void getBlockHeaderByID(Observation.GetBlockHeaderByIDRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetBlockHeaderByIDMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockHeaderByHeight gets a block header by height.
+     * 
+ */ + public void getBlockHeaderByHeight(Observation.GetBlockHeaderByHeightRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetBlockHeaderByHeightMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetLatestBlock gets the full payload of the latest sealed or unsealed block.
+     * 
+ */ + public void getLatestBlock(Observation.GetLatestBlockRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetLatestBlockMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockByID gets a full block by ID.
+     * 
+ */ + public void getBlockByID(Observation.GetBlockByIDRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetBlockByIDMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockByHeight gets a full block by height.
+     * 
+ */ + public void getBlockByHeight(Observation.GetBlockByHeightRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetBlockByHeightMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetCollectionByID gets a collection by ID.
+     * 
+ */ + public void getCollectionByID(Observation.GetCollectionByIDRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCollectionByIDMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * SendTransaction submits a transaction to the network.
+     * 
+ */ + public void sendTransaction(Observation.SendTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSendTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetTransaction gets a transaction by ID.
+     * 
+ */ + public void getTransaction(Observation.GetTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetTransactionResult gets the result of a transaction.
+     * 
+ */ + public void getTransactionResult(Observation.GetTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTransactionResultMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetAccount gets an account by address.
+     * 
+ */ + public void getAccount(Observation.GetAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * ExecuteScript executes a script against the latest sealed world state.
+     * 
+ */ + public void executeScript(Observation.ExecuteScriptRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExecuteScriptMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetEvents retrieves events matching the given query.
+     * 
+ */ + public void getEvents(Observation.GetEventsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetEventsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * ObserveService is the public-facing API provided by observation nodes.
+   * 
+ */ + public static final class ObserveServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ObserveServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @Override + protected ObserveServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObserveServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * Ping is used to check if the observation node is alive and healthy.
+     * 
+ */ + public Observation.PingResponse ping(Observation.PingRequest request) { + return blockingUnaryCall( + getChannel(), getPingMethod(), getCallOptions(), request); + } + + /** + *
+     * GetLatestBlockHeader gets the latest sealed or unsealed block header.
+     * 
+ */ + public Observation.BlockHeaderResponse getLatestBlockHeader(Observation.GetLatestBlockHeaderRequest request) { + return blockingUnaryCall( + getChannel(), getGetLatestBlockHeaderMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockHeaderByID gets a block header by ID.
+     * 
+ */ + public Observation.BlockHeaderResponse getBlockHeaderByID(Observation.GetBlockHeaderByIDRequest request) { + return blockingUnaryCall( + getChannel(), getGetBlockHeaderByIDMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockHeaderByHeight gets a block header by height.
+     * 
+ */ + public Observation.BlockHeaderResponse getBlockHeaderByHeight(Observation.GetBlockHeaderByHeightRequest request) { + return blockingUnaryCall( + getChannel(), getGetBlockHeaderByHeightMethod(), getCallOptions(), request); + } + + /** + *
+     * GetLatestBlock gets the full payload of the latest sealed or unsealed block.
+     * 
+ */ + public Observation.BlockResponse getLatestBlock(Observation.GetLatestBlockRequest request) { + return blockingUnaryCall( + getChannel(), getGetLatestBlockMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockByID gets a full block by ID.
+     * 
+ */ + public Observation.BlockResponse getBlockByID(Observation.GetBlockByIDRequest request) { + return blockingUnaryCall( + getChannel(), getGetBlockByIDMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockByHeight gets a full block by height.
+     * 
+ */ + public Observation.BlockResponse getBlockByHeight(Observation.GetBlockByHeightRequest request) { + return blockingUnaryCall( + getChannel(), getGetBlockByHeightMethod(), getCallOptions(), request); + } + + /** + *
+     * GetCollectionByID gets a collection by ID.
+     * 
+ */ + public Observation.CollectionResponse getCollectionByID(Observation.GetCollectionByIDRequest request) { + return blockingUnaryCall( + getChannel(), getGetCollectionByIDMethod(), getCallOptions(), request); + } + + /** + *
+     * SendTransaction submits a transaction to the network.
+     * 
+ */ + public Observation.SendTransactionResponse sendTransaction(Observation.SendTransactionRequest request) { + return blockingUnaryCall( + getChannel(), getSendTransactionMethod(), getCallOptions(), request); + } + + /** + *
+     * GetTransaction gets a transaction by ID.
+     * 
+ */ + public Observation.TransactionResponse getTransaction(Observation.GetTransactionRequest request) { + return blockingUnaryCall( + getChannel(), getGetTransactionMethod(), getCallOptions(), request); + } + + /** + *
+     * GetTransactionResult gets the result of a transaction.
+     * 
+ */ + public Observation.TransactionResultResponse getTransactionResult(Observation.GetTransactionRequest request) { + return blockingUnaryCall( + getChannel(), getGetTransactionResultMethod(), getCallOptions(), request); + } + + /** + *
+     * GetAccount gets an account by address.
+     * 
+ */ + public Observation.GetAccountResponse getAccount(Observation.GetAccountRequest request) { + return blockingUnaryCall( + getChannel(), getGetAccountMethod(), getCallOptions(), request); + } + + /** + *
+     * ExecuteScript executes a script against the latest sealed world state.
+     * 
+ */ + public Observation.ExecuteScriptResponse executeScript(Observation.ExecuteScriptRequest request) { + return blockingUnaryCall( + getChannel(), getExecuteScriptMethod(), getCallOptions(), request); + } + + /** + *
+     * GetEvents retrieves events matching the given query.
+     * 
+ */ + public Observation.GetEventsResponse getEvents(Observation.GetEventsRequest request) { + return blockingUnaryCall( + getChannel(), getGetEventsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * ObserveService is the public-facing API provided by observation nodes.
+   * 
+ */ + public static final class ObserveServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private ObserveServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @Override + protected ObserveServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ObserveServiceFutureStub(channel, callOptions); + } + + /** + *
+     * Ping is used to check if the observation node is alive and healthy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture ping( + Observation.PingRequest request) { + return futureUnaryCall( + getChannel().newCall(getPingMethod(), getCallOptions()), request); + } + + /** + *
+     * GetLatestBlockHeader gets the latest sealed or unsealed block header.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getLatestBlockHeader( + Observation.GetLatestBlockHeaderRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetLatestBlockHeaderMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockHeaderByID gets a block header by ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockHeaderByID( + Observation.GetBlockHeaderByIDRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetBlockHeaderByIDMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockHeaderByHeight gets a block header by height.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockHeaderByHeight( + Observation.GetBlockHeaderByHeightRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetBlockHeaderByHeightMethod(), getCallOptions()), request); + } + + /** + *
+     * GetLatestBlock gets the full payload of the latest sealed or unsealed block.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getLatestBlock( + Observation.GetLatestBlockRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetLatestBlockMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockByID gets a full block by ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockByID( + Observation.GetBlockByIDRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetBlockByIDMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockByHeight gets a full block by height.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockByHeight( + Observation.GetBlockByHeightRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetBlockByHeightMethod(), getCallOptions()), request); + } + + /** + *
+     * GetCollectionByID gets a collection by ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getCollectionByID( + Observation.GetCollectionByIDRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetCollectionByIDMethod(), getCallOptions()), request); + } + + /** + *
+     * SendTransaction submits a transaction to the network.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture sendTransaction( + Observation.SendTransactionRequest request) { + return futureUnaryCall( + getChannel().newCall(getSendTransactionMethod(), getCallOptions()), request); + } + + /** + *
+     * GetTransaction gets a transaction by ID.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTransaction( + Observation.GetTransactionRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request); + } + + /** + *
+     * GetTransactionResult gets the result of a transaction.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTransactionResult( + Observation.GetTransactionRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTransactionResultMethod(), getCallOptions()), request); + } + + /** + *
+     * GetAccount gets an account by address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAccount( + Observation.GetAccountRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); + } + + /** + *
+     * ExecuteScript executes a script against the latest sealed world state.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture executeScript( + Observation.ExecuteScriptRequest request) { + return futureUnaryCall( + getChannel().newCall(getExecuteScriptMethod(), getCallOptions()), request); + } + + /** + *
+     * GetEvents retrieves events matching the given query.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getEvents( + Observation.GetEventsRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetEventsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_PING = 0; + private static final int METHODID_GET_LATEST_BLOCK_HEADER = 1; + private static final int METHODID_GET_BLOCK_HEADER_BY_ID = 2; + private static final int METHODID_GET_BLOCK_HEADER_BY_HEIGHT = 3; + private static final int METHODID_GET_LATEST_BLOCK = 4; + private static final int METHODID_GET_BLOCK_BY_ID = 5; + private static final int METHODID_GET_BLOCK_BY_HEIGHT = 6; + private static final int METHODID_GET_COLLECTION_BY_ID = 7; + private static final int METHODID_SEND_TRANSACTION = 8; + private static final int METHODID_GET_TRANSACTION = 9; + private static final int METHODID_GET_TRANSACTION_RESULT = 10; + private static final int METHODID_GET_ACCOUNT = 11; + private static final int METHODID_EXECUTE_SCRIPT = 12; + private static final int METHODID_GET_EVENTS = 13; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ObserveServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ObserveServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @Override + @SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_PING: + serviceImpl.ping((Observation.PingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LATEST_BLOCK_HEADER: + serviceImpl.getLatestBlockHeader((Observation.GetLatestBlockHeaderRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCK_HEADER_BY_ID: + serviceImpl.getBlockHeaderByID((Observation.GetBlockHeaderByIDRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCK_HEADER_BY_HEIGHT: + serviceImpl.getBlockHeaderByHeight((Observation.GetBlockHeaderByHeightRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LATEST_BLOCK: + serviceImpl.getLatestBlock((Observation.GetLatestBlockRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCK_BY_ID: + serviceImpl.getBlockByID((Observation.GetBlockByIDRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCK_BY_HEIGHT: + serviceImpl.getBlockByHeight((Observation.GetBlockByHeightRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_COLLECTION_BY_ID: + serviceImpl.getCollectionByID((Observation.GetCollectionByIDRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SEND_TRANSACTION: + serviceImpl.sendTransaction((Observation.SendTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TRANSACTION: + serviceImpl.getTransaction((Observation.GetTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TRANSACTION_RESULT: + serviceImpl.getTransactionResult((Observation.GetTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ACCOUNT: + serviceImpl.getAccount((Observation.GetAccountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXECUTE_SCRIPT: + serviceImpl.executeScript((Observation.ExecuteScriptRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_EVENTS: + serviceImpl.getEvents((Observation.GetEventsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @Override + @SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ObserveServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ObserveServiceBaseDescriptorSupplier() {} + + @Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return Observation.getDescriptor(); + } + + @Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ObserveService"); + } + } + + private static final class ObserveServiceFileDescriptorSupplier + extends ObserveServiceBaseDescriptorSupplier { + ObserveServiceFileDescriptorSupplier() {} + } + + private static final class ObserveServiceMethodDescriptorSupplier + extends ObserveServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ObserveServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ObserveServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ObserveServiceFileDescriptorSupplier()) + .addMethod(getPingMethod()) + .addMethod(getGetLatestBlockHeaderMethod()) + .addMethod(getGetBlockHeaderByIDMethod()) + .addMethod(getGetBlockHeaderByHeightMethod()) + .addMethod(getGetLatestBlockMethod()) + .addMethod(getGetBlockByIDMethod()) + .addMethod(getGetBlockByHeightMethod()) + .addMethod(getGetCollectionByIDMethod()) + .addMethod(getSendTransactionMethod()) + .addMethod(getGetTransactionMethod()) + .addMethod(getGetTransactionResultMethod()) + .addMethod(getGetAccountMethod()) + .addMethod(getExecuteScriptMethod()) + .addMethod(getGetEventsMethod()) + .build(); + } + } + } + return result; + } +}