// Generated by the protocol buffer compiler. DO NOT EDIT! // source: messages.proto package com.satoshilabs.trezor.protobuf; public final class TrezorMessage { private TrezorMessage() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } /** * Protobuf enum {@code MessageType} * * <pre> ** * Mapping between Trezor wire identifier (uint) and a protobuf message * </pre> */ public enum MessageType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>MessageType_Initialize = 0;</code> */ MessageType_Initialize(0, 0), /** * <code>MessageType_Ping = 1;</code> */ MessageType_Ping(1, 1), /** * <code>MessageType_Success = 2;</code> */ MessageType_Success(2, 2), /** * <code>MessageType_Failure = 3;</code> */ MessageType_Failure(3, 3), /** * <code>MessageType_ChangePin = 4;</code> */ MessageType_ChangePin(4, 4), /** * <code>MessageType_WipeDevice = 5;</code> */ MessageType_WipeDevice(5, 5), /** * <code>MessageType_FirmwareErase = 6;</code> */ MessageType_FirmwareErase(6, 6), /** * <code>MessageType_FirmwareUpload = 7;</code> */ MessageType_FirmwareUpload(7, 7), /** * <code>MessageType_GetEntropy = 9;</code> */ MessageType_GetEntropy(8, 9), /** * <code>MessageType_Entropy = 10;</code> */ MessageType_Entropy(9, 10), /** * <code>MessageType_GetPublicKey = 11;</code> */ MessageType_GetPublicKey(10, 11), /** * <code>MessageType_PublicKey = 12;</code> */ MessageType_PublicKey(11, 12), /** * <code>MessageType_LoadDevice = 13;</code> */ MessageType_LoadDevice(12, 13), /** * <code>MessageType_ResetDevice = 14;</code> */ MessageType_ResetDevice(13, 14), /** * <code>MessageType_SignTx = 15;</code> */ MessageType_SignTx(14, 15), /** * <code>MessageType_SimpleSignTx = 16;</code> */ MessageType_SimpleSignTx(15, 16), /** * <code>MessageType_Features = 17;</code> */ MessageType_Features(16, 17), /** * <code>MessageType_PinMatrixRequest = 18;</code> */ MessageType_PinMatrixRequest(17, 18), /** * <code>MessageType_PinMatrixAck = 19;</code> */ MessageType_PinMatrixAck(18, 19), /** * <code>MessageType_Cancel = 20;</code> */ MessageType_Cancel(19, 20), /** * <code>MessageType_TxRequest = 21;</code> */ MessageType_TxRequest(20, 21), /** * <code>MessageType_TxAck = 22;</code> */ MessageType_TxAck(21, 22), /** * <code>MessageType_CipherKeyValue = 23;</code> */ MessageType_CipherKeyValue(22, 23), /** * <code>MessageType_CipheredKeyValue = 48;</code> */ MessageType_CipheredKeyValue(23, 48), /** * <code>MessageType_ClearSession = 24;</code> */ MessageType_ClearSession(24, 24), /** * <code>MessageType_ApplySettings = 25;</code> */ MessageType_ApplySettings(25, 25), /** * <code>MessageType_ButtonRequest = 26;</code> */ MessageType_ButtonRequest(26, 26), /** * <code>MessageType_ButtonAck = 27;</code> */ MessageType_ButtonAck(27, 27), /** * <code>MessageType_GetAddress = 29;</code> */ MessageType_GetAddress(28, 29), /** * <code>MessageType_Address = 30;</code> */ MessageType_Address(29, 30), /** * <code>MessageType_EntropyRequest = 35;</code> */ MessageType_EntropyRequest(30, 35), /** * <code>MessageType_EntropyAck = 36;</code> */ MessageType_EntropyAck(31, 36), /** * <code>MessageType_SignMessage = 38;</code> */ MessageType_SignMessage(32, 38), /** * <code>MessageType_VerifyMessage = 39;</code> */ MessageType_VerifyMessage(33, 39), /** * <code>MessageType_MessageSignature = 40;</code> */ MessageType_MessageSignature(34, 40), /** * <code>MessageType_EncryptMessage = 49;</code> */ MessageType_EncryptMessage(35, 49), /** * <code>MessageType_EncryptedMessage = 50;</code> */ MessageType_EncryptedMessage(36, 50), /** * <code>MessageType_DecryptMessage = 51;</code> */ MessageType_DecryptMessage(37, 51), /** * <code>MessageType_DecryptedMessage = 52;</code> */ MessageType_DecryptedMessage(38, 52), /** * <code>MessageType_PassphraseRequest = 41;</code> */ MessageType_PassphraseRequest(39, 41), /** * <code>MessageType_PassphraseAck = 42;</code> */ MessageType_PassphraseAck(40, 42), /** * <code>MessageType_EstimateTxSize = 43;</code> */ MessageType_EstimateTxSize(41, 43), /** * <code>MessageType_TxSize = 44;</code> */ MessageType_TxSize(42, 44), /** * <code>MessageType_RecoveryDevice = 45;</code> */ MessageType_RecoveryDevice(43, 45), /** * <code>MessageType_WordRequest = 46;</code> */ MessageType_WordRequest(44, 46), /** * <code>MessageType_WordAck = 47;</code> */ MessageType_WordAck(45, 47), /** * <code>MessageType_DebugLinkDecision = 100;</code> */ MessageType_DebugLinkDecision(46, 100), /** * <code>MessageType_DebugLinkGetState = 101;</code> */ MessageType_DebugLinkGetState(47, 101), /** * <code>MessageType_DebugLinkState = 102;</code> */ MessageType_DebugLinkState(48, 102), /** * <code>MessageType_DebugLinkStop = 103;</code> */ MessageType_DebugLinkStop(49, 103), /** * <code>MessageType_DebugLinkLog = 104;</code> */ MessageType_DebugLinkLog(50, 104), ; /** * <code>MessageType_Initialize = 0;</code> */ public static final int MessageType_Initialize_VALUE = 0; /** * <code>MessageType_Ping = 1;</code> */ public static final int MessageType_Ping_VALUE = 1; /** * <code>MessageType_Success = 2;</code> */ public static final int MessageType_Success_VALUE = 2; /** * <code>MessageType_Failure = 3;</code> */ public static final int MessageType_Failure_VALUE = 3; /** * <code>MessageType_ChangePin = 4;</code> */ public static final int MessageType_ChangePin_VALUE = 4; /** * <code>MessageType_WipeDevice = 5;</code> */ public static final int MessageType_WipeDevice_VALUE = 5; /** * <code>MessageType_FirmwareErase = 6;</code> */ public static final int MessageType_FirmwareErase_VALUE = 6; /** * <code>MessageType_FirmwareUpload = 7;</code> */ public static final int MessageType_FirmwareUpload_VALUE = 7; /** * <code>MessageType_GetEntropy = 9;</code> */ public static final int MessageType_GetEntropy_VALUE = 9; /** * <code>MessageType_Entropy = 10;</code> */ public static final int MessageType_Entropy_VALUE = 10; /** * <code>MessageType_GetPublicKey = 11;</code> */ public static final int MessageType_GetPublicKey_VALUE = 11; /** * <code>MessageType_PublicKey = 12;</code> */ public static final int MessageType_PublicKey_VALUE = 12; /** * <code>MessageType_LoadDevice = 13;</code> */ public static final int MessageType_LoadDevice_VALUE = 13; /** * <code>MessageType_ResetDevice = 14;</code> */ public static final int MessageType_ResetDevice_VALUE = 14; /** * <code>MessageType_SignTx = 15;</code> */ public static final int MessageType_SignTx_VALUE = 15; /** * <code>MessageType_SimpleSignTx = 16;</code> */ public static final int MessageType_SimpleSignTx_VALUE = 16; /** * <code>MessageType_Features = 17;</code> */ public static final int MessageType_Features_VALUE = 17; /** * <code>MessageType_PinMatrixRequest = 18;</code> */ public static final int MessageType_PinMatrixRequest_VALUE = 18; /** * <code>MessageType_PinMatrixAck = 19;</code> */ public static final int MessageType_PinMatrixAck_VALUE = 19; /** * <code>MessageType_Cancel = 20;</code> */ public static final int MessageType_Cancel_VALUE = 20; /** * <code>MessageType_TxRequest = 21;</code> */ public static final int MessageType_TxRequest_VALUE = 21; /** * <code>MessageType_TxAck = 22;</code> */ public static final int MessageType_TxAck_VALUE = 22; /** * <code>MessageType_CipherKeyValue = 23;</code> */ public static final int MessageType_CipherKeyValue_VALUE = 23; /** * <code>MessageType_CipheredKeyValue = 48;</code> */ public static final int MessageType_CipheredKeyValue_VALUE = 48; /** * <code>MessageType_ClearSession = 24;</code> */ public static final int MessageType_ClearSession_VALUE = 24; /** * <code>MessageType_ApplySettings = 25;</code> */ public static final int MessageType_ApplySettings_VALUE = 25; /** * <code>MessageType_ButtonRequest = 26;</code> */ public static final int MessageType_ButtonRequest_VALUE = 26; /** * <code>MessageType_ButtonAck = 27;</code> */ public static final int MessageType_ButtonAck_VALUE = 27; /** * <code>MessageType_GetAddress = 29;</code> */ public static final int MessageType_GetAddress_VALUE = 29; /** * <code>MessageType_Address = 30;</code> */ public static final int MessageType_Address_VALUE = 30; /** * <code>MessageType_EntropyRequest = 35;</code> */ public static final int MessageType_EntropyRequest_VALUE = 35; /** * <code>MessageType_EntropyAck = 36;</code> */ public static final int MessageType_EntropyAck_VALUE = 36; /** * <code>MessageType_SignMessage = 38;</code> */ public static final int MessageType_SignMessage_VALUE = 38; /** * <code>MessageType_VerifyMessage = 39;</code> */ public static final int MessageType_VerifyMessage_VALUE = 39; /** * <code>MessageType_MessageSignature = 40;</code> */ public static final int MessageType_MessageSignature_VALUE = 40; /** * <code>MessageType_EncryptMessage = 49;</code> */ public static final int MessageType_EncryptMessage_VALUE = 49; /** * <code>MessageType_EncryptedMessage = 50;</code> */ public static final int MessageType_EncryptedMessage_VALUE = 50; /** * <code>MessageType_DecryptMessage = 51;</code> */ public static final int MessageType_DecryptMessage_VALUE = 51; /** * <code>MessageType_DecryptedMessage = 52;</code> */ public static final int MessageType_DecryptedMessage_VALUE = 52; /** * <code>MessageType_PassphraseRequest = 41;</code> */ public static final int MessageType_PassphraseRequest_VALUE = 41; /** * <code>MessageType_PassphraseAck = 42;</code> */ public static final int MessageType_PassphraseAck_VALUE = 42; /** * <code>MessageType_EstimateTxSize = 43;</code> */ public static final int MessageType_EstimateTxSize_VALUE = 43; /** * <code>MessageType_TxSize = 44;</code> */ public static final int MessageType_TxSize_VALUE = 44; /** * <code>MessageType_RecoveryDevice = 45;</code> */ public static final int MessageType_RecoveryDevice_VALUE = 45; /** * <code>MessageType_WordRequest = 46;</code> */ public static final int MessageType_WordRequest_VALUE = 46; /** * <code>MessageType_WordAck = 47;</code> */ public static final int MessageType_WordAck_VALUE = 47; /** * <code>MessageType_DebugLinkDecision = 100;</code> */ public static final int MessageType_DebugLinkDecision_VALUE = 100; /** * <code>MessageType_DebugLinkGetState = 101;</code> */ public static final int MessageType_DebugLinkGetState_VALUE = 101; /** * <code>MessageType_DebugLinkState = 102;</code> */ public static final int MessageType_DebugLinkState_VALUE = 102; /** * <code>MessageType_DebugLinkStop = 103;</code> */ public static final int MessageType_DebugLinkStop_VALUE = 103; /** * <code>MessageType_DebugLinkLog = 104;</code> */ public static final int MessageType_DebugLinkLog_VALUE = 104; public final int getNumber() { return value; } public static MessageType valueOf(int value) { switch (value) { case 0: return MessageType_Initialize; case 1: return MessageType_Ping; case 2: return MessageType_Success; case 3: return MessageType_Failure; case 4: return MessageType_ChangePin; case 5: return MessageType_WipeDevice; case 6: return MessageType_FirmwareErase; case 7: return MessageType_FirmwareUpload; case 9: return MessageType_GetEntropy; case 10: return MessageType_Entropy; case 11: return MessageType_GetPublicKey; case 12: return MessageType_PublicKey; case 13: return MessageType_LoadDevice; case 14: return MessageType_ResetDevice; case 15: return MessageType_SignTx; case 16: return MessageType_SimpleSignTx; case 17: return MessageType_Features; case 18: return MessageType_PinMatrixRequest; case 19: return MessageType_PinMatrixAck; case 20: return MessageType_Cancel; case 21: return MessageType_TxRequest; case 22: return MessageType_TxAck; case 23: return MessageType_CipherKeyValue; case 48: return MessageType_CipheredKeyValue; case 24: return MessageType_ClearSession; case 25: return MessageType_ApplySettings; case 26: return MessageType_ButtonRequest; case 27: return MessageType_ButtonAck; case 29: return MessageType_GetAddress; case 30: return MessageType_Address; case 35: return MessageType_EntropyRequest; case 36: return MessageType_EntropyAck; case 38: return MessageType_SignMessage; case 39: return MessageType_VerifyMessage; case 40: return MessageType_MessageSignature; case 49: return MessageType_EncryptMessage; case 50: return MessageType_EncryptedMessage; case 51: return MessageType_DecryptMessage; case 52: return MessageType_DecryptedMessage; case 41: return MessageType_PassphraseRequest; case 42: return MessageType_PassphraseAck; case 43: return MessageType_EstimateTxSize; case 44: return MessageType_TxSize; case 45: return MessageType_RecoveryDevice; case 46: return MessageType_WordRequest; case 47: return MessageType_WordAck; case 100: return MessageType_DebugLinkDecision; case 101: return MessageType_DebugLinkGetState; case 102: return MessageType_DebugLinkState; case 103: return MessageType_DebugLinkStop; case 104: return MessageType_DebugLinkLog; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<MessageType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<MessageType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<MessageType>() { public MessageType findValueByNumber(int number) { return MessageType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.getDescriptor().getEnumTypes().get(0); } private static final MessageType[] VALUES = values(); public static MessageType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; MessageType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:MessageType) } public interface InitializeOrBuilder extends // @@protoc_insertion_point(interface_extends:Initialize) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code Initialize} * * <pre> ** * Request: Reset device to default state and ask for device details * @next Features * </pre> */ public static final class Initialize extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Initialize) InitializeOrBuilder { // Use Initialize.newBuilder() to construct. private Initialize(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Initialize(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Initialize defaultInstance; public static Initialize getDefaultInstance() { return defaultInstance; } public Initialize getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Initialize( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Initialize_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Initialize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.Builder.class); } public static com.google.protobuf.Parser<Initialize> PARSER = new com.google.protobuf.AbstractParser<Initialize>() { public Initialize parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Initialize(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Initialize> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Initialize} * * <pre> ** * Request: Reset device to default state and ask for device details * @next Features * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Initialize) com.satoshilabs.trezor.protobuf.TrezorMessage.InitializeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Initialize_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Initialize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Initialize_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Initialize) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:Initialize) } static { defaultInstance = new Initialize(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Initialize) } public interface FeaturesOrBuilder extends // @@protoc_insertion_point(interface_extends:Features) com.google.protobuf.MessageOrBuilder { /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ boolean hasVendor(); /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ java.lang.String getVendor(); /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ com.google.protobuf.ByteString getVendorBytes(); /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ boolean hasMajorVersion(); /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ int getMajorVersion(); /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ boolean hasMinorVersion(); /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ int getMinorVersion(); /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ boolean hasPatchVersion(); /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ int getPatchVersion(); /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ boolean hasBootloaderMode(); /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ boolean getBootloaderMode(); /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ boolean hasDeviceId(); /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ java.lang.String getDeviceId(); /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ com.google.protobuf.ByteString getDeviceIdBytes(); /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ boolean hasPinProtection(); /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ boolean getPinProtection(); /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ boolean hasPassphraseProtection(); /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ boolean getPassphraseProtection(); /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ boolean hasLanguage(); /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ java.lang.String getLanguage(); /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ com.google.protobuf.ByteString getLanguageBytes(); /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ boolean hasLabel(); /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ java.lang.String getLabel(); /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ com.google.protobuf.ByteString getLabelBytes(); /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.CoinType> getCoinsList(); /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.CoinType getCoins(int index); /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ int getCoinsCount(); /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder> getCoinsOrBuilderList(); /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder getCoinsOrBuilder( int index); /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ boolean hasInitialized(); /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ boolean getInitialized(); /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ boolean hasRevision(); /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ com.google.protobuf.ByteString getRevision(); /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ boolean hasBootloaderHash(); /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ com.google.protobuf.ByteString getBootloaderHash(); /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ boolean hasImported(); /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ boolean getImported(); } /** * Protobuf type {@code Features} * * <pre> ** * Response: Reports various information about the device * @prev Initialize * </pre> */ public static final class Features extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Features) FeaturesOrBuilder { // Use Features.newBuilder() to construct. private Features(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Features(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Features defaultInstance; public static Features getDefaultInstance() { return defaultInstance; } public Features getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Features( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; vendor_ = bs; break; } case 16: { bitField0_ |= 0x00000002; majorVersion_ = input.readUInt32(); break; } case 24: { bitField0_ |= 0x00000004; minorVersion_ = input.readUInt32(); break; } case 32: { bitField0_ |= 0x00000008; patchVersion_ = input.readUInt32(); break; } case 40: { bitField0_ |= 0x00000010; bootloaderMode_ = input.readBool(); break; } case 50: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; deviceId_ = bs; break; } case 56: { bitField0_ |= 0x00000040; pinProtection_ = input.readBool(); break; } case 64: { bitField0_ |= 0x00000080; passphraseProtection_ = input.readBool(); break; } case 74: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000100; language_ = bs; break; } case 82: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000200; label_ = bs; break; } case 90: { if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { coins_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.CoinType>(); mutable_bitField0_ |= 0x00000400; } coins_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.CoinType.PARSER, extensionRegistry)); break; } case 96: { bitField0_ |= 0x00000400; initialized_ = input.readBool(); break; } case 106: { bitField0_ |= 0x00000800; revision_ = input.readBytes(); break; } case 114: { bitField0_ |= 0x00001000; bootloaderHash_ = input.readBytes(); break; } case 120: { bitField0_ |= 0x00002000; imported_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { coins_ = java.util.Collections.unmodifiableList(coins_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Features_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Features_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Features.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Features.Builder.class); } public static com.google.protobuf.Parser<Features> PARSER = new com.google.protobuf.AbstractParser<Features>() { public Features parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Features(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Features> getParserForType() { return PARSER; } private int bitField0_; public static final int VENDOR_FIELD_NUMBER = 1; private java.lang.Object vendor_; /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public boolean hasVendor() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public java.lang.String getVendor() { java.lang.Object ref = vendor_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { vendor_ = s; } return s; } } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public com.google.protobuf.ByteString getVendorBytes() { java.lang.Object ref = vendor_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); vendor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MAJOR_VERSION_FIELD_NUMBER = 2; private int majorVersion_; /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ public boolean hasMajorVersion() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ public int getMajorVersion() { return majorVersion_; } public static final int MINOR_VERSION_FIELD_NUMBER = 3; private int minorVersion_; /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ public boolean hasMinorVersion() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ public int getMinorVersion() { return minorVersion_; } public static final int PATCH_VERSION_FIELD_NUMBER = 4; private int patchVersion_; /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ public boolean hasPatchVersion() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ public int getPatchVersion() { return patchVersion_; } public static final int BOOTLOADER_MODE_FIELD_NUMBER = 5; private boolean bootloaderMode_; /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ public boolean hasBootloaderMode() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ public boolean getBootloaderMode() { return bootloaderMode_; } public static final int DEVICE_ID_FIELD_NUMBER = 6; private java.lang.Object deviceId_; /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public boolean hasDeviceId() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public java.lang.String getDeviceId() { java.lang.Object ref = deviceId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { deviceId_ = s; } return s; } } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public com.google.protobuf.ByteString getDeviceIdBytes() { java.lang.Object ref = deviceId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deviceId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PIN_PROTECTION_FIELD_NUMBER = 7; private boolean pinProtection_; /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ public boolean getPinProtection() { return pinProtection_; } public static final int PASSPHRASE_PROTECTION_FIELD_NUMBER = 8; private boolean passphraseProtection_; /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } public static final int LANGUAGE_FIELD_NUMBER = 9; private java.lang.Object language_; /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FIELD_NUMBER = 10; private java.lang.Object label_; /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COINS_FIELD_NUMBER = 11; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.CoinType> coins_; /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.CoinType> getCoinsList() { return coins_; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder> getCoinsOrBuilderList() { return coins_; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public int getCoinsCount() { return coins_.size(); } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinType getCoins(int index) { return coins_.get(index); } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder getCoinsOrBuilder( int index) { return coins_.get(index); } public static final int INITIALIZED_FIELD_NUMBER = 12; private boolean initialized_; /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ public boolean hasInitialized() { return ((bitField0_ & 0x00000400) == 0x00000400); } /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ public boolean getInitialized() { return initialized_; } public static final int REVISION_FIELD_NUMBER = 13; private com.google.protobuf.ByteString revision_; /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ public boolean hasRevision() { return ((bitField0_ & 0x00000800) == 0x00000800); } /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ public com.google.protobuf.ByteString getRevision() { return revision_; } public static final int BOOTLOADER_HASH_FIELD_NUMBER = 14; private com.google.protobuf.ByteString bootloaderHash_; /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ public boolean hasBootloaderHash() { return ((bitField0_ & 0x00001000) == 0x00001000); } /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ public com.google.protobuf.ByteString getBootloaderHash() { return bootloaderHash_; } public static final int IMPORTED_FIELD_NUMBER = 15; private boolean imported_; /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ public boolean hasImported() { return ((bitField0_ & 0x00002000) == 0x00002000); } /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ public boolean getImported() { return imported_; } private void initFields() { vendor_ = ""; majorVersion_ = 0; minorVersion_ = 0; patchVersion_ = 0; bootloaderMode_ = false; deviceId_ = ""; pinProtection_ = false; passphraseProtection_ = false; language_ = ""; label_ = ""; coins_ = java.util.Collections.emptyList(); initialized_ = false; revision_ = com.google.protobuf.ByteString.EMPTY; bootloaderHash_ = com.google.protobuf.ByteString.EMPTY; imported_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getVendorBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, majorVersion_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(3, minorVersion_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt32(4, patchVersion_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBool(5, bootloaderMode_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, getDeviceIdBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBool(7, pinProtection_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeBool(8, passphraseProtection_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeBytes(9, getLanguageBytes()); } if (((bitField0_ & 0x00000200) == 0x00000200)) { output.writeBytes(10, getLabelBytes()); } for (int i = 0; i < coins_.size(); i++) { output.writeMessage(11, coins_.get(i)); } if (((bitField0_ & 0x00000400) == 0x00000400)) { output.writeBool(12, initialized_); } if (((bitField0_ & 0x00000800) == 0x00000800)) { output.writeBytes(13, revision_); } if (((bitField0_ & 0x00001000) == 0x00001000)) { output.writeBytes(14, bootloaderHash_); } if (((bitField0_ & 0x00002000) == 0x00002000)) { output.writeBool(15, imported_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getVendorBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, majorVersion_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, minorVersion_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, patchVersion_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, bootloaderMode_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, getDeviceIdBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, pinProtection_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(8, passphraseProtection_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(9, getLanguageBytes()); } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(10, getLabelBytes()); } for (int i = 0; i < coins_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, coins_.get(i)); } if (((bitField0_ & 0x00000400) == 0x00000400)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(12, initialized_); } if (((bitField0_ & 0x00000800) == 0x00000800)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(13, revision_); } if (((bitField0_ & 0x00001000) == 0x00001000)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(14, bootloaderHash_); } if (((bitField0_ & 0x00002000) == 0x00002000)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(15, imported_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Features parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Features prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Features} * * <pre> ** * Response: Reports various information about the device * @prev Initialize * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Features) com.satoshilabs.trezor.protobuf.TrezorMessage.FeaturesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Features_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Features_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Features.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Features.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Features.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getCoinsFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); vendor_ = ""; bitField0_ = (bitField0_ & ~0x00000001); majorVersion_ = 0; bitField0_ = (bitField0_ & ~0x00000002); minorVersion_ = 0; bitField0_ = (bitField0_ & ~0x00000004); patchVersion_ = 0; bitField0_ = (bitField0_ & ~0x00000008); bootloaderMode_ = false; bitField0_ = (bitField0_ & ~0x00000010); deviceId_ = ""; bitField0_ = (bitField0_ & ~0x00000020); pinProtection_ = false; bitField0_ = (bitField0_ & ~0x00000040); passphraseProtection_ = false; bitField0_ = (bitField0_ & ~0x00000080); language_ = ""; bitField0_ = (bitField0_ & ~0x00000100); label_ = ""; bitField0_ = (bitField0_ & ~0x00000200); if (coinsBuilder_ == null) { coins_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000400); } else { coinsBuilder_.clear(); } initialized_ = false; bitField0_ = (bitField0_ & ~0x00000800); revision_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00001000); bootloaderHash_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00002000); imported_ = false; bitField0_ = (bitField0_ & ~0x00004000); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Features_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Features getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Features.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Features build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Features result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Features buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Features result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Features(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.vendor_ = vendor_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.majorVersion_ = majorVersion_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.minorVersion_ = minorVersion_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.patchVersion_ = patchVersion_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.bootloaderMode_ = bootloaderMode_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.deviceId_ = deviceId_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } result.pinProtection_ = pinProtection_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } result.passphraseProtection_ = passphraseProtection_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } result.language_ = language_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000200; } result.label_ = label_; if (coinsBuilder_ == null) { if (((bitField0_ & 0x00000400) == 0x00000400)) { coins_ = java.util.Collections.unmodifiableList(coins_); bitField0_ = (bitField0_ & ~0x00000400); } result.coins_ = coins_; } else { result.coins_ = coinsBuilder_.build(); } if (((from_bitField0_ & 0x00000800) == 0x00000800)) { to_bitField0_ |= 0x00000400; } result.initialized_ = initialized_; if (((from_bitField0_ & 0x00001000) == 0x00001000)) { to_bitField0_ |= 0x00000800; } result.revision_ = revision_; if (((from_bitField0_ & 0x00002000) == 0x00002000)) { to_bitField0_ |= 0x00001000; } result.bootloaderHash_ = bootloaderHash_; if (((from_bitField0_ & 0x00004000) == 0x00004000)) { to_bitField0_ |= 0x00002000; } result.imported_ = imported_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Features) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Features)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Features other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Features.getDefaultInstance()) return this; if (other.hasVendor()) { bitField0_ |= 0x00000001; vendor_ = other.vendor_; onChanged(); } if (other.hasMajorVersion()) { setMajorVersion(other.getMajorVersion()); } if (other.hasMinorVersion()) { setMinorVersion(other.getMinorVersion()); } if (other.hasPatchVersion()) { setPatchVersion(other.getPatchVersion()); } if (other.hasBootloaderMode()) { setBootloaderMode(other.getBootloaderMode()); } if (other.hasDeviceId()) { bitField0_ |= 0x00000020; deviceId_ = other.deviceId_; onChanged(); } if (other.hasPinProtection()) { setPinProtection(other.getPinProtection()); } if (other.hasPassphraseProtection()) { setPassphraseProtection(other.getPassphraseProtection()); } if (other.hasLanguage()) { bitField0_ |= 0x00000100; language_ = other.language_; onChanged(); } if (other.hasLabel()) { bitField0_ |= 0x00000200; label_ = other.label_; onChanged(); } if (coinsBuilder_ == null) { if (!other.coins_.isEmpty()) { if (coins_.isEmpty()) { coins_ = other.coins_; bitField0_ = (bitField0_ & ~0x00000400); } else { ensureCoinsIsMutable(); coins_.addAll(other.coins_); } onChanged(); } } else { if (!other.coins_.isEmpty()) { if (coinsBuilder_.isEmpty()) { coinsBuilder_.dispose(); coinsBuilder_ = null; coins_ = other.coins_; bitField0_ = (bitField0_ & ~0x00000400); coinsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getCoinsFieldBuilder() : null; } else { coinsBuilder_.addAllMessages(other.coins_); } } } if (other.hasInitialized()) { setInitialized(other.getInitialized()); } if (other.hasRevision()) { setRevision(other.getRevision()); } if (other.hasBootloaderHash()) { setBootloaderHash(other.getBootloaderHash()); } if (other.hasImported()) { setImported(other.getImported()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Features parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Features) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object vendor_ = ""; /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public boolean hasVendor() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public java.lang.String getVendor() { java.lang.Object ref = vendor_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { vendor_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public com.google.protobuf.ByteString getVendorBytes() { java.lang.Object ref = vendor_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); vendor_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public Builder setVendor( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; vendor_ = value; onChanged(); return this; } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public Builder clearVendor() { bitField0_ = (bitField0_ & ~0x00000001); vendor_ = getDefaultInstance().getVendor(); onChanged(); return this; } /** * <code>optional string vendor = 1;</code> * * <pre> * name of the manufacturer, e.g. "bitcointrezor.com" * </pre> */ public Builder setVendorBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; vendor_ = value; onChanged(); return this; } private int majorVersion_ ; /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ public boolean hasMajorVersion() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ public int getMajorVersion() { return majorVersion_; } /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ public Builder setMajorVersion(int value) { bitField0_ |= 0x00000002; majorVersion_ = value; onChanged(); return this; } /** * <code>optional uint32 major_version = 2;</code> * * <pre> * major version of the device, e.g. 1 * </pre> */ public Builder clearMajorVersion() { bitField0_ = (bitField0_ & ~0x00000002); majorVersion_ = 0; onChanged(); return this; } private int minorVersion_ ; /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ public boolean hasMinorVersion() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ public int getMinorVersion() { return minorVersion_; } /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ public Builder setMinorVersion(int value) { bitField0_ |= 0x00000004; minorVersion_ = value; onChanged(); return this; } /** * <code>optional uint32 minor_version = 3;</code> * * <pre> * minor version of the device, e.g. 0 * </pre> */ public Builder clearMinorVersion() { bitField0_ = (bitField0_ & ~0x00000004); minorVersion_ = 0; onChanged(); return this; } private int patchVersion_ ; /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ public boolean hasPatchVersion() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ public int getPatchVersion() { return patchVersion_; } /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ public Builder setPatchVersion(int value) { bitField0_ |= 0x00000008; patchVersion_ = value; onChanged(); return this; } /** * <code>optional uint32 patch_version = 4;</code> * * <pre> * patch version of the device, e.g. 0 * </pre> */ public Builder clearPatchVersion() { bitField0_ = (bitField0_ & ~0x00000008); patchVersion_ = 0; onChanged(); return this; } private boolean bootloaderMode_ ; /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ public boolean hasBootloaderMode() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ public boolean getBootloaderMode() { return bootloaderMode_; } /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ public Builder setBootloaderMode(boolean value) { bitField0_ |= 0x00000010; bootloaderMode_ = value; onChanged(); return this; } /** * <code>optional bool bootloader_mode = 5;</code> * * <pre> * is device in bootloader mode? * </pre> */ public Builder clearBootloaderMode() { bitField0_ = (bitField0_ & ~0x00000010); bootloaderMode_ = false; onChanged(); return this; } private java.lang.Object deviceId_ = ""; /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public boolean hasDeviceId() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public java.lang.String getDeviceId() { java.lang.Object ref = deviceId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { deviceId_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public com.google.protobuf.ByteString getDeviceIdBytes() { java.lang.Object ref = deviceId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); deviceId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public Builder setDeviceId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; deviceId_ = value; onChanged(); return this; } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public Builder clearDeviceId() { bitField0_ = (bitField0_ & ~0x00000020); deviceId_ = getDefaultInstance().getDeviceId(); onChanged(); return this; } /** * <code>optional string device_id = 6;</code> * * <pre> * device's unique identifier * </pre> */ public Builder setDeviceIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; deviceId_ = value; onChanged(); return this; } private boolean pinProtection_ ; /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ public boolean getPinProtection() { return pinProtection_; } /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ public Builder setPinProtection(boolean value) { bitField0_ |= 0x00000040; pinProtection_ = value; onChanged(); return this; } /** * <code>optional bool pin_protection = 7;</code> * * <pre> * is device protected by PIN? * </pre> */ public Builder clearPinProtection() { bitField0_ = (bitField0_ & ~0x00000040); pinProtection_ = false; onChanged(); return this; } private boolean passphraseProtection_ ; /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public Builder setPassphraseProtection(boolean value) { bitField0_ |= 0x00000080; passphraseProtection_ = value; onChanged(); return this; } /** * <code>optional bool passphrase_protection = 8;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public Builder clearPassphraseProtection() { bitField0_ = (bitField0_ & ~0x00000080); passphraseProtection_ = false; onChanged(); return this; } private java.lang.Object language_ = ""; /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; language_ = value; onChanged(); return this; } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public Builder clearLanguage() { bitField0_ = (bitField0_ & ~0x00000100); language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** * <code>optional string language = 9;</code> * * <pre> * device language * </pre> */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; language_ = value; onChanged(); return this; } private java.lang.Object label_ = ""; /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; label_ = value; onChanged(); return this; } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000200); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * <code>optional string label = 10;</code> * * <pre> * device description label * </pre> */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; label_ = value; onChanged(); return this; } private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.CoinType> coins_ = java.util.Collections.emptyList(); private void ensureCoinsIsMutable() { if (!((bitField0_ & 0x00000400) == 0x00000400)) { coins_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.CoinType>(coins_); bitField0_ |= 0x00000400; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.CoinType, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder> coinsBuilder_; /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.CoinType> getCoinsList() { if (coinsBuilder_ == null) { return java.util.Collections.unmodifiableList(coins_); } else { return coinsBuilder_.getMessageList(); } } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public int getCoinsCount() { if (coinsBuilder_ == null) { return coins_.size(); } else { return coinsBuilder_.getCount(); } } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinType getCoins(int index) { if (coinsBuilder_ == null) { return coins_.get(index); } else { return coinsBuilder_.getMessage(index); } } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder setCoins( int index, com.satoshilabs.trezor.protobuf.TrezorType.CoinType value) { if (coinsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCoinsIsMutable(); coins_.set(index, value); onChanged(); } else { coinsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder setCoins( int index, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder builderForValue) { if (coinsBuilder_ == null) { ensureCoinsIsMutable(); coins_.set(index, builderForValue.build()); onChanged(); } else { coinsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder addCoins(com.satoshilabs.trezor.protobuf.TrezorType.CoinType value) { if (coinsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCoinsIsMutable(); coins_.add(value); onChanged(); } else { coinsBuilder_.addMessage(value); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder addCoins( int index, com.satoshilabs.trezor.protobuf.TrezorType.CoinType value) { if (coinsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCoinsIsMutable(); coins_.add(index, value); onChanged(); } else { coinsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder addCoins( com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder builderForValue) { if (coinsBuilder_ == null) { ensureCoinsIsMutable(); coins_.add(builderForValue.build()); onChanged(); } else { coinsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder addCoins( int index, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder builderForValue) { if (coinsBuilder_ == null) { ensureCoinsIsMutable(); coins_.add(index, builderForValue.build()); onChanged(); } else { coinsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder addAllCoins( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.CoinType> values) { if (coinsBuilder_ == null) { ensureCoinsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, coins_); onChanged(); } else { coinsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder clearCoins() { if (coinsBuilder_ == null) { coins_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000400); onChanged(); } else { coinsBuilder_.clear(); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public Builder removeCoins(int index) { if (coinsBuilder_ == null) { ensureCoinsIsMutable(); coins_.remove(index); onChanged(); } else { coinsBuilder_.remove(index); } return this; } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder getCoinsBuilder( int index) { return getCoinsFieldBuilder().getBuilder(index); } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder getCoinsOrBuilder( int index) { if (coinsBuilder_ == null) { return coins_.get(index); } else { return coinsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder> getCoinsOrBuilderList() { if (coinsBuilder_ != null) { return coinsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(coins_); } } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder addCoinsBuilder() { return getCoinsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.CoinType.getDefaultInstance()); } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder addCoinsBuilder( int index) { return getCoinsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.getDefaultInstance()); } /** * <code>repeated .CoinType coins = 11;</code> * * <pre> * supported coins * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder> getCoinsBuilderList() { return getCoinsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.CoinType, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder> getCoinsFieldBuilder() { if (coinsBuilder_ == null) { coinsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.CoinType, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder>( coins_, ((bitField0_ & 0x00000400) == 0x00000400), getParentForChildren(), isClean()); coins_ = null; } return coinsBuilder_; } private boolean initialized_ ; /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ public boolean hasInitialized() { return ((bitField0_ & 0x00000800) == 0x00000800); } /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ public boolean getInitialized() { return initialized_; } /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ public Builder setInitialized(boolean value) { bitField0_ |= 0x00000800; initialized_ = value; onChanged(); return this; } /** * <code>optional bool initialized = 12;</code> * * <pre> * does device contain seed? * </pre> */ public Builder clearInitialized() { bitField0_ = (bitField0_ & ~0x00000800); initialized_ = false; onChanged(); return this; } private com.google.protobuf.ByteString revision_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ public boolean hasRevision() { return ((bitField0_ & 0x00001000) == 0x00001000); } /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ public com.google.protobuf.ByteString getRevision() { return revision_; } /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ public Builder setRevision(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00001000; revision_ = value; onChanged(); return this; } /** * <code>optional bytes revision = 13;</code> * * <pre> * SCM revision of firmware * </pre> */ public Builder clearRevision() { bitField0_ = (bitField0_ & ~0x00001000); revision_ = getDefaultInstance().getRevision(); onChanged(); return this; } private com.google.protobuf.ByteString bootloaderHash_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ public boolean hasBootloaderHash() { return ((bitField0_ & 0x00002000) == 0x00002000); } /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ public com.google.protobuf.ByteString getBootloaderHash() { return bootloaderHash_; } /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ public Builder setBootloaderHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00002000; bootloaderHash_ = value; onChanged(); return this; } /** * <code>optional bytes bootloader_hash = 14;</code> * * <pre> * hash of the bootloader * </pre> */ public Builder clearBootloaderHash() { bitField0_ = (bitField0_ & ~0x00002000); bootloaderHash_ = getDefaultInstance().getBootloaderHash(); onChanged(); return this; } private boolean imported_ ; /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ public boolean hasImported() { return ((bitField0_ & 0x00004000) == 0x00004000); } /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ public boolean getImported() { return imported_; } /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ public Builder setImported(boolean value) { bitField0_ |= 0x00004000; imported_ = value; onChanged(); return this; } /** * <code>optional bool imported = 15;</code> * * <pre> * was storage imported from an external source? * </pre> */ public Builder clearImported() { bitField0_ = (bitField0_ & ~0x00004000); imported_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:Features) } static { defaultInstance = new Features(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Features) } public interface ClearSessionOrBuilder extends // @@protoc_insertion_point(interface_extends:ClearSession) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code ClearSession} * * <pre> ** * Request: clear session (removes cached PIN, passphrase, etc). * @next Success * </pre> */ public static final class ClearSession extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ClearSession) ClearSessionOrBuilder { // Use ClearSession.newBuilder() to construct. private ClearSession(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ClearSession(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ClearSession defaultInstance; public static ClearSession getDefaultInstance() { return defaultInstance; } public ClearSession getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ClearSession( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ClearSession_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ClearSession_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.Builder.class); } public static com.google.protobuf.Parser<ClearSession> PARSER = new com.google.protobuf.AbstractParser<ClearSession>() { public ClearSession parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ClearSession(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ClearSession> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ClearSession} * * <pre> ** * Request: clear session (removes cached PIN, passphrase, etc). * @next Success * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ClearSession) com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSessionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ClearSession_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ClearSession_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ClearSession_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession build() { com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession result = new com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.ClearSession) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:ClearSession) } static { defaultInstance = new ClearSession(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:ClearSession) } public interface ApplySettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:ApplySettings) com.google.protobuf.MessageOrBuilder { /** * <code>optional string language = 1;</code> */ boolean hasLanguage(); /** * <code>optional string language = 1;</code> */ java.lang.String getLanguage(); /** * <code>optional string language = 1;</code> */ com.google.protobuf.ByteString getLanguageBytes(); /** * <code>optional string label = 2;</code> */ boolean hasLabel(); /** * <code>optional string label = 2;</code> */ java.lang.String getLabel(); /** * <code>optional string label = 2;</code> */ com.google.protobuf.ByteString getLabelBytes(); /** * <code>optional bool use_passphrase = 3;</code> */ boolean hasUsePassphrase(); /** * <code>optional bool use_passphrase = 3;</code> */ boolean getUsePassphrase(); } /** * Protobuf type {@code ApplySettings} * * <pre> ** * Request: change language and/or label of the device * @next Success * @next Failure * @next ButtonRequest * @next PinMatrixRequest * </pre> */ public static final class ApplySettings extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ApplySettings) ApplySettingsOrBuilder { // Use ApplySettings.newBuilder() to construct. private ApplySettings(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ApplySettings(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ApplySettings defaultInstance; public static ApplySettings getDefaultInstance() { return defaultInstance; } public ApplySettings getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ApplySettings( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; language_ = bs; break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; label_ = bs; break; } case 24: { bitField0_ |= 0x00000004; usePassphrase_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ApplySettings_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ApplySettings_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.Builder.class); } public static com.google.protobuf.Parser<ApplySettings> PARSER = new com.google.protobuf.AbstractParser<ApplySettings>() { public ApplySettings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ApplySettings(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ApplySettings> getParserForType() { return PARSER; } private int bitField0_; public static final int LANGUAGE_FIELD_NUMBER = 1; private java.lang.Object language_; /** * <code>optional string language = 1;</code> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string language = 1;</code> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } } /** * <code>optional string language = 1;</code> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FIELD_NUMBER = 2; private java.lang.Object label_; /** * <code>optional string label = 2;</code> */ public boolean hasLabel() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string label = 2;</code> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } } /** * <code>optional string label = 2;</code> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int USE_PASSPHRASE_FIELD_NUMBER = 3; private boolean usePassphrase_; /** * <code>optional bool use_passphrase = 3;</code> */ public boolean hasUsePassphrase() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool use_passphrase = 3;</code> */ public boolean getUsePassphrase() { return usePassphrase_; } private void initFields() { language_ = ""; label_ = ""; usePassphrase_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getLanguageBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getLabelBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, usePassphrase_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getLanguageBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getLabelBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, usePassphrase_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ApplySettings} * * <pre> ** * Request: change language and/or label of the device * @next Success * @next Failure * @next ButtonRequest * @next PinMatrixRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ApplySettings) com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettingsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ApplySettings_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ApplySettings_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); language_ = ""; bitField0_ = (bitField0_ & ~0x00000001); label_ = ""; bitField0_ = (bitField0_ & ~0x00000002); usePassphrase_ = false; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ApplySettings_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings build() { com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings result = new com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.language_ = language_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.label_ = label_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.usePassphrase_ = usePassphrase_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings.getDefaultInstance()) return this; if (other.hasLanguage()) { bitField0_ |= 0x00000001; language_ = other.language_; onChanged(); } if (other.hasLabel()) { bitField0_ |= 0x00000002; label_ = other.label_; onChanged(); } if (other.hasUsePassphrase()) { setUsePassphrase(other.getUsePassphrase()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.ApplySettings) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object language_ = ""; /** * <code>optional string language = 1;</code> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string language = 1;</code> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string language = 1;</code> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string language = 1;</code> */ public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; language_ = value; onChanged(); return this; } /** * <code>optional string language = 1;</code> */ public Builder clearLanguage() { bitField0_ = (bitField0_ & ~0x00000001); language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** * <code>optional string language = 1;</code> */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; language_ = value; onChanged(); return this; } private java.lang.Object label_ = ""; /** * <code>optional string label = 2;</code> */ public boolean hasLabel() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string label = 2;</code> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string label = 2;</code> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string label = 2;</code> */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; label_ = value; onChanged(); return this; } /** * <code>optional string label = 2;</code> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000002); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * <code>optional string label = 2;</code> */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; label_ = value; onChanged(); return this; } private boolean usePassphrase_ ; /** * <code>optional bool use_passphrase = 3;</code> */ public boolean hasUsePassphrase() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool use_passphrase = 3;</code> */ public boolean getUsePassphrase() { return usePassphrase_; } /** * <code>optional bool use_passphrase = 3;</code> */ public Builder setUsePassphrase(boolean value) { bitField0_ |= 0x00000004; usePassphrase_ = value; onChanged(); return this; } /** * <code>optional bool use_passphrase = 3;</code> */ public Builder clearUsePassphrase() { bitField0_ = (bitField0_ & ~0x00000004); usePassphrase_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:ApplySettings) } static { defaultInstance = new ApplySettings(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:ApplySettings) } public interface ChangePinOrBuilder extends // @@protoc_insertion_point(interface_extends:ChangePin) com.google.protobuf.MessageOrBuilder { /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ boolean hasRemove(); /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ boolean getRemove(); } /** * Protobuf type {@code ChangePin} * * <pre> ** * Request: Starts workflow for setting/changing/removing the PIN * @next ButtonRequest * @next PinMatrixRequest * </pre> */ public static final class ChangePin extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ChangePin) ChangePinOrBuilder { // Use ChangePin.newBuilder() to construct. private ChangePin(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ChangePin(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ChangePin defaultInstance; public static ChangePin getDefaultInstance() { return defaultInstance; } public ChangePin getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ChangePin( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; remove_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ChangePin_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ChangePin_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.Builder.class); } public static com.google.protobuf.Parser<ChangePin> PARSER = new com.google.protobuf.AbstractParser<ChangePin>() { public ChangePin parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ChangePin(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ChangePin> getParserForType() { return PARSER; } private int bitField0_; public static final int REMOVE_FIELD_NUMBER = 1; private boolean remove_; /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ public boolean hasRemove() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ public boolean getRemove() { return remove_; } private void initFields() { remove_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBool(1, remove_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, remove_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ChangePin} * * <pre> ** * Request: Starts workflow for setting/changing/removing the PIN * @next ButtonRequest * @next PinMatrixRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ChangePin) com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePinOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ChangePin_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ChangePin_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); remove_ = false; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ChangePin_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin build() { com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin result = new com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.remove_ = remove_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin.getDefaultInstance()) return this; if (other.hasRemove()) { setRemove(other.getRemove()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.ChangePin) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private boolean remove_ ; /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ public boolean hasRemove() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ public boolean getRemove() { return remove_; } /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ public Builder setRemove(boolean value) { bitField0_ |= 0x00000001; remove_ = value; onChanged(); return this; } /** * <code>optional bool remove = 1;</code> * * <pre> * is PIN removal requested? * </pre> */ public Builder clearRemove() { bitField0_ = (bitField0_ & ~0x00000001); remove_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:ChangePin) } static { defaultInstance = new ChangePin(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:ChangePin) } public interface PingOrBuilder extends // @@protoc_insertion_point(interface_extends:Ping) com.google.protobuf.MessageOrBuilder { /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ boolean hasMessage(); /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ java.lang.String getMessage(); /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ com.google.protobuf.ByteString getMessageBytes(); /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ boolean hasButtonProtection(); /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ boolean getButtonProtection(); /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ boolean hasPinProtection(); /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ boolean getPinProtection(); /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ boolean hasPassphraseProtection(); /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ boolean getPassphraseProtection(); } /** * Protobuf type {@code Ping} * * <pre> ** * Request: Test if the device is alive, device sends back the message in Success response * @next Success * </pre> */ public static final class Ping extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Ping) PingOrBuilder { // Use Ping.newBuilder() to construct. private Ping(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Ping(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Ping defaultInstance; public static Ping getDefaultInstance() { return defaultInstance; } public Ping getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Ping( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; message_ = bs; break; } case 16: { bitField0_ |= 0x00000002; buttonProtection_ = input.readBool(); break; } case 24: { bitField0_ |= 0x00000004; pinProtection_ = input.readBool(); break; } case 32: { bitField0_ |= 0x00000008; passphraseProtection_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Ping_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Ping_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.Builder.class); } public static com.google.protobuf.Parser<Ping> PARSER = new com.google.protobuf.AbstractParser<Ping>() { public Ping parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Ping(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Ping> getParserForType() { return PARSER; } private int bitField0_; public static final int MESSAGE_FIELD_NUMBER = 1; private java.lang.Object message_; /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BUTTON_PROTECTION_FIELD_NUMBER = 2; private boolean buttonProtection_; /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ public boolean hasButtonProtection() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ public boolean getButtonProtection() { return buttonProtection_; } public static final int PIN_PROTECTION_FIELD_NUMBER = 3; private boolean pinProtection_; /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ public boolean getPinProtection() { return pinProtection_; } public static final int PASSPHRASE_PROTECTION_FIELD_NUMBER = 4; private boolean passphraseProtection_; /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } private void initFields() { message_ = ""; buttonProtection_ = false; pinProtection_ = false; passphraseProtection_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getMessageBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBool(2, buttonProtection_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, pinProtection_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, passphraseProtection_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getMessageBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, buttonProtection_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, pinProtection_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, passphraseProtection_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Ping prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Ping} * * <pre> ** * Request: Test if the device is alive, device sends back the message in Success response * @next Success * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Ping) com.satoshilabs.trezor.protobuf.TrezorMessage.PingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Ping_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Ping_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); message_ = ""; bitField0_ = (bitField0_ & ~0x00000001); buttonProtection_ = false; bitField0_ = (bitField0_ & ~0x00000002); pinProtection_ = false; bitField0_ = (bitField0_ & ~0x00000004); passphraseProtection_ = false; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Ping_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Ping getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Ping build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Ping result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Ping buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Ping result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Ping(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.message_ = message_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.buttonProtection_ = buttonProtection_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.pinProtection_ = pinProtection_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.passphraseProtection_ = passphraseProtection_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Ping) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Ping)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Ping other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Ping.getDefaultInstance()) return this; if (other.hasMessage()) { bitField0_ |= 0x00000001; message_ = other.message_; onChanged(); } if (other.hasButtonProtection()) { setButtonProtection(other.getButtonProtection()); } if (other.hasPinProtection()) { setPinProtection(other.getPinProtection()); } if (other.hasPassphraseProtection()) { setPassphraseProtection(other.getPassphraseProtection()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Ping parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Ping) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object message_ = ""; /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; message_ = value; onChanged(); return this; } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000001); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /** * <code>optional string message = 1;</code> * * <pre> * message to send back in Success message * </pre> */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; message_ = value; onChanged(); return this; } private boolean buttonProtection_ ; /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ public boolean hasButtonProtection() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ public boolean getButtonProtection() { return buttonProtection_; } /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ public Builder setButtonProtection(boolean value) { bitField0_ |= 0x00000002; buttonProtection_ = value; onChanged(); return this; } /** * <code>optional bool button_protection = 2;</code> * * <pre> * ask for button press * </pre> */ public Builder clearButtonProtection() { bitField0_ = (bitField0_ & ~0x00000002); buttonProtection_ = false; onChanged(); return this; } private boolean pinProtection_ ; /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ public boolean getPinProtection() { return pinProtection_; } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ public Builder setPinProtection(boolean value) { bitField0_ |= 0x00000004; pinProtection_ = value; onChanged(); return this; } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * ask for PIN if set in device * </pre> */ public Builder clearPinProtection() { bitField0_ = (bitField0_ & ~0x00000004); pinProtection_ = false; onChanged(); return this; } private boolean passphraseProtection_ ; /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ public Builder setPassphraseProtection(boolean value) { bitField0_ |= 0x00000008; passphraseProtection_ = value; onChanged(); return this; } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * ask for passphrase if set in device * </pre> */ public Builder clearPassphraseProtection() { bitField0_ = (bitField0_ & ~0x00000008); passphraseProtection_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:Ping) } static { defaultInstance = new Ping(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Ping) } public interface SuccessOrBuilder extends // @@protoc_insertion_point(interface_extends:Success) com.google.protobuf.MessageOrBuilder { /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ boolean hasMessage(); /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ java.lang.String getMessage(); /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ com.google.protobuf.ByteString getMessageBytes(); } /** * Protobuf type {@code Success} * * <pre> ** * Response: Success of the previous request * </pre> */ public static final class Success extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Success) SuccessOrBuilder { // Use Success.newBuilder() to construct. private Success(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Success(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Success defaultInstance; public static Success getDefaultInstance() { return defaultInstance; } public Success getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Success( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; message_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Success_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Success_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Success.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Success.Builder.class); } public static com.google.protobuf.Parser<Success> PARSER = new com.google.protobuf.AbstractParser<Success>() { public Success parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Success(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Success> getParserForType() { return PARSER; } private int bitField0_; public static final int MESSAGE_FIELD_NUMBER = 1; private java.lang.Object message_; /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { message_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getMessageBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getMessageBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Success parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Success prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Success} * * <pre> ** * Response: Success of the previous request * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Success) com.satoshilabs.trezor.protobuf.TrezorMessage.SuccessOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Success_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Success_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Success.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Success.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Success.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); message_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Success_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Success getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Success.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Success build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Success result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Success buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Success result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Success(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.message_ = message_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Success) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Success)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Success other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Success.getDefaultInstance()) return this; if (other.hasMessage()) { bitField0_ |= 0x00000001; message_ = other.message_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Success parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Success) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object message_ = ""; /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; message_ = value; onChanged(); return this; } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000001); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /** * <code>optional string message = 1;</code> * * <pre> * human readable description of action or request-specific payload * </pre> */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; message_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:Success) } static { defaultInstance = new Success(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Success) } public interface FailureOrBuilder extends // @@protoc_insertion_point(interface_extends:Failure) com.google.protobuf.MessageOrBuilder { /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ boolean hasCode(); /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.FailureType getCode(); /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ boolean hasMessage(); /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ java.lang.String getMessage(); /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ com.google.protobuf.ByteString getMessageBytes(); } /** * Protobuf type {@code Failure} * * <pre> ** * Response: Failure of the previous request * </pre> */ public static final class Failure extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Failure) FailureOrBuilder { // Use Failure.newBuilder() to construct. private Failure(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Failure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Failure defaultInstance; public static Failure getDefaultInstance() { return defaultInstance; } public Failure getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Failure( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); com.satoshilabs.trezor.protobuf.TrezorType.FailureType value = com.satoshilabs.trezor.protobuf.TrezorType.FailureType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; code_ = value; } break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; message_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Failure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Failure_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.Builder.class); } public static com.google.protobuf.Parser<Failure> PARSER = new com.google.protobuf.AbstractParser<Failure>() { public Failure parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Failure(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Failure> getParserForType() { return PARSER; } private int bitField0_; public static final int CODE_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.FailureType code_; /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ public boolean hasCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.FailureType getCode() { return code_; } public static final int MESSAGE_FIELD_NUMBER = 2; private java.lang.Object message_; /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { code_ = com.satoshilabs.trezor.protobuf.TrezorType.FailureType.Failure_UnexpectedMessage; message_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, code_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getMessageBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, code_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getMessageBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Failure prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Failure} * * <pre> ** * Response: Failure of the previous request * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Failure) com.satoshilabs.trezor.protobuf.TrezorMessage.FailureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Failure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Failure_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); code_ = com.satoshilabs.trezor.protobuf.TrezorType.FailureType.Failure_UnexpectedMessage; bitField0_ = (bitField0_ & ~0x00000001); message_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Failure_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Failure getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Failure build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Failure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Failure buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Failure result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Failure(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.code_ = code_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.message_ = message_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Failure) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Failure)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Failure other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Failure.getDefaultInstance()) return this; if (other.hasCode()) { setCode(other.getCode()); } if (other.hasMessage()) { bitField0_ |= 0x00000002; message_ = other.message_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Failure parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Failure) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.FailureType code_ = com.satoshilabs.trezor.protobuf.TrezorType.FailureType.Failure_UnexpectedMessage; /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ public boolean hasCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.FailureType getCode() { return code_; } /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ public Builder setCode(com.satoshilabs.trezor.protobuf.TrezorType.FailureType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; code_ = value; onChanged(); return this; } /** * <code>optional .FailureType code = 1;</code> * * <pre> * computer-readable definition of the error state * </pre> */ public Builder clearCode() { bitField0_ = (bitField0_ & ~0x00000001); code_ = com.satoshilabs.trezor.protobuf.TrezorType.FailureType.Failure_UnexpectedMessage; onChanged(); return this; } private java.lang.Object message_ = ""; /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; message_ = value; onChanged(); return this; } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /** * <code>optional string message = 2;</code> * * <pre> * human-readable message of the error state * </pre> */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; message_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:Failure) } static { defaultInstance = new Failure(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Failure) } public interface ButtonRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:ButtonRequest) com.google.protobuf.MessageOrBuilder { /** * <code>optional .ButtonRequestType code = 1;</code> */ boolean hasCode(); /** * <code>optional .ButtonRequestType code = 1;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType getCode(); /** * <code>optional string data = 2;</code> */ boolean hasData(); /** * <code>optional string data = 2;</code> */ java.lang.String getData(); /** * <code>optional string data = 2;</code> */ com.google.protobuf.ByteString getDataBytes(); } /** * Protobuf type {@code ButtonRequest} * * <pre> ** * Response: Device is waiting for HW button press. * @next ButtonAck * @next Cancel * </pre> */ public static final class ButtonRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ButtonRequest) ButtonRequestOrBuilder { // Use ButtonRequest.newBuilder() to construct. private ButtonRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ButtonRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ButtonRequest defaultInstance; public static ButtonRequest getDefaultInstance() { return defaultInstance; } public ButtonRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ButtonRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType value = com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; code_ = value; } break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; data_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.Builder.class); } public static com.google.protobuf.Parser<ButtonRequest> PARSER = new com.google.protobuf.AbstractParser<ButtonRequest>() { public ButtonRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ButtonRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ButtonRequest> getParserForType() { return PARSER; } private int bitField0_; public static final int CODE_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType code_; /** * <code>optional .ButtonRequestType code = 1;</code> */ public boolean hasCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .ButtonRequestType code = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType getCode() { return code_; } public static final int DATA_FIELD_NUMBER = 2; private java.lang.Object data_; /** * <code>optional string data = 2;</code> */ public boolean hasData() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string data = 2;</code> */ public java.lang.String getData() { java.lang.Object ref = data_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { data_ = s; } return s; } } /** * <code>optional string data = 2;</code> */ public com.google.protobuf.ByteString getDataBytes() { java.lang.Object ref = data_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); data_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { code_ = com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType.ButtonRequest_Other; data_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, code_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getDataBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, code_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getDataBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ButtonRequest} * * <pre> ** * Response: Device is waiting for HW button press. * @next ButtonAck * @next Cancel * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ButtonRequest) com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); code_ = com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType.ButtonRequest_Other; bitField0_ = (bitField0_ & ~0x00000001); data_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonRequest_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest build() { com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest result = new com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.code_ = code_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.data_ = data_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest.getDefaultInstance()) return this; if (other.hasCode()) { setCode(other.getCode()); } if (other.hasData()) { bitField0_ |= 0x00000002; data_ = other.data_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType code_ = com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType.ButtonRequest_Other; /** * <code>optional .ButtonRequestType code = 1;</code> */ public boolean hasCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .ButtonRequestType code = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType getCode() { return code_; } /** * <code>optional .ButtonRequestType code = 1;</code> */ public Builder setCode(com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; code_ = value; onChanged(); return this; } /** * <code>optional .ButtonRequestType code = 1;</code> */ public Builder clearCode() { bitField0_ = (bitField0_ & ~0x00000001); code_ = com.satoshilabs.trezor.protobuf.TrezorType.ButtonRequestType.ButtonRequest_Other; onChanged(); return this; } private java.lang.Object data_ = ""; /** * <code>optional string data = 2;</code> */ public boolean hasData() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string data = 2;</code> */ public java.lang.String getData() { java.lang.Object ref = data_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { data_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string data = 2;</code> */ public com.google.protobuf.ByteString getDataBytes() { java.lang.Object ref = data_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); data_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string data = 2;</code> */ public Builder setData( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; data_ = value; onChanged(); return this; } /** * <code>optional string data = 2;</code> */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000002); data_ = getDefaultInstance().getData(); onChanged(); return this; } /** * <code>optional string data = 2;</code> */ public Builder setDataBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; data_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:ButtonRequest) } static { defaultInstance = new ButtonRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:ButtonRequest) } public interface ButtonAckOrBuilder extends // @@protoc_insertion_point(interface_extends:ButtonAck) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code ButtonAck} * * <pre> ** * Request: Computer agrees to wait for HW button press * @prev ButtonRequest * </pre> */ public static final class ButtonAck extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ButtonAck) ButtonAckOrBuilder { // Use ButtonAck.newBuilder() to construct. private ButtonAck(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ButtonAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ButtonAck defaultInstance; public static ButtonAck getDefaultInstance() { return defaultInstance; } public ButtonAck getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ButtonAck( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.Builder.class); } public static com.google.protobuf.Parser<ButtonAck> PARSER = new com.google.protobuf.AbstractParser<ButtonAck>() { public ButtonAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ButtonAck(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ButtonAck> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ButtonAck} * * <pre> ** * Request: Computer agrees to wait for HW button press * @prev ButtonRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ButtonAck) com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ButtonAck_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck build() { com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck result = new com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.ButtonAck) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:ButtonAck) } static { defaultInstance = new ButtonAck(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:ButtonAck) } public interface PinMatrixRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:PinMatrixRequest) com.google.protobuf.MessageOrBuilder { /** * <code>optional .PinMatrixRequestType type = 1;</code> */ boolean hasType(); /** * <code>optional .PinMatrixRequestType type = 1;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType getType(); } /** * Protobuf type {@code PinMatrixRequest} * * <pre> ** * Response: Device is asking computer to show PIN matrix and awaits PIN encoded using this matrix scheme * @next PinMatrixAck * @next Cancel * </pre> */ public static final class PinMatrixRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:PinMatrixRequest) PinMatrixRequestOrBuilder { // Use PinMatrixRequest.newBuilder() to construct. private PinMatrixRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PinMatrixRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PinMatrixRequest defaultInstance; public static PinMatrixRequest getDefaultInstance() { return defaultInstance; } public PinMatrixRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PinMatrixRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType value = com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; type_ = value; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.Builder.class); } public static com.google.protobuf.Parser<PinMatrixRequest> PARSER = new com.google.protobuf.AbstractParser<PinMatrixRequest>() { public PinMatrixRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PinMatrixRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PinMatrixRequest> getParserForType() { return PARSER; } private int bitField0_; public static final int TYPE_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType type_; /** * <code>optional .PinMatrixRequestType type = 1;</code> */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .PinMatrixRequestType type = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType getType() { return type_; } private void initFields() { type_ = com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType.PinMatrixRequestType_Current; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, type_.getNumber()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, type_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code PinMatrixRequest} * * <pre> ** * Response: Device is asking computer to show PIN matrix and awaits PIN encoded using this matrix scheme * @next PinMatrixAck * @next Cancel * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:PinMatrixRequest) com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); type_ = com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType.PinMatrixRequestType_Current; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixRequest_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest build() { com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest result = new com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.type_ = type_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType type_ = com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType.PinMatrixRequestType_Current; /** * <code>optional .PinMatrixRequestType type = 1;</code> */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .PinMatrixRequestType type = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType getType() { return type_; } /** * <code>optional .PinMatrixRequestType type = 1;</code> */ public Builder setType(com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value; onChanged(); return this; } /** * <code>optional .PinMatrixRequestType type = 1;</code> */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.satoshilabs.trezor.protobuf.TrezorType.PinMatrixRequestType.PinMatrixRequestType_Current; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:PinMatrixRequest) } static { defaultInstance = new PinMatrixRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PinMatrixRequest) } public interface PinMatrixAckOrBuilder extends // @@protoc_insertion_point(interface_extends:PinMatrixAck) com.google.protobuf.MessageOrBuilder { /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ boolean hasPin(); /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ java.lang.String getPin(); /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ com.google.protobuf.ByteString getPinBytes(); } /** * Protobuf type {@code PinMatrixAck} * * <pre> ** * Request: Computer responds with encoded PIN * @prev PinMatrixRequest * </pre> */ public static final class PinMatrixAck extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:PinMatrixAck) PinMatrixAckOrBuilder { // Use PinMatrixAck.newBuilder() to construct. private PinMatrixAck(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PinMatrixAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PinMatrixAck defaultInstance; public static PinMatrixAck getDefaultInstance() { return defaultInstance; } public PinMatrixAck getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PinMatrixAck( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; pin_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.Builder.class); } public static com.google.protobuf.Parser<PinMatrixAck> PARSER = new com.google.protobuf.AbstractParser<PinMatrixAck>() { public PinMatrixAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PinMatrixAck(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PinMatrixAck> getParserForType() { return PARSER; } private int bitField0_; public static final int PIN_FIELD_NUMBER = 1; private java.lang.Object pin_; /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public boolean hasPin() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public java.lang.String getPin() { java.lang.Object ref = pin_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pin_ = s; } return s; } } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public com.google.protobuf.ByteString getPinBytes() { java.lang.Object ref = pin_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { pin_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasPin()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getPinBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getPinBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code PinMatrixAck} * * <pre> ** * Request: Computer responds with encoded PIN * @prev PinMatrixRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:PinMatrixAck) com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); pin_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PinMatrixAck_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck build() { com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck result = new com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.pin_ = pin_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck.getDefaultInstance()) return this; if (other.hasPin()) { bitField0_ |= 0x00000001; pin_ = other.pin_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasPin(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.PinMatrixAck) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object pin_ = ""; /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public boolean hasPin() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public java.lang.String getPin() { java.lang.Object ref = pin_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pin_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public com.google.protobuf.ByteString getPinBytes() { java.lang.Object ref = pin_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public Builder setPin( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; pin_ = value; onChanged(); return this; } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public Builder clearPin() { bitField0_ = (bitField0_ & ~0x00000001); pin_ = getDefaultInstance().getPin(); onChanged(); return this; } /** * <code>required string pin = 1;</code> * * <pre> * matrix encoded PIN entered by user * </pre> */ public Builder setPinBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; pin_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:PinMatrixAck) } static { defaultInstance = new PinMatrixAck(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PinMatrixAck) } public interface CancelOrBuilder extends // @@protoc_insertion_point(interface_extends:Cancel) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code Cancel} * * <pre> ** * Request: Abort last operation that required user interaction * @prev ButtonRequest * @prev PinMatrixRequest * @prev PassphraseRequest * </pre> */ public static final class Cancel extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Cancel) CancelOrBuilder { // Use Cancel.newBuilder() to construct. private Cancel(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Cancel(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Cancel defaultInstance; public static Cancel getDefaultInstance() { return defaultInstance; } public Cancel getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Cancel( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Cancel_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Cancel_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.Builder.class); } public static com.google.protobuf.Parser<Cancel> PARSER = new com.google.protobuf.AbstractParser<Cancel>() { public Cancel parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Cancel(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Cancel> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Cancel} * * <pre> ** * Request: Abort last operation that required user interaction * @prev ButtonRequest * @prev PinMatrixRequest * @prev PassphraseRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Cancel) com.satoshilabs.trezor.protobuf.TrezorMessage.CancelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Cancel_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Cancel_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Cancel_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Cancel) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:Cancel) } static { defaultInstance = new Cancel(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Cancel) } public interface PassphraseRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:PassphraseRequest) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code PassphraseRequest} * * <pre> ** * Response: Device awaits encryption passphrase * @next PassphraseAck * @next Cancel * </pre> */ public static final class PassphraseRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:PassphraseRequest) PassphraseRequestOrBuilder { // Use PassphraseRequest.newBuilder() to construct. private PassphraseRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PassphraseRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PassphraseRequest defaultInstance; public static PassphraseRequest getDefaultInstance() { return defaultInstance; } public PassphraseRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PassphraseRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.Builder.class); } public static com.google.protobuf.Parser<PassphraseRequest> PARSER = new com.google.protobuf.AbstractParser<PassphraseRequest>() { public PassphraseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PassphraseRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PassphraseRequest> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code PassphraseRequest} * * <pre> ** * Response: Device awaits encryption passphrase * @next PassphraseAck * @next Cancel * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:PassphraseRequest) com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseRequest_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest build() { com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest result = new com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:PassphraseRequest) } static { defaultInstance = new PassphraseRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PassphraseRequest) } public interface PassphraseAckOrBuilder extends // @@protoc_insertion_point(interface_extends:PassphraseAck) com.google.protobuf.MessageOrBuilder { /** * <code>required string passphrase = 1;</code> */ boolean hasPassphrase(); /** * <code>required string passphrase = 1;</code> */ java.lang.String getPassphrase(); /** * <code>required string passphrase = 1;</code> */ com.google.protobuf.ByteString getPassphraseBytes(); } /** * Protobuf type {@code PassphraseAck} * * <pre> ** * Request: Send passphrase back * @prev PassphraseRequest * </pre> */ public static final class PassphraseAck extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:PassphraseAck) PassphraseAckOrBuilder { // Use PassphraseAck.newBuilder() to construct. private PassphraseAck(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PassphraseAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PassphraseAck defaultInstance; public static PassphraseAck getDefaultInstance() { return defaultInstance; } public PassphraseAck getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PassphraseAck( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; passphrase_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.Builder.class); } public static com.google.protobuf.Parser<PassphraseAck> PARSER = new com.google.protobuf.AbstractParser<PassphraseAck>() { public PassphraseAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PassphraseAck(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PassphraseAck> getParserForType() { return PARSER; } private int bitField0_; public static final int PASSPHRASE_FIELD_NUMBER = 1; private java.lang.Object passphrase_; /** * <code>required string passphrase = 1;</code> */ public boolean hasPassphrase() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string passphrase = 1;</code> */ public java.lang.String getPassphrase() { java.lang.Object ref = passphrase_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { passphrase_ = s; } return s; } } /** * <code>required string passphrase = 1;</code> */ public com.google.protobuf.ByteString getPassphraseBytes() { java.lang.Object ref = passphrase_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); passphrase_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { passphrase_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasPassphrase()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getPassphraseBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getPassphraseBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code PassphraseAck} * * <pre> ** * Request: Send passphrase back * @prev PassphraseRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:PassphraseAck) com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); passphrase_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PassphraseAck_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck build() { com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck result = new com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.passphrase_ = passphrase_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck.getDefaultInstance()) return this; if (other.hasPassphrase()) { bitField0_ |= 0x00000001; passphrase_ = other.passphrase_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasPassphrase(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.PassphraseAck) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object passphrase_ = ""; /** * <code>required string passphrase = 1;</code> */ public boolean hasPassphrase() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string passphrase = 1;</code> */ public java.lang.String getPassphrase() { java.lang.Object ref = passphrase_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { passphrase_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>required string passphrase = 1;</code> */ public com.google.protobuf.ByteString getPassphraseBytes() { java.lang.Object ref = passphrase_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); passphrase_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string passphrase = 1;</code> */ public Builder setPassphrase( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; passphrase_ = value; onChanged(); return this; } /** * <code>required string passphrase = 1;</code> */ public Builder clearPassphrase() { bitField0_ = (bitField0_ & ~0x00000001); passphrase_ = getDefaultInstance().getPassphrase(); onChanged(); return this; } /** * <code>required string passphrase = 1;</code> */ public Builder setPassphraseBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; passphrase_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:PassphraseAck) } static { defaultInstance = new PassphraseAck(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PassphraseAck) } public interface GetEntropyOrBuilder extends // @@protoc_insertion_point(interface_extends:GetEntropy) com.google.protobuf.MessageOrBuilder { /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ boolean hasSize(); /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ int getSize(); } /** * Protobuf type {@code GetEntropy} * * <pre> ** * Request: Request a sample of random data generated by hardware RNG. May be used for testing. * @next ButtonRequest * @next Entropy * @next Failure * </pre> */ public static final class GetEntropy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:GetEntropy) GetEntropyOrBuilder { // Use GetEntropy.newBuilder() to construct. private GetEntropy(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private GetEntropy(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final GetEntropy defaultInstance; public static GetEntropy getDefaultInstance() { return defaultInstance; } public GetEntropy getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetEntropy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; size_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetEntropy_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetEntropy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.class, com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.Builder.class); } public static com.google.protobuf.Parser<GetEntropy> PARSER = new com.google.protobuf.AbstractParser<GetEntropy>() { public GetEntropy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetEntropy(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<GetEntropy> getParserForType() { return PARSER; } private int bitField0_; public static final int SIZE_FIELD_NUMBER = 1; private int size_; /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ public boolean hasSize() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ public int getSize() { return size_; } private void initFields() { size_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasSize()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, size_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, size_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code GetEntropy} * * <pre> ** * Request: Request a sample of random data generated by hardware RNG. May be used for testing. * @next ButtonRequest * @next Entropy * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:GetEntropy) com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetEntropy_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetEntropy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.class, com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); size_ = 0; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetEntropy_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy build() { com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy result = new com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.size_ = size_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy.getDefaultInstance()) return this; if (other.hasSize()) { setSize(other.getSize()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasSize(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.GetEntropy) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int size_ ; /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ public boolean hasSize() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ public int getSize() { return size_; } /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ public Builder setSize(int value) { bitField0_ |= 0x00000001; size_ = value; onChanged(); return this; } /** * <code>required uint32 size = 1;</code> * * <pre> * size of requested entropy * </pre> */ public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000001); size_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:GetEntropy) } static { defaultInstance = new GetEntropy(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:GetEntropy) } public interface EntropyOrBuilder extends // @@protoc_insertion_point(interface_extends:Entropy) com.google.protobuf.MessageOrBuilder { /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ boolean hasEntropy(); /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ com.google.protobuf.ByteString getEntropy(); } /** * Protobuf type {@code Entropy} * * <pre> ** * Response: Reply with random data generated by internal RNG * @prev GetEntropy * </pre> */ public static final class Entropy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Entropy) EntropyOrBuilder { // Use Entropy.newBuilder() to construct. private Entropy(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Entropy(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Entropy defaultInstance; public static Entropy getDefaultInstance() { return defaultInstance; } public Entropy getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Entropy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; entropy_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Entropy_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Entropy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.Builder.class); } public static com.google.protobuf.Parser<Entropy> PARSER = new com.google.protobuf.AbstractParser<Entropy>() { public Entropy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Entropy(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Entropy> getParserForType() { return PARSER; } private int bitField0_; public static final int ENTROPY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString entropy_; /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ public boolean hasEntropy() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ public com.google.protobuf.ByteString getEntropy() { return entropy_; } private void initFields() { entropy_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasEntropy()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, entropy_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, entropy_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Entropy} * * <pre> ** * Response: Reply with random data generated by internal RNG * @prev GetEntropy * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Entropy) com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Entropy_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Entropy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); entropy_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Entropy_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.entropy_ = entropy_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy.getDefaultInstance()) return this; if (other.hasEntropy()) { setEntropy(other.getEntropy()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasEntropy(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Entropy) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString entropy_ = com.google.protobuf.ByteString.EMPTY; /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ public boolean hasEntropy() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ public com.google.protobuf.ByteString getEntropy() { return entropy_; } /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ public Builder setEntropy(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; entropy_ = value; onChanged(); return this; } /** * <code>required bytes entropy = 1;</code> * * <pre> * stream of random generated bytes * </pre> */ public Builder clearEntropy() { bitField0_ = (bitField0_ & ~0x00000001); entropy_ = getDefaultInstance().getEntropy(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:Entropy) } static { defaultInstance = new Entropy(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Entropy) } public interface GetPublicKeyOrBuilder extends // @@protoc_insertion_point(interface_extends:GetPublicKey) com.google.protobuf.MessageOrBuilder { /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressN(int index); } /** * Protobuf type {@code GetPublicKey} * * <pre> ** * Request: Ask device for public key corresponding to address_n path * @next PassphraseRequest * @next PublicKey * @next Failure * </pre> */ public static final class GetPublicKey extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:GetPublicKey) GetPublicKeyOrBuilder { // Use GetPublicKey.newBuilder() to construct. private GetPublicKey(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private GetPublicKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final GetPublicKey defaultInstance; public static GetPublicKey getDefaultInstance() { return defaultInstance; } public GetPublicKey getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetPublicKey( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } addressN_.add(input.readUInt32()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetPublicKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetPublicKey_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.class, com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.Builder.class); } public static com.google.protobuf.Parser<GetPublicKey> PARSER = new com.google.protobuf.AbstractParser<GetPublicKey>() { public GetPublicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetPublicKey(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<GetPublicKey> getParserForType() { return PARSER; } public static final int ADDRESS_N_FIELD_NUMBER = 1; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } private void initFields() { addressN_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(1, addressN_.get(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code GetPublicKey} * * <pre> ** * Request: Ask device for public key corresponding to address_n path * @next PassphraseRequest * @next PublicKey * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:GetPublicKey) com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetPublicKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetPublicKey_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.class, com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetPublicKey_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey build() { com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey result = new com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000001); } result.addressN_ = addressN_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey.getDefaultInstance()) return this; if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.GetPublicKey) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000001; } } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:GetPublicKey) } static { defaultInstance = new GetPublicKey(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:GetPublicKey) } public interface PublicKeyOrBuilder extends // @@protoc_insertion_point(interface_extends:PublicKey) com.google.protobuf.MessageOrBuilder { /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ boolean hasNode(); /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode(); /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder(); /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ boolean hasXpub(); /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ java.lang.String getXpub(); /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ com.google.protobuf.ByteString getXpubBytes(); } /** * Protobuf type {@code PublicKey} * * <pre> ** * Response: Contains public key derived from device private seed * @prev GetPublicKey * </pre> */ public static final class PublicKey extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:PublicKey) PublicKeyOrBuilder { // Use PublicKey.newBuilder() to construct. private PublicKey(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private PublicKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final PublicKey defaultInstance; public static PublicKey getDefaultInstance() { return defaultInstance; } public PublicKey getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PublicKey( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = node_.toBuilder(); } node_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(node_); node_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; xpub_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PublicKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PublicKey_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.Builder.class); } public static com.google.protobuf.Parser<PublicKey> PARSER = new com.google.protobuf.AbstractParser<PublicKey>() { public PublicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PublicKey(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<PublicKey> getParserForType() { return PARSER; } private int bitField0_; public static final int NODE_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_; /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { return node_; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { return node_; } public static final int XPUB_FIELD_NUMBER = 2; private java.lang.Object xpub_; /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public boolean hasXpub() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public java.lang.String getXpub() { java.lang.Object ref = xpub_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { xpub_ = s; } return s; } } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public com.google.protobuf.ByteString getXpubBytes() { java.lang.Object ref = xpub_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); xpub_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); xpub_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasNode()) { memoizedIsInitialized = 0; return false; } if (!getNode().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, node_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getXpubBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, node_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getXpubBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code PublicKey} * * <pre> ** * Response: Contains public key derived from device private seed * @prev GetPublicKey * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:PublicKey) com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PublicKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PublicKey_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.class, com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getNodeFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); xpub_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_PublicKey_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey build() { com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey result = new com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (nodeBuilder_ == null) { result.node_ = node_; } else { result.node_ = nodeBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.xpub_ = xpub_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey.getDefaultInstance()) return this; if (other.hasNode()) { mergeNode(other.getNode()); } if (other.hasXpub()) { bitField0_ |= 0x00000002; xpub_ = other.xpub_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasNode()) { return false; } return getNode().isInitialized(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.PublicKey) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> nodeBuilder_; /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { if (nodeBuilder_ == null) { return node_; } else { return nodeBuilder_.getMessage(); } } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public Builder setNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } node_ = value; onChanged(); } else { nodeBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public Builder setNode( com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); } else { nodeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public Builder mergeNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && node_ != com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance()) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } onChanged(); } else { nodeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public Builder clearNode() { if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); onChanged(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder getNodeBuilder() { bitField0_ |= 0x00000001; onChanged(); return getNodeFieldBuilder().getBuilder(); } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { return node_; } } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP32 public node * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { nodeBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder>( getNode(), getParentForChildren(), isClean()); node_ = null; } return nodeBuilder_; } private java.lang.Object xpub_ = ""; /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public boolean hasXpub() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public java.lang.String getXpub() { java.lang.Object ref = xpub_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { xpub_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public com.google.protobuf.ByteString getXpubBytes() { java.lang.Object ref = xpub_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); xpub_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public Builder setXpub( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; xpub_ = value; onChanged(); return this; } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public Builder clearXpub() { bitField0_ = (bitField0_ & ~0x00000002); xpub_ = getDefaultInstance().getXpub(); onChanged(); return this; } /** * <code>optional string xpub = 2;</code> * * <pre> * serialized form of public node * </pre> */ public Builder setXpubBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; xpub_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:PublicKey) } static { defaultInstance = new PublicKey(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:PublicKey) } public interface GetAddressOrBuilder extends // @@protoc_insertion_point(interface_extends:GetAddress) com.google.protobuf.MessageOrBuilder { /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressN(int index); /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ boolean hasCoinName(); /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ com.google.protobuf.ByteString getCoinNameBytes(); /** * <code>optional bool show_display = 3;</code> */ boolean hasShowDisplay(); /** * <code>optional bool show_display = 3;</code> */ boolean getShowDisplay(); /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ boolean hasMultisig(); /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig(); /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder(); } /** * Protobuf type {@code GetAddress} * * <pre> ** * Request: Ask device for address corresponding to address_n path * @next PassphraseRequest * @next Address * @next Failure * </pre> */ public static final class GetAddress extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:GetAddress) GetAddressOrBuilder { // Use GetAddress.newBuilder() to construct. private GetAddress(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private GetAddress(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final GetAddress defaultInstance; public static GetAddress getDefaultInstance() { return defaultInstance; } public GetAddress getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetAddress( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } addressN_.add(input.readUInt32()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; coinName_ = bs; break; } case 24: { bitField0_ |= 0x00000002; showDisplay_ = input.readBool(); break; } case 34: { com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = multisig_.toBuilder(); } multisig_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(multisig_); multisig_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetAddress_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetAddress_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.class, com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.Builder.class); } public static com.google.protobuf.Parser<GetAddress> PARSER = new com.google.protobuf.AbstractParser<GetAddress>() { public GetAddress parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetAddress(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<GetAddress> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_N_FIELD_NUMBER = 1; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int COIN_NAME_FIELD_NUMBER = 2; private java.lang.Object coinName_; /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SHOW_DISPLAY_FIELD_NUMBER = 3; private boolean showDisplay_; /** * <code>optional bool show_display = 3;</code> */ public boolean hasShowDisplay() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bool show_display = 3;</code> */ public boolean getShowDisplay() { return showDisplay_; } public static final int MULTISIG_FIELD_NUMBER = 4; private com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType multisig_; /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public boolean hasMultisig() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig() { return multisig_; } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder() { return multisig_; } private void initFields() { addressN_ = java.util.Collections.emptyList(); coinName_ = "Bitcoin"; showDisplay_ = false; multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (hasMultisig()) { if (!getMultisig().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(1, addressN_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(2, getCoinNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBool(3, showDisplay_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(4, multisig_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getCoinNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, showDisplay_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, multisig_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code GetAddress} * * <pre> ** * Request: Ask device for address corresponding to address_n path * @next PassphraseRequest * @next Address * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:GetAddress) com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddressOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetAddress_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetAddress_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.class, com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getMultisigFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); coinName_ = "Bitcoin"; bitField0_ = (bitField0_ & ~0x00000002); showDisplay_ = false; bitField0_ = (bitField0_ & ~0x00000004); if (multisigBuilder_ == null) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } else { multisigBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_GetAddress_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress build() { com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress result = new com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000001); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } result.coinName_ = coinName_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.showDisplay_ = showDisplay_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } if (multisigBuilder_ == null) { result.multisig_ = multisig_; } else { result.multisig_ = multisigBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress.getDefaultInstance()) return this; if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasCoinName()) { bitField0_ |= 0x00000002; coinName_ = other.coinName_; onChanged(); } if (other.hasShowDisplay()) { setShowDisplay(other.getShowDisplay()); } if (other.hasMultisig()) { mergeMultisig(other.getMultisig()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (hasMultisig()) { if (!getMultisig().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.GetAddress) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000001; } } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private java.lang.Object coinName_ = "Bitcoin"; /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000002); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 2 [default = "Bitcoin"];</code> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; coinName_ = value; onChanged(); return this; } private boolean showDisplay_ ; /** * <code>optional bool show_display = 3;</code> */ public boolean hasShowDisplay() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool show_display = 3;</code> */ public boolean getShowDisplay() { return showDisplay_; } /** * <code>optional bool show_display = 3;</code> */ public Builder setShowDisplay(boolean value) { bitField0_ |= 0x00000004; showDisplay_ = value; onChanged(); return this; } /** * <code>optional bool show_display = 3;</code> */ public Builder clearShowDisplay() { bitField0_ = (bitField0_ & ~0x00000004); showDisplay_ = false; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder> multisigBuilder_; /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public boolean hasMultisig() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig() { if (multisigBuilder_ == null) { return multisig_; } else { return multisigBuilder_.getMessage(); } } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public Builder setMultisig(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType value) { if (multisigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } multisig_ = value; onChanged(); } else { multisigBuilder_.setMessage(value); } bitField0_ |= 0x00000008; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public Builder setMultisig( com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder builderForValue) { if (multisigBuilder_ == null) { multisig_ = builderForValue.build(); onChanged(); } else { multisigBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public Builder mergeMultisig(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType value) { if (multisigBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && multisig_ != com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance()) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.newBuilder(multisig_).mergeFrom(value).buildPartial(); } else { multisig_ = value; } onChanged(); } else { multisigBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public Builder clearMultisig() { if (multisigBuilder_ == null) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); onChanged(); } else { multisigBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder getMultisigBuilder() { bitField0_ |= 0x00000008; onChanged(); return getMultisigFieldBuilder().getBuilder(); } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder() { if (multisigBuilder_ != null) { return multisigBuilder_.getMessageOrBuilder(); } else { return multisig_; } } /** * <code>optional .MultisigRedeemScriptType multisig = 4;</code> * * <pre> * Filled if we are showing a multisig address * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder> getMultisigFieldBuilder() { if (multisigBuilder_ == null) { multisigBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder>( getMultisig(), getParentForChildren(), isClean()); multisig_ = null; } return multisigBuilder_; } // @@protoc_insertion_point(builder_scope:GetAddress) } static { defaultInstance = new GetAddress(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:GetAddress) } public interface AddressOrBuilder extends // @@protoc_insertion_point(interface_extends:Address) com.google.protobuf.MessageOrBuilder { /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ boolean hasAddress(); /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ java.lang.String getAddress(); /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ com.google.protobuf.ByteString getAddressBytes(); } /** * Protobuf type {@code Address} * * <pre> ** * Response: Contains address derived from device private seed * @prev GetAddress * </pre> */ public static final class Address extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:Address) AddressOrBuilder { // Use Address.newBuilder() to construct. private Address(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Address(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Address defaultInstance; public static Address getDefaultInstance() { return defaultInstance; } public Address getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Address( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; address_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Address_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Address_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Address.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Address.Builder.class); } public static com.google.protobuf.Parser<Address> PARSER = new com.google.protobuf.AbstractParser<Address>() { public Address parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Address(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Address> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_FIELD_NUMBER = 1; private java.lang.Object address_; /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { address_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasAddress()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getAddressBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getAddressBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.Address parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.Address prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code Address} * * <pre> ** * Response: Contains address derived from device private seed * @prev GetAddress * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:Address) com.satoshilabs.trezor.protobuf.TrezorMessage.AddressOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Address_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Address_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.Address.class, com.satoshilabs.trezor.protobuf.TrezorMessage.Address.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.Address.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); address_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_Address_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Address getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.Address.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.Address build() { com.satoshilabs.trezor.protobuf.TrezorMessage.Address result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.Address buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.Address result = new com.satoshilabs.trezor.protobuf.TrezorMessage.Address(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.address_ = address_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.Address) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.Address)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.Address other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.Address.getDefaultInstance()) return this; if (other.hasAddress()) { bitField0_ |= 0x00000001; address_ = other.address_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasAddress(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.Address parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.Address) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object address_ = ""; /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public Builder clearAddress() { bitField0_ = (bitField0_ & ~0x00000001); address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** * <code>required string address = 1;</code> * * <pre> * Coin address in Base58 encoding * </pre> */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:Address) } static { defaultInstance = new Address(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:Address) } public interface WipeDeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:WipeDevice) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code WipeDevice} * * <pre> ** * Request: Request device to wipe all sensitive data and settings * @next ButtonRequest * </pre> */ public static final class WipeDevice extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:WipeDevice) WipeDeviceOrBuilder { // Use WipeDevice.newBuilder() to construct. private WipeDevice(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private WipeDevice(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final WipeDevice defaultInstance; public static WipeDevice getDefaultInstance() { return defaultInstance; } public WipeDevice getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WipeDevice( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WipeDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WipeDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.Builder.class); } public static com.google.protobuf.Parser<WipeDevice> PARSER = new com.google.protobuf.AbstractParser<WipeDevice>() { public WipeDevice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WipeDevice(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<WipeDevice> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code WipeDevice} * * <pre> ** * Request: Request device to wipe all sensitive data and settings * @next ButtonRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:WipeDevice) com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WipeDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WipeDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WipeDevice_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice build() { com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice result = new com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.WipeDevice) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:WipeDevice) } static { defaultInstance = new WipeDevice(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:WipeDevice) } public interface LoadDeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:LoadDevice) com.google.protobuf.MessageOrBuilder { /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ boolean hasMnemonic(); /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ java.lang.String getMnemonic(); /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ com.google.protobuf.ByteString getMnemonicBytes(); /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ boolean hasNode(); /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode(); /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder(); /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ boolean hasPin(); /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ java.lang.String getPin(); /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ com.google.protobuf.ByteString getPinBytes(); /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ boolean hasPassphraseProtection(); /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ boolean getPassphraseProtection(); /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ boolean hasLanguage(); /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ java.lang.String getLanguage(); /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ com.google.protobuf.ByteString getLanguageBytes(); /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ boolean hasLabel(); /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ java.lang.String getLabel(); /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ com.google.protobuf.ByteString getLabelBytes(); /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ boolean hasSkipChecksum(); /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ boolean getSkipChecksum(); } /** * Protobuf type {@code LoadDevice} * * <pre> ** * Request: Load seed and related internal settings from the computer * @next ButtonRequest * @next Success * @next Failure * </pre> */ public static final class LoadDevice extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:LoadDevice) LoadDeviceOrBuilder { // Use LoadDevice.newBuilder() to construct. private LoadDevice(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private LoadDevice(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final LoadDevice defaultInstance; public static LoadDevice getDefaultInstance() { return defaultInstance; } public LoadDevice getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private LoadDevice( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; mnemonic_ = bs; break; } case 18: { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = node_.toBuilder(); } node_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(node_); node_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000002; break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; pin_ = bs; break; } case 32: { bitField0_ |= 0x00000008; passphraseProtection_ = input.readBool(); break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; language_ = bs; break; } case 50: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; label_ = bs; break; } case 56: { bitField0_ |= 0x00000040; skipChecksum_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_LoadDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_LoadDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.Builder.class); } public static com.google.protobuf.Parser<LoadDevice> PARSER = new com.google.protobuf.AbstractParser<LoadDevice>() { public LoadDevice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new LoadDevice(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<LoadDevice> getParserForType() { return PARSER; } private int bitField0_; public static final int MNEMONIC_FIELD_NUMBER = 1; private java.lang.Object mnemonic_; /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public boolean hasMnemonic() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public java.lang.String getMnemonic() { java.lang.Object ref = mnemonic_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { mnemonic_ = s; } return s; } } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public com.google.protobuf.ByteString getMnemonicBytes() { java.lang.Object ref = mnemonic_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mnemonic_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NODE_FIELD_NUMBER = 2; private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_; /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { return node_; } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { return node_; } public static final int PIN_FIELD_NUMBER = 3; private java.lang.Object pin_; /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public boolean hasPin() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public java.lang.String getPin() { java.lang.Object ref = pin_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pin_ = s; } return s; } } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public com.google.protobuf.ByteString getPinBytes() { java.lang.Object ref = pin_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PASSPHRASE_PROTECTION_FIELD_NUMBER = 4; private boolean passphraseProtection_; /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } public static final int LANGUAGE_FIELD_NUMBER = 5; private java.lang.Object language_; /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FIELD_NUMBER = 6; private java.lang.Object label_; /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SKIP_CHECKSUM_FIELD_NUMBER = 7; private boolean skipChecksum_; /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ public boolean hasSkipChecksum() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ public boolean getSkipChecksum() { return skipChecksum_; } private void initFields() { mnemonic_ = ""; node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); pin_ = ""; passphraseProtection_ = false; language_ = "english"; label_ = ""; skipChecksum_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (hasNode()) { if (!getNode().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getMnemonicBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, node_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getPinBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, passphraseProtection_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getLanguageBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, getLabelBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBool(7, skipChecksum_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getMnemonicBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, node_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getPinBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, passphraseProtection_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getLanguageBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, getLabelBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, skipChecksum_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code LoadDevice} * * <pre> ** * Request: Load seed and related internal settings from the computer * @next ButtonRequest * @next Success * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:LoadDevice) com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_LoadDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_LoadDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getNodeFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); mnemonic_ = ""; bitField0_ = (bitField0_ & ~0x00000001); if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); pin_ = ""; bitField0_ = (bitField0_ & ~0x00000004); passphraseProtection_ = false; bitField0_ = (bitField0_ & ~0x00000008); language_ = "english"; bitField0_ = (bitField0_ & ~0x00000010); label_ = ""; bitField0_ = (bitField0_ & ~0x00000020); skipChecksum_ = false; bitField0_ = (bitField0_ & ~0x00000040); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_LoadDevice_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice build() { com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice result = new com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.mnemonic_ = mnemonic_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (nodeBuilder_ == null) { result.node_ = node_; } else { result.node_ = nodeBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.pin_ = pin_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.passphraseProtection_ = passphraseProtection_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.language_ = language_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.label_ = label_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } result.skipChecksum_ = skipChecksum_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice.getDefaultInstance()) return this; if (other.hasMnemonic()) { bitField0_ |= 0x00000001; mnemonic_ = other.mnemonic_; onChanged(); } if (other.hasNode()) { mergeNode(other.getNode()); } if (other.hasPin()) { bitField0_ |= 0x00000004; pin_ = other.pin_; onChanged(); } if (other.hasPassphraseProtection()) { setPassphraseProtection(other.getPassphraseProtection()); } if (other.hasLanguage()) { bitField0_ |= 0x00000010; language_ = other.language_; onChanged(); } if (other.hasLabel()) { bitField0_ |= 0x00000020; label_ = other.label_; onChanged(); } if (other.hasSkipChecksum()) { setSkipChecksum(other.getSkipChecksum()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (hasNode()) { if (!getNode().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.LoadDevice) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object mnemonic_ = ""; /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public boolean hasMnemonic() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public java.lang.String getMnemonic() { java.lang.Object ref = mnemonic_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { mnemonic_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public com.google.protobuf.ByteString getMnemonicBytes() { java.lang.Object ref = mnemonic_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mnemonic_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public Builder setMnemonic( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; mnemonic_ = value; onChanged(); return this; } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public Builder clearMnemonic() { bitField0_ = (bitField0_ & ~0x00000001); mnemonic_ = getDefaultInstance().getMnemonic(); onChanged(); return this; } /** * <code>optional string mnemonic = 1;</code> * * <pre> * seed encoded as BIP-39 mnemonic (12, 18 or 24 words) * </pre> */ public Builder setMnemonicBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; mnemonic_ = value; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> nodeBuilder_; /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { if (nodeBuilder_ == null) { return node_; } else { return nodeBuilder_.getMessage(); } } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public Builder setNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } node_ = value; onChanged(); } else { nodeBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public Builder setNode( com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); } else { nodeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public Builder mergeNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && node_ != com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance()) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } onChanged(); } else { nodeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public Builder clearNode() { if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); onChanged(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder getNodeBuilder() { bitField0_ |= 0x00000002; onChanged(); return getNodeFieldBuilder().getBuilder(); } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { return node_; } } /** * <code>optional .HDNodeType node = 2;</code> * * <pre> * BIP-32 node * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { nodeBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder>( getNode(), getParentForChildren(), isClean()); node_ = null; } return nodeBuilder_; } private java.lang.Object pin_ = ""; /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public boolean hasPin() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public java.lang.String getPin() { java.lang.Object ref = pin_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pin_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public com.google.protobuf.ByteString getPinBytes() { java.lang.Object ref = pin_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public Builder setPin( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; pin_ = value; onChanged(); return this; } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public Builder clearPin() { bitField0_ = (bitField0_ & ~0x00000004); pin_ = getDefaultInstance().getPin(); onChanged(); return this; } /** * <code>optional string pin = 3;</code> * * <pre> * set PIN protection * </pre> */ public Builder setPinBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; pin_ = value; onChanged(); return this; } private boolean passphraseProtection_ ; /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public Builder setPassphraseProtection(boolean value) { bitField0_ |= 0x00000008; passphraseProtection_ = value; onChanged(); return this; } /** * <code>optional bool passphrase_protection = 4;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public Builder clearPassphraseProtection() { bitField0_ = (bitField0_ & ~0x00000008); passphraseProtection_ = false; onChanged(); return this; } private java.lang.Object language_ = "english"; /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; language_ = value; onChanged(); return this; } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder clearLanguage() { bitField0_ = (bitField0_ & ~0x00000010); language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; language_ = value; onChanged(); return this; } private java.lang.Object label_ = ""; /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; label_ = value; onChanged(); return this; } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000020); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; label_ = value; onChanged(); return this; } private boolean skipChecksum_ ; /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ public boolean hasSkipChecksum() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ public boolean getSkipChecksum() { return skipChecksum_; } /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ public Builder setSkipChecksum(boolean value) { bitField0_ |= 0x00000040; skipChecksum_ = value; onChanged(); return this; } /** * <code>optional bool skip_checksum = 7;</code> * * <pre> * do not test mnemonic for valid BIP-39 checksum * </pre> */ public Builder clearSkipChecksum() { bitField0_ = (bitField0_ & ~0x00000040); skipChecksum_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:LoadDevice) } static { defaultInstance = new LoadDevice(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:LoadDevice) } public interface ResetDeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:ResetDevice) com.google.protobuf.MessageOrBuilder { /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ boolean hasDisplayRandom(); /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ boolean getDisplayRandom(); /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ boolean hasStrength(); /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ int getStrength(); /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ boolean hasPassphraseProtection(); /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ boolean getPassphraseProtection(); /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ boolean hasPinProtection(); /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ boolean getPinProtection(); /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ boolean hasLanguage(); /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ java.lang.String getLanguage(); /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ com.google.protobuf.ByteString getLanguageBytes(); /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ boolean hasLabel(); /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ java.lang.String getLabel(); /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ com.google.protobuf.ByteString getLabelBytes(); } /** * Protobuf type {@code ResetDevice} * * <pre> ** * Request: Ask device to do initialization involving user interaction * @next EntropyRequest * @next Failure * </pre> */ public static final class ResetDevice extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:ResetDevice) ResetDeviceOrBuilder { // Use ResetDevice.newBuilder() to construct. private ResetDevice(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private ResetDevice(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final ResetDevice defaultInstance; public static ResetDevice getDefaultInstance() { return defaultInstance; } public ResetDevice getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ResetDevice( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; displayRandom_ = input.readBool(); break; } case 16: { bitField0_ |= 0x00000002; strength_ = input.readUInt32(); break; } case 24: { bitField0_ |= 0x00000004; passphraseProtection_ = input.readBool(); break; } case 32: { bitField0_ |= 0x00000008; pinProtection_ = input.readBool(); break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; language_ = bs; break; } case 50: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; label_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ResetDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ResetDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.Builder.class); } public static com.google.protobuf.Parser<ResetDevice> PARSER = new com.google.protobuf.AbstractParser<ResetDevice>() { public ResetDevice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ResetDevice(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<ResetDevice> getParserForType() { return PARSER; } private int bitField0_; public static final int DISPLAY_RANDOM_FIELD_NUMBER = 1; private boolean displayRandom_; /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ public boolean hasDisplayRandom() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ public boolean getDisplayRandom() { return displayRandom_; } public static final int STRENGTH_FIELD_NUMBER = 2; private int strength_; /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ public boolean hasStrength() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ public int getStrength() { return strength_; } public static final int PASSPHRASE_PROTECTION_FIELD_NUMBER = 3; private boolean passphraseProtection_; /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } public static final int PIN_PROTECTION_FIELD_NUMBER = 4; private boolean pinProtection_; /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ public boolean getPinProtection() { return pinProtection_; } public static final int LANGUAGE_FIELD_NUMBER = 5; private java.lang.Object language_; /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FIELD_NUMBER = 6; private java.lang.Object label_; /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { displayRandom_ = false; strength_ = 128; passphraseProtection_ = false; pinProtection_ = false; language_ = "english"; label_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBool(1, displayRandom_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, strength_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, passphraseProtection_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, pinProtection_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getLanguageBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, getLabelBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, displayRandom_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, strength_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, passphraseProtection_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, pinProtection_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getLanguageBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, getLabelBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code ResetDevice} * * <pre> ** * Request: Ask device to do initialization involving user interaction * @next EntropyRequest * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:ResetDevice) com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ResetDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ResetDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); displayRandom_ = false; bitField0_ = (bitField0_ & ~0x00000001); strength_ = 128; bitField0_ = (bitField0_ & ~0x00000002); passphraseProtection_ = false; bitField0_ = (bitField0_ & ~0x00000004); pinProtection_ = false; bitField0_ = (bitField0_ & ~0x00000008); language_ = "english"; bitField0_ = (bitField0_ & ~0x00000010); label_ = ""; bitField0_ = (bitField0_ & ~0x00000020); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_ResetDevice_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice build() { com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice result = new com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.displayRandom_ = displayRandom_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.strength_ = strength_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.passphraseProtection_ = passphraseProtection_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.pinProtection_ = pinProtection_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.language_ = language_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.label_ = label_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice.getDefaultInstance()) return this; if (other.hasDisplayRandom()) { setDisplayRandom(other.getDisplayRandom()); } if (other.hasStrength()) { setStrength(other.getStrength()); } if (other.hasPassphraseProtection()) { setPassphraseProtection(other.getPassphraseProtection()); } if (other.hasPinProtection()) { setPinProtection(other.getPinProtection()); } if (other.hasLanguage()) { bitField0_ |= 0x00000010; language_ = other.language_; onChanged(); } if (other.hasLabel()) { bitField0_ |= 0x00000020; label_ = other.label_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.ResetDevice) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private boolean displayRandom_ ; /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ public boolean hasDisplayRandom() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ public boolean getDisplayRandom() { return displayRandom_; } /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ public Builder setDisplayRandom(boolean value) { bitField0_ |= 0x00000001; displayRandom_ = value; onChanged(); return this; } /** * <code>optional bool display_random = 1;</code> * * <pre> * display entropy generated by the device before asking for additional entropy * </pre> */ public Builder clearDisplayRandom() { bitField0_ = (bitField0_ & ~0x00000001); displayRandom_ = false; onChanged(); return this; } private int strength_ = 128; /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ public boolean hasStrength() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ public int getStrength() { return strength_; } /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ public Builder setStrength(int value) { bitField0_ |= 0x00000002; strength_ = value; onChanged(); return this; } /** * <code>optional uint32 strength = 2 [default = 128];</code> * * <pre> * strength of seed in bits * </pre> */ public Builder clearStrength() { bitField0_ = (bitField0_ & ~0x00000002); strength_ = 128; onChanged(); return this; } private boolean passphraseProtection_ ; /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public Builder setPassphraseProtection(boolean value) { bitField0_ |= 0x00000004; passphraseProtection_ = value; onChanged(); return this; } /** * <code>optional bool passphrase_protection = 3;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public Builder clearPassphraseProtection() { bitField0_ = (bitField0_ & ~0x00000004); passphraseProtection_ = false; onChanged(); return this; } private boolean pinProtection_ ; /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ public boolean getPinProtection() { return pinProtection_; } /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ public Builder setPinProtection(boolean value) { bitField0_ |= 0x00000008; pinProtection_ = value; onChanged(); return this; } /** * <code>optional bool pin_protection = 4;</code> * * <pre> * enable PIN protection * </pre> */ public Builder clearPinProtection() { bitField0_ = (bitField0_ & ~0x00000008); pinProtection_ = false; onChanged(); return this; } private java.lang.Object language_ = "english"; /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; language_ = value; onChanged(); return this; } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder clearLanguage() { bitField0_ = (bitField0_ & ~0x00000010); language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** * <code>optional string language = 5 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; language_ = value; onChanged(); return this; } private java.lang.Object label_ = ""; /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; label_ = value; onChanged(); return this; } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000020); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * <code>optional string label = 6;</code> * * <pre> * device label * </pre> */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; label_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:ResetDevice) } static { defaultInstance = new ResetDevice(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:ResetDevice) } public interface EntropyRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:EntropyRequest) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code EntropyRequest} * * <pre> ** * Response: Ask for additional entropy from host computer * @prev ResetDevice * @next EntropyAck * </pre> */ public static final class EntropyRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:EntropyRequest) EntropyRequestOrBuilder { // Use EntropyRequest.newBuilder() to construct. private EntropyRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private EntropyRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final EntropyRequest defaultInstance; public static EntropyRequest getDefaultInstance() { return defaultInstance; } public EntropyRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EntropyRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.Builder.class); } public static com.google.protobuf.Parser<EntropyRequest> PARSER = new com.google.protobuf.AbstractParser<EntropyRequest>() { public EntropyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EntropyRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<EntropyRequest> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code EntropyRequest} * * <pre> ** * Response: Ask for additional entropy from host computer * @prev ResetDevice * @next EntropyAck * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:EntropyRequest) com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyRequest_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest build() { com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest result = new com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:EntropyRequest) } static { defaultInstance = new EntropyRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:EntropyRequest) } public interface EntropyAckOrBuilder extends // @@protoc_insertion_point(interface_extends:EntropyAck) com.google.protobuf.MessageOrBuilder { /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ boolean hasEntropy(); /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ com.google.protobuf.ByteString getEntropy(); } /** * Protobuf type {@code EntropyAck} * * <pre> ** * Request: Provide additional entropy for seed generation function * @prev EntropyRequest * @next ButtonRequest * </pre> */ public static final class EntropyAck extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:EntropyAck) EntropyAckOrBuilder { // Use EntropyAck.newBuilder() to construct. private EntropyAck(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private EntropyAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final EntropyAck defaultInstance; public static EntropyAck getDefaultInstance() { return defaultInstance; } public EntropyAck getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EntropyAck( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; entropy_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.Builder.class); } public static com.google.protobuf.Parser<EntropyAck> PARSER = new com.google.protobuf.AbstractParser<EntropyAck>() { public EntropyAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EntropyAck(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<EntropyAck> getParserForType() { return PARSER; } private int bitField0_; public static final int ENTROPY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString entropy_; /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ public boolean hasEntropy() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ public com.google.protobuf.ByteString getEntropy() { return entropy_; } private void initFields() { entropy_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, entropy_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, entropy_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code EntropyAck} * * <pre> ** * Request: Provide additional entropy for seed generation function * @prev EntropyRequest * @next ButtonRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:EntropyAck) com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); entropy_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EntropyAck_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck build() { com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck result = new com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.entropy_ = entropy_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck.getDefaultInstance()) return this; if (other.hasEntropy()) { setEntropy(other.getEntropy()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.EntropyAck) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString entropy_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ public boolean hasEntropy() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ public com.google.protobuf.ByteString getEntropy() { return entropy_; } /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ public Builder setEntropy(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; entropy_ = value; onChanged(); return this; } /** * <code>optional bytes entropy = 1;</code> * * <pre> * 256 bits (32 bytes) of random data * </pre> */ public Builder clearEntropy() { bitField0_ = (bitField0_ & ~0x00000001); entropy_ = getDefaultInstance().getEntropy(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:EntropyAck) } static { defaultInstance = new EntropyAck(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:EntropyAck) } public interface RecoveryDeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:RecoveryDevice) com.google.protobuf.MessageOrBuilder { /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ boolean hasWordCount(); /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ int getWordCount(); /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ boolean hasPassphraseProtection(); /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ boolean getPassphraseProtection(); /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ boolean hasPinProtection(); /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ boolean getPinProtection(); /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ boolean hasLanguage(); /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ java.lang.String getLanguage(); /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ com.google.protobuf.ByteString getLanguageBytes(); /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ boolean hasLabel(); /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ java.lang.String getLabel(); /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ com.google.protobuf.ByteString getLabelBytes(); /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ boolean hasEnforceWordlist(); /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ boolean getEnforceWordlist(); } /** * Protobuf type {@code RecoveryDevice} * * <pre> ** * Request: Start recovery workflow asking user for specific words of mnemonic * Used to recovery device safely even on untrusted computer. * @next WordRequest * </pre> */ public static final class RecoveryDevice extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:RecoveryDevice) RecoveryDeviceOrBuilder { // Use RecoveryDevice.newBuilder() to construct. private RecoveryDevice(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private RecoveryDevice(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final RecoveryDevice defaultInstance; public static RecoveryDevice getDefaultInstance() { return defaultInstance; } public RecoveryDevice getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RecoveryDevice( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; wordCount_ = input.readUInt32(); break; } case 16: { bitField0_ |= 0x00000002; passphraseProtection_ = input.readBool(); break; } case 24: { bitField0_ |= 0x00000004; pinProtection_ = input.readBool(); break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; language_ = bs; break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; label_ = bs; break; } case 48: { bitField0_ |= 0x00000020; enforceWordlist_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_RecoveryDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_RecoveryDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.Builder.class); } public static com.google.protobuf.Parser<RecoveryDevice> PARSER = new com.google.protobuf.AbstractParser<RecoveryDevice>() { public RecoveryDevice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RecoveryDevice(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<RecoveryDevice> getParserForType() { return PARSER; } private int bitField0_; public static final int WORD_COUNT_FIELD_NUMBER = 1; private int wordCount_; /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ public boolean hasWordCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ public int getWordCount() { return wordCount_; } public static final int PASSPHRASE_PROTECTION_FIELD_NUMBER = 2; private boolean passphraseProtection_; /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } public static final int PIN_PROTECTION_FIELD_NUMBER = 3; private boolean pinProtection_; /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ public boolean getPinProtection() { return pinProtection_; } public static final int LANGUAGE_FIELD_NUMBER = 4; private java.lang.Object language_; /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABEL_FIELD_NUMBER = 5; private java.lang.Object label_; /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ENFORCE_WORDLIST_FIELD_NUMBER = 6; private boolean enforceWordlist_; /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ public boolean hasEnforceWordlist() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ public boolean getEnforceWordlist() { return enforceWordlist_; } private void initFields() { wordCount_ = 0; passphraseProtection_ = false; pinProtection_ = false; language_ = "english"; label_ = ""; enforceWordlist_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, wordCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBool(2, passphraseProtection_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, pinProtection_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getLanguageBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, getLabelBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBool(6, enforceWordlist_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, wordCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, passphraseProtection_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, pinProtection_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getLanguageBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getLabelBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, enforceWordlist_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code RecoveryDevice} * * <pre> ** * Request: Start recovery workflow asking user for specific words of mnemonic * Used to recovery device safely even on untrusted computer. * @next WordRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:RecoveryDevice) com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDeviceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_RecoveryDevice_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_RecoveryDevice_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.class, com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); wordCount_ = 0; bitField0_ = (bitField0_ & ~0x00000001); passphraseProtection_ = false; bitField0_ = (bitField0_ & ~0x00000002); pinProtection_ = false; bitField0_ = (bitField0_ & ~0x00000004); language_ = "english"; bitField0_ = (bitField0_ & ~0x00000008); label_ = ""; bitField0_ = (bitField0_ & ~0x00000010); enforceWordlist_ = false; bitField0_ = (bitField0_ & ~0x00000020); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_RecoveryDevice_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice build() { com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice result = new com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.wordCount_ = wordCount_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.passphraseProtection_ = passphraseProtection_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.pinProtection_ = pinProtection_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.language_ = language_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.label_ = label_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.enforceWordlist_ = enforceWordlist_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice.getDefaultInstance()) return this; if (other.hasWordCount()) { setWordCount(other.getWordCount()); } if (other.hasPassphraseProtection()) { setPassphraseProtection(other.getPassphraseProtection()); } if (other.hasPinProtection()) { setPinProtection(other.getPinProtection()); } if (other.hasLanguage()) { bitField0_ |= 0x00000008; language_ = other.language_; onChanged(); } if (other.hasLabel()) { bitField0_ |= 0x00000010; label_ = other.label_; onChanged(); } if (other.hasEnforceWordlist()) { setEnforceWordlist(other.getEnforceWordlist()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.RecoveryDevice) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int wordCount_ ; /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ public boolean hasWordCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ public int getWordCount() { return wordCount_; } /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ public Builder setWordCount(int value) { bitField0_ |= 0x00000001; wordCount_ = value; onChanged(); return this; } /** * <code>optional uint32 word_count = 1;</code> * * <pre> * number of words in BIP-39 mnemonic * </pre> */ public Builder clearWordCount() { bitField0_ = (bitField0_ & ~0x00000001); wordCount_ = 0; onChanged(); return this; } private boolean passphraseProtection_ ; /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public Builder setPassphraseProtection(boolean value) { bitField0_ |= 0x00000002; passphraseProtection_ = value; onChanged(); return this; } /** * <code>optional bool passphrase_protection = 2;</code> * * <pre> * enable master node encryption using passphrase * </pre> */ public Builder clearPassphraseProtection() { bitField0_ = (bitField0_ & ~0x00000002); passphraseProtection_ = false; onChanged(); return this; } private boolean pinProtection_ ; /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ public boolean hasPinProtection() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ public boolean getPinProtection() { return pinProtection_; } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ public Builder setPinProtection(boolean value) { bitField0_ |= 0x00000004; pinProtection_ = value; onChanged(); return this; } /** * <code>optional bool pin_protection = 3;</code> * * <pre> * enable PIN protection * </pre> */ public Builder clearPinProtection() { bitField0_ = (bitField0_ & ~0x00000004); pinProtection_ = false; onChanged(); return this; } private java.lang.Object language_ = "english"; /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public boolean hasLanguage() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public java.lang.String getLanguage() { java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { language_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public com.google.protobuf.ByteString getLanguageBytes() { java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; language_ = value; onChanged(); return this; } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder clearLanguage() { bitField0_ = (bitField0_ & ~0x00000008); language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** * <code>optional string language = 4 [default = "english"];</code> * * <pre> * device language * </pre> */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; language_ = value; onChanged(); return this; } private java.lang.Object label_ = ""; /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public boolean hasLabel() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; label_ = value; onChanged(); return this; } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000010); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * <code>optional string label = 5;</code> * * <pre> * device label * </pre> */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; label_ = value; onChanged(); return this; } private boolean enforceWordlist_ ; /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ public boolean hasEnforceWordlist() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ public boolean getEnforceWordlist() { return enforceWordlist_; } /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ public Builder setEnforceWordlist(boolean value) { bitField0_ |= 0x00000020; enforceWordlist_ = value; onChanged(); return this; } /** * <code>optional bool enforce_wordlist = 6;</code> * * <pre> * enforce BIP-39 wordlist during the process * </pre> */ public Builder clearEnforceWordlist() { bitField0_ = (bitField0_ & ~0x00000020); enforceWordlist_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:RecoveryDevice) } static { defaultInstance = new RecoveryDevice(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:RecoveryDevice) } public interface WordRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:WordRequest) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code WordRequest} * * <pre> ** * Response: Device is waiting for user to enter word of the mnemonic * Its position is shown only on device's internal display. * @prev RecoveryDevice * @prev WordAck * </pre> */ public static final class WordRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:WordRequest) WordRequestOrBuilder { // Use WordRequest.newBuilder() to construct. private WordRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private WordRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final WordRequest defaultInstance; public static WordRequest getDefaultInstance() { return defaultInstance; } public WordRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WordRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.Builder.class); } public static com.google.protobuf.Parser<WordRequest> PARSER = new com.google.protobuf.AbstractParser<WordRequest>() { public WordRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WordRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<WordRequest> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code WordRequest} * * <pre> ** * Response: Device is waiting for user to enter word of the mnemonic * Its position is shown only on device's internal display. * @prev RecoveryDevice * @prev WordAck * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:WordRequest) com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordRequest_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest build() { com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest result = new com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.WordRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:WordRequest) } static { defaultInstance = new WordRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:WordRequest) } public interface WordAckOrBuilder extends // @@protoc_insertion_point(interface_extends:WordAck) com.google.protobuf.MessageOrBuilder { /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ boolean hasWord(); /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ java.lang.String getWord(); /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ com.google.protobuf.ByteString getWordBytes(); } /** * Protobuf type {@code WordAck} * * <pre> ** * Request: Computer replies with word from the mnemonic * @prev WordRequest * @next WordRequest * @next Success * @next Failure * </pre> */ public static final class WordAck extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:WordAck) WordAckOrBuilder { // Use WordAck.newBuilder() to construct. private WordAck(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private WordAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final WordAck defaultInstance; public static WordAck getDefaultInstance() { return defaultInstance; } public WordAck getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WordAck( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; word_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.Builder.class); } public static com.google.protobuf.Parser<WordAck> PARSER = new com.google.protobuf.AbstractParser<WordAck>() { public WordAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WordAck(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<WordAck> getParserForType() { return PARSER; } private int bitField0_; public static final int WORD_FIELD_NUMBER = 1; private java.lang.Object word_; /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public boolean hasWord() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public java.lang.String getWord() { java.lang.Object ref = word_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { word_ = s; } return s; } } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public com.google.protobuf.ByteString getWordBytes() { java.lang.Object ref = word_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); word_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { word_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasWord()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getWordBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getWordBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code WordAck} * * <pre> ** * Request: Computer replies with word from the mnemonic * @prev WordRequest * @next WordRequest * @next Success * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:WordAck) com.satoshilabs.trezor.protobuf.TrezorMessage.WordAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); word_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_WordAck_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck build() { com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck result = new com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.word_ = word_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck.getDefaultInstance()) return this; if (other.hasWord()) { bitField0_ |= 0x00000001; word_ = other.word_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasWord(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.WordAck) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object word_ = ""; /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public boolean hasWord() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public java.lang.String getWord() { java.lang.Object ref = word_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { word_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public com.google.protobuf.ByteString getWordBytes() { java.lang.Object ref = word_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); word_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public Builder setWord( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; word_ = value; onChanged(); return this; } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public Builder clearWord() { bitField0_ = (bitField0_ & ~0x00000001); word_ = getDefaultInstance().getWord(); onChanged(); return this; } /** * <code>required string word = 1;</code> * * <pre> * one word of mnemonic on asked position * </pre> */ public Builder setWordBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; word_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:WordAck) } static { defaultInstance = new WordAck(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:WordAck) } public interface SignMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:SignMessage) com.google.protobuf.MessageOrBuilder { /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressN(int index); /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ boolean hasMessage(); /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ com.google.protobuf.ByteString getMessage(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ boolean hasCoinName(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ com.google.protobuf.ByteString getCoinNameBytes(); } /** * Protobuf type {@code SignMessage} * * <pre> ** * Request: Ask device to sign message * @next MessageSignature * @next Failure * </pre> */ public static final class SignMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:SignMessage) SignMessageOrBuilder { // Use SignMessage.newBuilder() to construct. private SignMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private SignMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final SignMessage defaultInstance; public static SignMessage getDefaultInstance() { return defaultInstance; } public SignMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private SignMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } addressN_.add(input.readUInt32()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 18: { bitField0_ |= 0x00000001; message_ = input.readBytes(); break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; coinName_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.Builder.class); } public static com.google.protobuf.Parser<SignMessage> PARSER = new com.google.protobuf.AbstractParser<SignMessage>() { public SignMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new SignMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<SignMessage> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_N_FIELD_NUMBER = 1; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int MESSAGE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString message_; /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } public static final int COIN_NAME_FIELD_NUMBER = 3; private java.lang.Object coinName_; /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { addressN_ = java.util.Collections.emptyList(); message_ = com.google.protobuf.ByteString.EMPTY; coinName_ = "Bitcoin"; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasMessage()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(1, addressN_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(2, message_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(3, getCoinNameBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, message_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getCoinNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code SignMessage} * * <pre> ** * Request: Ask device to sign message * @next MessageSignature * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:SignMessage) com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); message_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); coinName_ = "Bitcoin"; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignMessage_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage build() { com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage result = new com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000001); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } result.message_ = message_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.coinName_ = coinName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage.getDefaultInstance()) return this; if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasMessage()) { setMessage(other.getMessage()); } if (other.hasCoinName()) { bitField0_ |= 0x00000004; coinName_ = other.coinName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasMessage(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.SignMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000001; } } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ public Builder setMessage(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; message_ = value; onChanged(); return this; } /** * <code>required bytes message = 2;</code> * * <pre> * message to be signed * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } private java.lang.Object coinName_ = "Bitcoin"; /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000004); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; coinName_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:SignMessage) } static { defaultInstance = new SignMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:SignMessage) } public interface VerifyMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:VerifyMessage) com.google.protobuf.MessageOrBuilder { /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ boolean hasAddress(); /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ java.lang.String getAddress(); /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ com.google.protobuf.ByteString getAddressBytes(); /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ boolean hasSignature(); /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ com.google.protobuf.ByteString getSignature(); /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ boolean hasMessage(); /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ com.google.protobuf.ByteString getMessage(); } /** * Protobuf type {@code VerifyMessage} * * <pre> ** * Request: Ask device to verify message * @next Success * @next Failure * </pre> */ public static final class VerifyMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:VerifyMessage) VerifyMessageOrBuilder { // Use VerifyMessage.newBuilder() to construct. private VerifyMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private VerifyMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final VerifyMessage defaultInstance; public static VerifyMessage getDefaultInstance() { return defaultInstance; } public VerifyMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private VerifyMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; address_ = bs; break; } case 18: { bitField0_ |= 0x00000002; signature_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; message_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_VerifyMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_VerifyMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.Builder.class); } public static com.google.protobuf.Parser<VerifyMessage> PARSER = new com.google.protobuf.AbstractParser<VerifyMessage>() { public VerifyMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new VerifyMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<VerifyMessage> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_FIELD_NUMBER = 1; private java.lang.Object address_; /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SIGNATURE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString signature_; /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ public boolean hasSignature() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ public com.google.protobuf.ByteString getSignature() { return signature_; } public static final int MESSAGE_FIELD_NUMBER = 3; private com.google.protobuf.ByteString message_; /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } private void initFields() { address_ = ""; signature_ = com.google.protobuf.ByteString.EMPTY; message_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getAddressBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, signature_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, message_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getAddressBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, signature_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, message_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code VerifyMessage} * * <pre> ** * Request: Ask device to verify message * @next Success * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:VerifyMessage) com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_VerifyMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_VerifyMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); address_ = ""; bitField0_ = (bitField0_ & ~0x00000001); signature_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); message_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_VerifyMessage_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage build() { com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage result = new com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.address_ = address_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.signature_ = signature_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.message_ = message_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage.getDefaultInstance()) return this; if (other.hasAddress()) { bitField0_ |= 0x00000001; address_ = other.address_; onChanged(); } if (other.hasSignature()) { setSignature(other.getSignature()); } if (other.hasMessage()) { setMessage(other.getMessage()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.VerifyMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object address_ = ""; /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public Builder clearAddress() { bitField0_ = (bitField0_ & ~0x00000001); address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** * <code>optional string address = 1;</code> * * <pre> * address to verify * </pre> */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ public boolean hasSignature() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ public com.google.protobuf.ByteString getSignature() { return signature_; } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ public Builder setSignature(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; signature_ = value; onChanged(); return this; } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature to verify * </pre> */ public Builder clearSignature() { bitField0_ = (bitField0_ & ~0x00000002); signature_ = getDefaultInstance().getSignature(); onChanged(); return this; } private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ public Builder setMessage(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; message_ = value; onChanged(); return this; } /** * <code>optional bytes message = 3;</code> * * <pre> * message to verify * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000004); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:VerifyMessage) } static { defaultInstance = new VerifyMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:VerifyMessage) } public interface MessageSignatureOrBuilder extends // @@protoc_insertion_point(interface_extends:MessageSignature) com.google.protobuf.MessageOrBuilder { /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ boolean hasAddress(); /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ java.lang.String getAddress(); /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ com.google.protobuf.ByteString getAddressBytes(); /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ boolean hasSignature(); /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ com.google.protobuf.ByteString getSignature(); } /** * Protobuf type {@code MessageSignature} * * <pre> ** * Response: Signed message * @prev SignMessage * </pre> */ public static final class MessageSignature extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:MessageSignature) MessageSignatureOrBuilder { // Use MessageSignature.newBuilder() to construct. private MessageSignature(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private MessageSignature(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final MessageSignature defaultInstance; public static MessageSignature getDefaultInstance() { return defaultInstance; } public MessageSignature getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MessageSignature( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; address_ = bs; break; } case 18: { bitField0_ |= 0x00000002; signature_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_MessageSignature_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_MessageSignature_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.class, com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.Builder.class); } public static com.google.protobuf.Parser<MessageSignature> PARSER = new com.google.protobuf.AbstractParser<MessageSignature>() { public MessageSignature parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MessageSignature(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<MessageSignature> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_FIELD_NUMBER = 1; private java.lang.Object address_; /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SIGNATURE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString signature_; /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ public boolean hasSignature() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ public com.google.protobuf.ByteString getSignature() { return signature_; } private void initFields() { address_ = ""; signature_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getAddressBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, signature_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getAddressBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, signature_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code MessageSignature} * * <pre> ** * Response: Signed message * @prev SignMessage * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:MessageSignature) com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignatureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_MessageSignature_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_MessageSignature_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.class, com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); address_ = ""; bitField0_ = (bitField0_ & ~0x00000001); signature_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_MessageSignature_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature build() { com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature result = new com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.address_ = address_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.signature_ = signature_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature.getDefaultInstance()) return this; if (other.hasAddress()) { bitField0_ |= 0x00000001; address_ = other.address_; onChanged(); } if (other.hasSignature()) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.MessageSignature) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object address_ = ""; /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public Builder clearAddress() { bitField0_ = (bitField0_ & ~0x00000001); address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** * <code>optional string address = 1;</code> * * <pre> * address used to sign the message * </pre> */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ public boolean hasSignature() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ public com.google.protobuf.ByteString getSignature() { return signature_; } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ public Builder setSignature(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; signature_ = value; onChanged(); return this; } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the message * </pre> */ public Builder clearSignature() { bitField0_ = (bitField0_ & ~0x00000002); signature_ = getDefaultInstance().getSignature(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:MessageSignature) } static { defaultInstance = new MessageSignature(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:MessageSignature) } public interface EncryptMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:EncryptMessage) com.google.protobuf.MessageOrBuilder { /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ boolean hasPubkey(); /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ com.google.protobuf.ByteString getPubkey(); /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ boolean hasMessage(); /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ com.google.protobuf.ByteString getMessage(); /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ boolean hasDisplayOnly(); /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ boolean getDisplayOnly(); /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ int getAddressN(int index); /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ boolean hasCoinName(); /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ com.google.protobuf.ByteString getCoinNameBytes(); } /** * Protobuf type {@code EncryptMessage} * * <pre> ** * Request: Ask device to encrypt message * @next EncryptedMessage * @next Failure * </pre> */ public static final class EncryptMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:EncryptMessage) EncryptMessageOrBuilder { // Use EncryptMessage.newBuilder() to construct. private EncryptMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private EncryptMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final EncryptMessage defaultInstance; public static EncryptMessage getDefaultInstance() { return defaultInstance; } public EncryptMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EncryptMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; pubkey_ = input.readBytes(); break; } case 18: { bitField0_ |= 0x00000002; message_ = input.readBytes(); break; } case 24: { bitField0_ |= 0x00000004; displayOnly_ = input.readBool(); break; } case 32: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000008; } addressN_.add(input.readUInt32()); break; } case 34: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000008; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; coinName_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.Builder.class); } public static com.google.protobuf.Parser<EncryptMessage> PARSER = new com.google.protobuf.AbstractParser<EncryptMessage>() { public EncryptMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EncryptMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<EncryptMessage> getParserForType() { return PARSER; } private int bitField0_; public static final int PUBKEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString pubkey_; /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ public boolean hasPubkey() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ public com.google.protobuf.ByteString getPubkey() { return pubkey_; } public static final int MESSAGE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString message_; /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } public static final int DISPLAY_ONLY_FIELD_NUMBER = 3; private boolean displayOnly_; /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ public boolean hasDisplayOnly() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ public boolean getDisplayOnly() { return displayOnly_; } public static final int ADDRESS_N_FIELD_NUMBER = 4; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int COIN_NAME_FIELD_NUMBER = 5; private java.lang.Object coinName_; /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { pubkey_ = com.google.protobuf.ByteString.EMPTY; message_ = com.google.protobuf.ByteString.EMPTY; displayOnly_ = false; addressN_ = java.util.Collections.emptyList(); coinName_ = "Bitcoin"; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, pubkey_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, message_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, displayOnly_); } for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(4, addressN_.get(i)); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(5, getCoinNameBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, pubkey_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, message_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, displayOnly_); } { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, getCoinNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code EncryptMessage} * * <pre> ** * Request: Ask device to encrypt message * @next EncryptedMessage * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:EncryptMessage) com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); pubkey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); message_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); displayOnly_ = false; bitField0_ = (bitField0_ & ~0x00000004); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); coinName_ = "Bitcoin"; bitField0_ = (bitField0_ & ~0x00000010); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptMessage_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage build() { com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage result = new com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.pubkey_ = pubkey_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.message_ = message_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.displayOnly_ = displayOnly_; if (((bitField0_ & 0x00000008) == 0x00000008)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000008); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } result.coinName_ = coinName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage.getDefaultInstance()) return this; if (other.hasPubkey()) { setPubkey(other.getPubkey()); } if (other.hasMessage()) { setMessage(other.getMessage()); } if (other.hasDisplayOnly()) { setDisplayOnly(other.getDisplayOnly()); } if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasCoinName()) { bitField0_ |= 0x00000010; coinName_ = other.coinName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString pubkey_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ public boolean hasPubkey() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ public com.google.protobuf.ByteString getPubkey() { return pubkey_; } /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ public Builder setPubkey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; pubkey_ = value; onChanged(); return this; } /** * <code>optional bytes pubkey = 1;</code> * * <pre> * public key * </pre> */ public Builder clearPubkey() { bitField0_ = (bitField0_ & ~0x00000001); pubkey_ = getDefaultInstance().getPubkey(); onChanged(); return this; } private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ public Builder setMessage(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; message_ = value; onChanged(); return this; } /** * <code>optional bytes message = 2;</code> * * <pre> * message to encrypt * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } private boolean displayOnly_ ; /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ public boolean hasDisplayOnly() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ public boolean getDisplayOnly() { return displayOnly_; } /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ public Builder setDisplayOnly(boolean value) { bitField0_ |= 0x00000004; displayOnly_ = value; onChanged(); return this; } /** * <code>optional bool display_only = 3;</code> * * <pre> * show just on display? (don't send back via wire) * </pre> */ public Builder clearDisplayOnly() { bitField0_ = (bitField0_ & ~0x00000004); displayOnly_ = false; onChanged(); return this; } private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000008; } } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 4;</code> * * <pre> * BIP-32 path to derive the signing key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } private java.lang.Object coinName_ = "Bitcoin"; /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000010); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 5 [default = "Bitcoin"];</code> * * <pre> * coin to use for signing * </pre> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; coinName_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:EncryptMessage) } static { defaultInstance = new EncryptMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:EncryptMessage) } public interface EncryptedMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:EncryptedMessage) com.google.protobuf.MessageOrBuilder { /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ boolean hasNonce(); /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ com.google.protobuf.ByteString getNonce(); /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ boolean hasMessage(); /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ com.google.protobuf.ByteString getMessage(); /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ boolean hasHmac(); /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ com.google.protobuf.ByteString getHmac(); } /** * Protobuf type {@code EncryptedMessage} * * <pre> ** * Response: Encrypted message * @prev EncryptMessage * </pre> */ public static final class EncryptedMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:EncryptedMessage) EncryptedMessageOrBuilder { // Use EncryptedMessage.newBuilder() to construct. private EncryptedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private EncryptedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final EncryptedMessage defaultInstance; public static EncryptedMessage getDefaultInstance() { return defaultInstance; } public EncryptedMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EncryptedMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; nonce_ = input.readBytes(); break; } case 18: { bitField0_ |= 0x00000002; message_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; hmac_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.Builder.class); } public static com.google.protobuf.Parser<EncryptedMessage> PARSER = new com.google.protobuf.AbstractParser<EncryptedMessage>() { public EncryptedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EncryptedMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<EncryptedMessage> getParserForType() { return PARSER; } private int bitField0_; public static final int NONCE_FIELD_NUMBER = 1; private com.google.protobuf.ByteString nonce_; /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ public boolean hasNonce() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ public com.google.protobuf.ByteString getNonce() { return nonce_; } public static final int MESSAGE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString message_; /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } public static final int HMAC_FIELD_NUMBER = 3; private com.google.protobuf.ByteString hmac_; /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ public boolean hasHmac() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ public com.google.protobuf.ByteString getHmac() { return hmac_; } private void initFields() { nonce_ = com.google.protobuf.ByteString.EMPTY; message_ = com.google.protobuf.ByteString.EMPTY; hmac_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, nonce_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, message_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, hmac_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, nonce_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, message_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, hmac_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code EncryptedMessage} * * <pre> ** * Response: Encrypted message * @prev EncryptMessage * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:EncryptedMessage) com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); nonce_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); message_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); hmac_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EncryptedMessage_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage build() { com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage result = new com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.nonce_ = nonce_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.message_ = message_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.hmac_ = hmac_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage.getDefaultInstance()) return this; if (other.hasNonce()) { setNonce(other.getNonce()); } if (other.hasMessage()) { setMessage(other.getMessage()); } if (other.hasHmac()) { setHmac(other.getHmac()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.EncryptedMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString nonce_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ public boolean hasNonce() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ public com.google.protobuf.ByteString getNonce() { return nonce_; } /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ public Builder setNonce(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; nonce_ = value; onChanged(); return this; } /** * <code>optional bytes nonce = 1;</code> * * <pre> * nonce used during encryption * </pre> */ public Builder clearNonce() { bitField0_ = (bitField0_ & ~0x00000001); nonce_ = getDefaultInstance().getNonce(); onChanged(); return this; } private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ public Builder setMessage(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; message_ = value; onChanged(); return this; } /** * <code>optional bytes message = 2;</code> * * <pre> * encrypted message * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000002); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } private com.google.protobuf.ByteString hmac_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ public boolean hasHmac() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ public com.google.protobuf.ByteString getHmac() { return hmac_; } /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ public Builder setHmac(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; hmac_ = value; onChanged(); return this; } /** * <code>optional bytes hmac = 3;</code> * * <pre> * message hmac * </pre> */ public Builder clearHmac() { bitField0_ = (bitField0_ & ~0x00000004); hmac_ = getDefaultInstance().getHmac(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:EncryptedMessage) } static { defaultInstance = new EncryptedMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:EncryptedMessage) } public interface DecryptMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:DecryptMessage) com.google.protobuf.MessageOrBuilder { /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ int getAddressN(int index); /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ boolean hasNonce(); /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ com.google.protobuf.ByteString getNonce(); /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ boolean hasMessage(); /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ com.google.protobuf.ByteString getMessage(); /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ boolean hasHmac(); /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ com.google.protobuf.ByteString getHmac(); } /** * Protobuf type {@code DecryptMessage} * * <pre> ** * Request: Ask device to decrypt message * @next Success * @next Failure * </pre> */ public static final class DecryptMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DecryptMessage) DecryptMessageOrBuilder { // Use DecryptMessage.newBuilder() to construct. private DecryptMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DecryptMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DecryptMessage defaultInstance; public static DecryptMessage getDefaultInstance() { return defaultInstance; } public DecryptMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DecryptMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } addressN_.add(input.readUInt32()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 18: { bitField0_ |= 0x00000001; nonce_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000002; message_ = input.readBytes(); break; } case 34: { bitField0_ |= 0x00000004; hmac_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.Builder.class); } public static com.google.protobuf.Parser<DecryptMessage> PARSER = new com.google.protobuf.AbstractParser<DecryptMessage>() { public DecryptMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DecryptMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DecryptMessage> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_N_FIELD_NUMBER = 1; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int NONCE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString nonce_; /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ public boolean hasNonce() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ public com.google.protobuf.ByteString getNonce() { return nonce_; } public static final int MESSAGE_FIELD_NUMBER = 3; private com.google.protobuf.ByteString message_; /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } public static final int HMAC_FIELD_NUMBER = 4; private com.google.protobuf.ByteString hmac_; /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ public boolean hasHmac() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ public com.google.protobuf.ByteString getHmac() { return hmac_; } private void initFields() { addressN_ = java.util.Collections.emptyList(); nonce_ = com.google.protobuf.ByteString.EMPTY; message_ = com.google.protobuf.ByteString.EMPTY; hmac_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(1, addressN_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(2, nonce_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(3, message_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(4, hmac_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, nonce_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, message_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, hmac_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DecryptMessage} * * <pre> ** * Request: Ask device to decrypt message * @next Success * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DecryptMessage) com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); nonce_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); message_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); hmac_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptMessage_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000001); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } result.nonce_ = nonce_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.message_ = message_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } result.hmac_ = hmac_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage.getDefaultInstance()) return this; if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasNonce()) { setNonce(other.getNonce()); } if (other.hasMessage()) { setMessage(other.getMessage()); } if (other.hasHmac()) { setHmac(other.getHmac()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000001; } } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the decryption key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.ByteString nonce_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ public boolean hasNonce() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ public com.google.protobuf.ByteString getNonce() { return nonce_; } /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ public Builder setNonce(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; nonce_ = value; onChanged(); return this; } /** * <code>optional bytes nonce = 2;</code> * * <pre> * nonce used during encryption * </pre> */ public Builder clearNonce() { bitField0_ = (bitField0_ & ~0x00000002); nonce_ = getDefaultInstance().getNonce(); onChanged(); return this; } private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ public Builder setMessage(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; message_ = value; onChanged(); return this; } /** * <code>optional bytes message = 3;</code> * * <pre> * message to decrypt * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000004); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } private com.google.protobuf.ByteString hmac_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ public boolean hasHmac() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ public com.google.protobuf.ByteString getHmac() { return hmac_; } /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ public Builder setHmac(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; hmac_ = value; onChanged(); return this; } /** * <code>optional bytes hmac = 4;</code> * * <pre> * message hmac * </pre> */ public Builder clearHmac() { bitField0_ = (bitField0_ & ~0x00000008); hmac_ = getDefaultInstance().getHmac(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DecryptMessage) } static { defaultInstance = new DecryptMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DecryptMessage) } public interface DecryptedMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:DecryptedMessage) com.google.protobuf.MessageOrBuilder { /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ boolean hasMessage(); /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ com.google.protobuf.ByteString getMessage(); /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ boolean hasAddress(); /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ java.lang.String getAddress(); /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ com.google.protobuf.ByteString getAddressBytes(); } /** * Protobuf type {@code DecryptedMessage} * * <pre> ** * Response: Decrypted message * @prev DecryptedMessage * </pre> */ public static final class DecryptedMessage extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DecryptedMessage) DecryptedMessageOrBuilder { // Use DecryptedMessage.newBuilder() to construct. private DecryptedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DecryptedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DecryptedMessage defaultInstance; public static DecryptedMessage getDefaultInstance() { return defaultInstance; } public DecryptedMessage getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DecryptedMessage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; message_ = input.readBytes(); break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; address_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.Builder.class); } public static com.google.protobuf.Parser<DecryptedMessage> PARSER = new com.google.protobuf.AbstractParser<DecryptedMessage>() { public DecryptedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DecryptedMessage(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DecryptedMessage> getParserForType() { return PARSER; } private int bitField0_; public static final int MESSAGE_FIELD_NUMBER = 1; private com.google.protobuf.ByteString message_; /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } public static final int ADDRESS_FIELD_NUMBER = 2; private java.lang.Object address_; /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { message_ = com.google.protobuf.ByteString.EMPTY; address_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, message_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getAddressBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, message_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getAddressBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DecryptedMessage} * * <pre> ** * Response: Decrypted message * @prev DecryptedMessage * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DecryptedMessage) com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptedMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptedMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); message_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); address_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DecryptedMessage_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.message_ = message_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.address_ = address_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage.getDefaultInstance()) return this; if (other.hasMessage()) { setMessage(other.getMessage()); } if (other.hasAddress()) { bitField0_ |= 0x00000002; address_ = other.address_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DecryptedMessage) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ public com.google.protobuf.ByteString getMessage() { return message_; } /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ public Builder setMessage(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; message_ = value; onChanged(); return this; } /** * <code>optional bytes message = 1;</code> * * <pre> * decrypted message * </pre> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000001); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } private java.lang.Object address_ = ""; /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; address_ = value; onChanged(); return this; } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public Builder clearAddress() { bitField0_ = (bitField0_ & ~0x00000002); address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** * <code>optional string address = 2;</code> * * <pre> * address used to sign the message (if used) * </pre> */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; address_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DecryptedMessage) } static { defaultInstance = new DecryptedMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DecryptedMessage) } public interface CipherKeyValueOrBuilder extends // @@protoc_insertion_point(interface_extends:CipherKeyValue) com.google.protobuf.MessageOrBuilder { /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressN(int index); /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ boolean hasKey(); /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ java.lang.String getKey(); /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ com.google.protobuf.ByteString getKeyBytes(); /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ boolean hasValue(); /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ com.google.protobuf.ByteString getValue(); /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ boolean hasEncrypt(); /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ boolean getEncrypt(); /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ boolean hasAskOnEncrypt(); /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ boolean getAskOnEncrypt(); /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ boolean hasAskOnDecrypt(); /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ boolean getAskOnDecrypt(); } /** * Protobuf type {@code CipherKeyValue} * * <pre> ** * Request: Ask device to encrypt or decrypt value of given key * @next CipheredKeyValue * @next Failure * </pre> */ public static final class CipherKeyValue extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:CipherKeyValue) CipherKeyValueOrBuilder { // Use CipherKeyValue.newBuilder() to construct. private CipherKeyValue(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private CipherKeyValue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final CipherKeyValue defaultInstance; public static CipherKeyValue getDefaultInstance() { return defaultInstance; } public CipherKeyValue getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CipherKeyValue( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } addressN_.add(input.readUInt32()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; key_ = bs; break; } case 26: { bitField0_ |= 0x00000002; value_ = input.readBytes(); break; } case 32: { bitField0_ |= 0x00000004; encrypt_ = input.readBool(); break; } case 40: { bitField0_ |= 0x00000008; askOnEncrypt_ = input.readBool(); break; } case 48: { bitField0_ |= 0x00000010; askOnDecrypt_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipherKeyValue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipherKeyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.class, com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.Builder.class); } public static com.google.protobuf.Parser<CipherKeyValue> PARSER = new com.google.protobuf.AbstractParser<CipherKeyValue>() { public CipherKeyValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CipherKeyValue(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<CipherKeyValue> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_N_FIELD_NUMBER = 1; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int KEY_FIELD_NUMBER = 2; private java.lang.Object key_; /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public java.lang.String getKey() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; } return s; } } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 3; private com.google.protobuf.ByteString value_; /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ public com.google.protobuf.ByteString getValue() { return value_; } public static final int ENCRYPT_FIELD_NUMBER = 4; private boolean encrypt_; /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ public boolean hasEncrypt() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ public boolean getEncrypt() { return encrypt_; } public static final int ASK_ON_ENCRYPT_FIELD_NUMBER = 5; private boolean askOnEncrypt_; /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ public boolean hasAskOnEncrypt() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ public boolean getAskOnEncrypt() { return askOnEncrypt_; } public static final int ASK_ON_DECRYPT_FIELD_NUMBER = 6; private boolean askOnDecrypt_; /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ public boolean hasAskOnDecrypt() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ public boolean getAskOnDecrypt() { return askOnDecrypt_; } private void initFields() { addressN_ = java.util.Collections.emptyList(); key_ = ""; value_ = com.google.protobuf.ByteString.EMPTY; encrypt_ = false; askOnEncrypt_ = false; askOnDecrypt_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(1, addressN_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(2, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(3, value_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(4, encrypt_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(5, askOnEncrypt_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBool(6, askOnDecrypt_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, value_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, encrypt_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, askOnEncrypt_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, askOnDecrypt_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code CipherKeyValue} * * <pre> ** * Request: Ask device to encrypt or decrypt value of given key * @next CipheredKeyValue * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:CipherKeyValue) com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipherKeyValue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipherKeyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.class, com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); key_ = ""; bitField0_ = (bitField0_ & ~0x00000002); value_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); encrypt_ = false; bitField0_ = (bitField0_ & ~0x00000008); askOnEncrypt_ = false; bitField0_ = (bitField0_ & ~0x00000010); askOnDecrypt_ = false; bitField0_ = (bitField0_ & ~0x00000020); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipherKeyValue_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue build() { com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue result = new com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000001); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } result.key_ = key_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.value_ = value_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } result.encrypt_ = encrypt_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } result.askOnEncrypt_ = askOnEncrypt_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } result.askOnDecrypt_ = askOnDecrypt_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue.getDefaultInstance()) return this; if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasKey()) { bitField0_ |= 0x00000002; key_ = other.key_; onChanged(); } if (other.hasValue()) { setValue(other.getValue()); } if (other.hasEncrypt()) { setEncrypt(other.getEncrypt()); } if (other.hasAskOnEncrypt()) { setAskOnEncrypt(other.getAskOnEncrypt()); } if (other.hasAskOnDecrypt()) { setAskOnDecrypt(other.getAskOnDecrypt()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.CipherKeyValue) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000001; } } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private java.lang.Object key_ = ""; /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public boolean hasKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; key_ = value; onChanged(); return this; } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public Builder clearKey() { bitField0_ = (bitField0_ & ~0x00000002); key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** * <code>optional string key = 2;</code> * * <pre> * key component of key:value * </pre> */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; key_ = value; onChanged(); return this; } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ public boolean hasValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ public com.google.protobuf.ByteString getValue() { return value_; } /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ public Builder setValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; value_ = value; onChanged(); return this; } /** * <code>optional bytes value = 3;</code> * * <pre> * value component of key:value * </pre> */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000004); value_ = getDefaultInstance().getValue(); onChanged(); return this; } private boolean encrypt_ ; /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ public boolean hasEncrypt() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ public boolean getEncrypt() { return encrypt_; } /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ public Builder setEncrypt(boolean value) { bitField0_ |= 0x00000008; encrypt_ = value; onChanged(); return this; } /** * <code>optional bool encrypt = 4;</code> * * <pre> * are we encrypting (True) or decrypting (False)? * </pre> */ public Builder clearEncrypt() { bitField0_ = (bitField0_ & ~0x00000008); encrypt_ = false; onChanged(); return this; } private boolean askOnEncrypt_ ; /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ public boolean hasAskOnEncrypt() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ public boolean getAskOnEncrypt() { return askOnEncrypt_; } /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ public Builder setAskOnEncrypt(boolean value) { bitField0_ |= 0x00000010; askOnEncrypt_ = value; onChanged(); return this; } /** * <code>optional bool ask_on_encrypt = 5;</code> * * <pre> * should we ask on encrypt operation? * </pre> */ public Builder clearAskOnEncrypt() { bitField0_ = (bitField0_ & ~0x00000010); askOnEncrypt_ = false; onChanged(); return this; } private boolean askOnDecrypt_ ; /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ public boolean hasAskOnDecrypt() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ public boolean getAskOnDecrypt() { return askOnDecrypt_; } /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ public Builder setAskOnDecrypt(boolean value) { bitField0_ |= 0x00000020; askOnDecrypt_ = value; onChanged(); return this; } /** * <code>optional bool ask_on_decrypt = 6;</code> * * <pre> * should we ask on decrypt operation? * </pre> */ public Builder clearAskOnDecrypt() { bitField0_ = (bitField0_ & ~0x00000020); askOnDecrypt_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:CipherKeyValue) } static { defaultInstance = new CipherKeyValue(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:CipherKeyValue) } public interface CipheredKeyValueOrBuilder extends // @@protoc_insertion_point(interface_extends:CipheredKeyValue) com.google.protobuf.MessageOrBuilder { /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ boolean hasValue(); /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ com.google.protobuf.ByteString getValue(); } /** * Protobuf type {@code CipheredKeyValue} * * <pre> ** * Response: Return ciphered/deciphered value * @prev CipherKeyValue * </pre> */ public static final class CipheredKeyValue extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:CipheredKeyValue) CipheredKeyValueOrBuilder { // Use CipheredKeyValue.newBuilder() to construct. private CipheredKeyValue(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private CipheredKeyValue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final CipheredKeyValue defaultInstance; public static CipheredKeyValue getDefaultInstance() { return defaultInstance; } public CipheredKeyValue getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CipheredKeyValue( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; value_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipheredKeyValue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipheredKeyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.class, com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.Builder.class); } public static com.google.protobuf.Parser<CipheredKeyValue> PARSER = new com.google.protobuf.AbstractParser<CipheredKeyValue>() { public CipheredKeyValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CipheredKeyValue(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<CipheredKeyValue> getParserForType() { return PARSER; } private int bitField0_; public static final int VALUE_FIELD_NUMBER = 1; private com.google.protobuf.ByteString value_; /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ public com.google.protobuf.ByteString getValue() { return value_; } private void initFields() { value_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, value_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code CipheredKeyValue} * * <pre> ** * Response: Return ciphered/deciphered value * @prev CipherKeyValue * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:CipheredKeyValue) com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipheredKeyValue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipheredKeyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.class, com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); value_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_CipheredKeyValue_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue build() { com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue result = new com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.CipheredKeyValue) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ public com.google.protobuf.ByteString getValue() { return value_; } /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ public Builder setValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; value_ = value; onChanged(); return this; } /** * <code>optional bytes value = 1;</code> * * <pre> * ciphered/deciphered value * </pre> */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000001); value_ = getDefaultInstance().getValue(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:CipheredKeyValue) } static { defaultInstance = new CipheredKeyValue(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:CipheredKeyValue) } public interface EstimateTxSizeOrBuilder extends // @@protoc_insertion_point(interface_extends:EstimateTxSize) com.google.protobuf.MessageOrBuilder { /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ boolean hasOutputsCount(); /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ int getOutputsCount(); /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ boolean hasInputsCount(); /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ int getInputsCount(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ boolean hasCoinName(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ com.google.protobuf.ByteString getCoinNameBytes(); } /** * Protobuf type {@code EstimateTxSize} * * <pre> ** * Request: Estimated size of the transaction * This behaves exactly like SignTx, which means that it can ask using TxRequest * This call is non-blocking (except possible PassphraseRequest to unlock the seed) * @next TxSize * @next Failure * </pre> */ public static final class EstimateTxSize extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:EstimateTxSize) EstimateTxSizeOrBuilder { // Use EstimateTxSize.newBuilder() to construct. private EstimateTxSize(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private EstimateTxSize(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final EstimateTxSize defaultInstance; public static EstimateTxSize getDefaultInstance() { return defaultInstance; } public EstimateTxSize getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EstimateTxSize( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; outputsCount_ = input.readUInt32(); break; } case 16: { bitField0_ |= 0x00000002; inputsCount_ = input.readUInt32(); break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; coinName_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EstimateTxSize_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EstimateTxSize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.Builder.class); } public static com.google.protobuf.Parser<EstimateTxSize> PARSER = new com.google.protobuf.AbstractParser<EstimateTxSize>() { public EstimateTxSize parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EstimateTxSize(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<EstimateTxSize> getParserForType() { return PARSER; } private int bitField0_; public static final int OUTPUTS_COUNT_FIELD_NUMBER = 1; private int outputsCount_; /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public boolean hasOutputsCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public int getOutputsCount() { return outputsCount_; } public static final int INPUTS_COUNT_FIELD_NUMBER = 2; private int inputsCount_; /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public boolean hasInputsCount() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public int getInputsCount() { return inputsCount_; } public static final int COIN_NAME_FIELD_NUMBER = 3; private java.lang.Object coinName_; /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { outputsCount_ = 0; inputsCount_ = 0; coinName_ = "Bitcoin"; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasOutputsCount()) { memoizedIsInitialized = 0; return false; } if (!hasInputsCount()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, outputsCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, inputsCount_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getCoinNameBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, outputsCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, inputsCount_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getCoinNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code EstimateTxSize} * * <pre> ** * Request: Estimated size of the transaction * This behaves exactly like SignTx, which means that it can ask using TxRequest * This call is non-blocking (except possible PassphraseRequest to unlock the seed) * @next TxSize * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:EstimateTxSize) com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSizeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EstimateTxSize_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EstimateTxSize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.class, com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); outputsCount_ = 0; bitField0_ = (bitField0_ & ~0x00000001); inputsCount_ = 0; bitField0_ = (bitField0_ & ~0x00000002); coinName_ = "Bitcoin"; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_EstimateTxSize_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize build() { com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize result = new com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.outputsCount_ = outputsCount_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.inputsCount_ = inputsCount_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.coinName_ = coinName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize.getDefaultInstance()) return this; if (other.hasOutputsCount()) { setOutputsCount(other.getOutputsCount()); } if (other.hasInputsCount()) { setInputsCount(other.getInputsCount()); } if (other.hasCoinName()) { bitField0_ |= 0x00000004; coinName_ = other.coinName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasOutputsCount()) { return false; } return hasInputsCount(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.EstimateTxSize) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int outputsCount_ ; /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public boolean hasOutputsCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public int getOutputsCount() { return outputsCount_; } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public Builder setOutputsCount(int value) { bitField0_ |= 0x00000001; outputsCount_ = value; onChanged(); return this; } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public Builder clearOutputsCount() { bitField0_ = (bitField0_ & ~0x00000001); outputsCount_ = 0; onChanged(); return this; } private int inputsCount_ ; /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public boolean hasInputsCount() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public int getInputsCount() { return inputsCount_; } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public Builder setInputsCount(int value) { bitField0_ |= 0x00000002; inputsCount_ = value; onChanged(); return this; } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public Builder clearInputsCount() { bitField0_ = (bitField0_ & ~0x00000002); inputsCount_ = 0; onChanged(); return this; } private java.lang.Object coinName_ = "Bitcoin"; /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000004); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; coinName_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:EstimateTxSize) } static { defaultInstance = new EstimateTxSize(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:EstimateTxSize) } public interface TxSizeOrBuilder extends // @@protoc_insertion_point(interface_extends:TxSize) com.google.protobuf.MessageOrBuilder { /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ boolean hasTxSize(); /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ int getTxSize(); } /** * Protobuf type {@code TxSize} * * <pre> ** * Response: Estimated size of the transaction * @prev EstimateTxSize * </pre> */ public static final class TxSize extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxSize) TxSizeOrBuilder { // Use TxSize.newBuilder() to construct. private TxSize(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxSize(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxSize defaultInstance; public static TxSize getDefaultInstance() { return defaultInstance; } public TxSize getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxSize( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; txSize_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxSize_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxSize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.class, com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.Builder.class); } public static com.google.protobuf.Parser<TxSize> PARSER = new com.google.protobuf.AbstractParser<TxSize>() { public TxSize parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxSize(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxSize> getParserForType() { return PARSER; } private int bitField0_; public static final int TX_SIZE_FIELD_NUMBER = 1; private int txSize_; /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ public boolean hasTxSize() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ public int getTxSize() { return txSize_; } private void initFields() { txSize_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, txSize_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, txSize_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxSize} * * <pre> ** * Response: Estimated size of the transaction * @prev EstimateTxSize * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxSize) com.satoshilabs.trezor.protobuf.TrezorMessage.TxSizeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxSize_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxSize_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.class, com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); txSize_ = 0; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxSize_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize build() { com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize result = new com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.txSize_ = txSize_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize.getDefaultInstance()) return this; if (other.hasTxSize()) { setTxSize(other.getTxSize()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.TxSize) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int txSize_ ; /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ public boolean hasTxSize() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ public int getTxSize() { return txSize_; } /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ public Builder setTxSize(int value) { bitField0_ |= 0x00000001; txSize_ = value; onChanged(); return this; } /** * <code>optional uint32 tx_size = 1;</code> * * <pre> * estimated size of transaction in bytes * </pre> */ public Builder clearTxSize() { bitField0_ = (bitField0_ & ~0x00000001); txSize_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:TxSize) } static { defaultInstance = new TxSize(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxSize) } public interface SignTxOrBuilder extends // @@protoc_insertion_point(interface_extends:SignTx) com.google.protobuf.MessageOrBuilder { /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ boolean hasOutputsCount(); /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ int getOutputsCount(); /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ boolean hasInputsCount(); /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ int getInputsCount(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ boolean hasCoinName(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ com.google.protobuf.ByteString getCoinNameBytes(); } /** * Protobuf type {@code SignTx} * * <pre> ** * Request: Ask device to sign transaction * @next PassphraseRequest * @next PinMatrixRequest * @next TxRequest * @next Failure * </pre> */ public static final class SignTx extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:SignTx) SignTxOrBuilder { // Use SignTx.newBuilder() to construct. private SignTx(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private SignTx(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final SignTx defaultInstance; public static SignTx getDefaultInstance() { return defaultInstance; } public SignTx getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private SignTx( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; outputsCount_ = input.readUInt32(); break; } case 16: { bitField0_ |= 0x00000002; inputsCount_ = input.readUInt32(); break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; coinName_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignTx_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignTx_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.class, com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.Builder.class); } public static com.google.protobuf.Parser<SignTx> PARSER = new com.google.protobuf.AbstractParser<SignTx>() { public SignTx parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new SignTx(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<SignTx> getParserForType() { return PARSER; } private int bitField0_; public static final int OUTPUTS_COUNT_FIELD_NUMBER = 1; private int outputsCount_; /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public boolean hasOutputsCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public int getOutputsCount() { return outputsCount_; } public static final int INPUTS_COUNT_FIELD_NUMBER = 2; private int inputsCount_; /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public boolean hasInputsCount() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public int getInputsCount() { return inputsCount_; } public static final int COIN_NAME_FIELD_NUMBER = 3; private java.lang.Object coinName_; /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { outputsCount_ = 0; inputsCount_ = 0; coinName_ = "Bitcoin"; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasOutputsCount()) { memoizedIsInitialized = 0; return false; } if (!hasInputsCount()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, outputsCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, inputsCount_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getCoinNameBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, outputsCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, inputsCount_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getCoinNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code SignTx} * * <pre> ** * Request: Ask device to sign transaction * @next PassphraseRequest * @next PinMatrixRequest * @next TxRequest * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:SignTx) com.satoshilabs.trezor.protobuf.TrezorMessage.SignTxOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignTx_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignTx_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.class, com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); outputsCount_ = 0; bitField0_ = (bitField0_ & ~0x00000001); inputsCount_ = 0; bitField0_ = (bitField0_ & ~0x00000002); coinName_ = "Bitcoin"; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SignTx_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx build() { com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx result = new com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.outputsCount_ = outputsCount_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.inputsCount_ = inputsCount_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.coinName_ = coinName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx.getDefaultInstance()) return this; if (other.hasOutputsCount()) { setOutputsCount(other.getOutputsCount()); } if (other.hasInputsCount()) { setInputsCount(other.getInputsCount()); } if (other.hasCoinName()) { bitField0_ |= 0x00000004; coinName_ = other.coinName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasOutputsCount()) { return false; } return hasInputsCount(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.SignTx) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int outputsCount_ ; /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public boolean hasOutputsCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public int getOutputsCount() { return outputsCount_; } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public Builder setOutputsCount(int value) { bitField0_ |= 0x00000001; outputsCount_ = value; onChanged(); return this; } /** * <code>required uint32 outputs_count = 1;</code> * * <pre> * number of transaction outputs * </pre> */ public Builder clearOutputsCount() { bitField0_ = (bitField0_ & ~0x00000001); outputsCount_ = 0; onChanged(); return this; } private int inputsCount_ ; /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public boolean hasInputsCount() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public int getInputsCount() { return inputsCount_; } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public Builder setInputsCount(int value) { bitField0_ |= 0x00000002; inputsCount_ = value; onChanged(); return this; } /** * <code>required uint32 inputs_count = 2;</code> * * <pre> * number of transaction inputs * </pre> */ public Builder clearInputsCount() { bitField0_ = (bitField0_ & ~0x00000002); inputsCount_ = 0; onChanged(); return this; } private java.lang.Object coinName_ = "Bitcoin"; /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000004); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 3 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; coinName_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:SignTx) } static { defaultInstance = new SignTx(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:SignTx) } public interface SimpleSignTxOrBuilder extends // @@protoc_insertion_point(interface_extends:SimpleSignTx) com.google.protobuf.MessageOrBuilder { /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> getInputsList(); /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getInputs(int index); /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ int getInputsCount(); /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsOrBuilderList(); /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder getInputsOrBuilder( int index); /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> getOutputsList(); /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getOutputs(int index); /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ int getOutputsCount(); /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsOrBuilderList(); /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder getOutputsOrBuilder( int index); /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType> getTransactionsList(); /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getTransactions(int index); /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ int getTransactionsCount(); /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> getTransactionsOrBuilderList(); /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder getTransactionsOrBuilder( int index); /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ boolean hasCoinName(); /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ com.google.protobuf.ByteString getCoinNameBytes(); } /** * Protobuf type {@code SimpleSignTx} * * <pre> ** * Request: Simplified transaction signing * This method doesn't support streaming, so there are hardware limits in number of inputs and outputs. * In case of success, the result is returned using TxRequest message. * @next PassphraseRequest * @next PinMatrixRequest * @next TxRequest * @next Failure * </pre> */ public static final class SimpleSignTx extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:SimpleSignTx) SimpleSignTxOrBuilder { // Use SimpleSignTx.newBuilder() to construct. private SimpleSignTx(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private SimpleSignTx(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final SimpleSignTx defaultInstance; public static SimpleSignTx getDefaultInstance() { return defaultInstance; } public SimpleSignTx getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private SimpleSignTx( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { inputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType>(); mutable_bitField0_ |= 0x00000001; } inputs_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.PARSER, extensionRegistry)); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType>(); mutable_bitField0_ |= 0x00000002; } outputs_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.PARSER, extensionRegistry)); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { transactions_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType>(); mutable_bitField0_ |= 0x00000004; } transactions_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.PARSER, extensionRegistry)); break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; coinName_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { inputs_ = java.util.Collections.unmodifiableList(inputs_); } if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = java.util.Collections.unmodifiableList(outputs_); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { transactions_ = java.util.Collections.unmodifiableList(transactions_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SimpleSignTx_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SimpleSignTx_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.class, com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.Builder.class); } public static com.google.protobuf.Parser<SimpleSignTx> PARSER = new com.google.protobuf.AbstractParser<SimpleSignTx>() { public SimpleSignTx parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new SimpleSignTx(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<SimpleSignTx> getParserForType() { return PARSER; } private int bitField0_; public static final int INPUTS_FIELD_NUMBER = 1; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> inputs_; /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> getInputsList() { return inputs_; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsOrBuilderList() { return inputs_; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public int getInputsCount() { return inputs_.size(); } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getInputs(int index) { return inputs_.get(index); } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder getInputsOrBuilder( int index) { return inputs_.get(index); } public static final int OUTPUTS_FIELD_NUMBER = 2; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> outputs_; /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> getOutputsList() { return outputs_; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsOrBuilderList() { return outputs_; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public int getOutputsCount() { return outputs_.size(); } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getOutputs(int index) { return outputs_.get(index); } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder getOutputsOrBuilder( int index) { return outputs_.get(index); } public static final int TRANSACTIONS_FIELD_NUMBER = 3; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType> transactions_; /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType> getTransactionsList() { return transactions_; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> getTransactionsOrBuilderList() { return transactions_; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public int getTransactionsCount() { return transactions_.size(); } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getTransactions(int index) { return transactions_.get(index); } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder getTransactionsOrBuilder( int index) { return transactions_.get(index); } public static final int COIN_NAME_FIELD_NUMBER = 4; private java.lang.Object coinName_; /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { inputs_ = java.util.Collections.emptyList(); outputs_ = java.util.Collections.emptyList(); transactions_ = java.util.Collections.emptyList(); coinName_ = "Bitcoin"; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; for (int i = 0; i < getInputsCount(); i++) { if (!getInputs(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } for (int i = 0; i < getOutputsCount(); i++) { if (!getOutputs(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } for (int i = 0; i < getTransactionsCount(); i++) { if (!getTransactions(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < inputs_.size(); i++) { output.writeMessage(1, inputs_.get(i)); } for (int i = 0; i < outputs_.size(); i++) { output.writeMessage(2, outputs_.get(i)); } for (int i = 0; i < transactions_.size(); i++) { output.writeMessage(3, transactions_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(4, getCoinNameBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; for (int i = 0; i < inputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, inputs_.get(i)); } for (int i = 0; i < outputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, outputs_.get(i)); } for (int i = 0; i < transactions_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, transactions_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getCoinNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code SimpleSignTx} * * <pre> ** * Request: Simplified transaction signing * This method doesn't support streaming, so there are hardware limits in number of inputs and outputs. * In case of success, the result is returned using TxRequest message. * @next PassphraseRequest * @next PinMatrixRequest * @next TxRequest * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:SimpleSignTx) com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTxOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SimpleSignTx_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SimpleSignTx_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.class, com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getInputsFieldBuilder(); getOutputsFieldBuilder(); getTransactionsFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (inputsBuilder_ == null) { inputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { inputsBuilder_.clear(); } if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { outputsBuilder_.clear(); } if (transactionsBuilder_ == null) { transactions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { transactionsBuilder_.clear(); } coinName_ = "Bitcoin"; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_SimpleSignTx_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx build() { com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx result = new com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (inputsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { inputs_ = java.util.Collections.unmodifiableList(inputs_); bitField0_ = (bitField0_ & ~0x00000001); } result.inputs_ = inputs_; } else { result.inputs_ = inputsBuilder_.build(); } if (outputsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = java.util.Collections.unmodifiableList(outputs_); bitField0_ = (bitField0_ & ~0x00000002); } result.outputs_ = outputs_; } else { result.outputs_ = outputsBuilder_.build(); } if (transactionsBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { transactions_ = java.util.Collections.unmodifiableList(transactions_); bitField0_ = (bitField0_ & ~0x00000004); } result.transactions_ = transactions_; } else { result.transactions_ = transactionsBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000001; } result.coinName_ = coinName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx.getDefaultInstance()) return this; if (inputsBuilder_ == null) { if (!other.inputs_.isEmpty()) { if (inputs_.isEmpty()) { inputs_ = other.inputs_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureInputsIsMutable(); inputs_.addAll(other.inputs_); } onChanged(); } } else { if (!other.inputs_.isEmpty()) { if (inputsBuilder_.isEmpty()) { inputsBuilder_.dispose(); inputsBuilder_ = null; inputs_ = other.inputs_; bitField0_ = (bitField0_ & ~0x00000001); inputsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getInputsFieldBuilder() : null; } else { inputsBuilder_.addAllMessages(other.inputs_); } } } if (outputsBuilder_ == null) { if (!other.outputs_.isEmpty()) { if (outputs_.isEmpty()) { outputs_ = other.outputs_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureOutputsIsMutable(); outputs_.addAll(other.outputs_); } onChanged(); } } else { if (!other.outputs_.isEmpty()) { if (outputsBuilder_.isEmpty()) { outputsBuilder_.dispose(); outputsBuilder_ = null; outputs_ = other.outputs_; bitField0_ = (bitField0_ & ~0x00000002); outputsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getOutputsFieldBuilder() : null; } else { outputsBuilder_.addAllMessages(other.outputs_); } } } if (transactionsBuilder_ == null) { if (!other.transactions_.isEmpty()) { if (transactions_.isEmpty()) { transactions_ = other.transactions_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureTransactionsIsMutable(); transactions_.addAll(other.transactions_); } onChanged(); } } else { if (!other.transactions_.isEmpty()) { if (transactionsBuilder_.isEmpty()) { transactionsBuilder_.dispose(); transactionsBuilder_ = null; transactions_ = other.transactions_; bitField0_ = (bitField0_ & ~0x00000004); transactionsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getTransactionsFieldBuilder() : null; } else { transactionsBuilder_.addAllMessages(other.transactions_); } } } if (other.hasCoinName()) { bitField0_ |= 0x00000008; coinName_ = other.coinName_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { for (int i = 0; i < getInputsCount(); i++) { if (!getInputs(i).isInitialized()) { return false; } } for (int i = 0; i < getOutputsCount(); i++) { if (!getOutputs(i).isInitialized()) { return false; } } for (int i = 0; i < getTransactionsCount(); i++) { if (!getTransactions(i).isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.SimpleSignTx) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> inputs_ = java.util.Collections.emptyList(); private void ensureInputsIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { inputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType>(inputs_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxInputType, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> inputsBuilder_; /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> getInputsList() { if (inputsBuilder_ == null) { return java.util.Collections.unmodifiableList(inputs_); } else { return inputsBuilder_.getMessageList(); } } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public int getInputsCount() { if (inputsBuilder_ == null) { return inputs_.size(); } else { return inputsBuilder_.getCount(); } } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getInputs(int index) { if (inputsBuilder_ == null) { return inputs_.get(index); } else { return inputsBuilder_.getMessage(index); } } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder setInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType value) { if (inputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInputsIsMutable(); inputs_.set(index, value); onChanged(); } else { inputsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder setInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder builderForValue) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.set(index, builderForValue.build()); onChanged(); } else { inputsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder addInputs(com.satoshilabs.trezor.protobuf.TrezorType.TxInputType value) { if (inputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInputsIsMutable(); inputs_.add(value); onChanged(); } else { inputsBuilder_.addMessage(value); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder addInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType value) { if (inputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInputsIsMutable(); inputs_.add(index, value); onChanged(); } else { inputsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder addInputs( com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder builderForValue) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.add(builderForValue.build()); onChanged(); } else { inputsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder addInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder builderForValue) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.add(index, builderForValue.build()); onChanged(); } else { inputsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder addAllInputs( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> values) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, inputs_); onChanged(); } else { inputsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder clearInputs() { if (inputsBuilder_ == null) { inputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { inputsBuilder_.clear(); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public Builder removeInputs(int index) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.remove(index); onChanged(); } else { inputsBuilder_.remove(index); } return this; } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder getInputsBuilder( int index) { return getInputsFieldBuilder().getBuilder(index); } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder getInputsOrBuilder( int index) { if (inputsBuilder_ == null) { return inputs_.get(index); } else { return inputsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsOrBuilderList() { if (inputsBuilder_ != null) { return inputsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(inputs_); } } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder addInputsBuilder() { return getInputsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.getDefaultInstance()); } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder addInputsBuilder( int index) { return getInputsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.getDefaultInstance()); } /** * <code>repeated .TxInputType inputs = 1;</code> * * <pre> * transaction inputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder> getInputsBuilderList() { return getInputsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxInputType, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsFieldBuilder() { if (inputsBuilder_ == null) { inputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxInputType, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder>( inputs_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); inputs_ = null; } return inputsBuilder_; } private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> outputs_ = java.util.Collections.emptyList(); private void ensureOutputsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { outputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType>(outputs_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> outputsBuilder_; /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> getOutputsList() { if (outputsBuilder_ == null) { return java.util.Collections.unmodifiableList(outputs_); } else { return outputsBuilder_.getMessageList(); } } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public int getOutputsCount() { if (outputsBuilder_ == null) { return outputs_.size(); } else { return outputsBuilder_.getCount(); } } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getOutputs(int index) { if (outputsBuilder_ == null) { return outputs_.get(index); } else { return outputsBuilder_.getMessage(index); } } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder setOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.set(index, value); onChanged(); } else { outputsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder setOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.set(index, builderForValue.build()); onChanged(); } else { outputsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder addOutputs(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.add(value); onChanged(); } else { outputsBuilder_.addMessage(value); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder addOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.add(index, value); onChanged(); } else { outputsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder addOutputs( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.add(builderForValue.build()); onChanged(); } else { outputsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder addOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.add(index, builderForValue.build()); onChanged(); } else { outputsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder addAllOutputs( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> values) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, outputs_); onChanged(); } else { outputsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder clearOutputs() { if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { outputsBuilder_.clear(); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public Builder removeOutputs(int index) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.remove(index); onChanged(); } else { outputsBuilder_.remove(index); } return this; } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder getOutputsBuilder( int index) { return getOutputsFieldBuilder().getBuilder(index); } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder getOutputsOrBuilder( int index) { if (outputsBuilder_ == null) { return outputs_.get(index); } else { return outputsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsOrBuilderList() { if (outputsBuilder_ != null) { return outputsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(outputs_); } } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder addOutputsBuilder() { return getOutputsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.getDefaultInstance()); } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder addOutputsBuilder( int index) { return getOutputsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.getDefaultInstance()); } /** * <code>repeated .TxOutputType outputs = 2;</code> * * <pre> * transaction outputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder> getOutputsBuilderList() { return getOutputsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsFieldBuilder() { if (outputsBuilder_ == null) { outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder>( outputs_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); outputs_ = null; } return outputsBuilder_; } private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType> transactions_ = java.util.Collections.emptyList(); private void ensureTransactionsIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { transactions_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType>(transactions_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TransactionType, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> transactionsBuilder_; /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType> getTransactionsList() { if (transactionsBuilder_ == null) { return java.util.Collections.unmodifiableList(transactions_); } else { return transactionsBuilder_.getMessageList(); } } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public int getTransactionsCount() { if (transactionsBuilder_ == null) { return transactions_.size(); } else { return transactionsBuilder_.getCount(); } } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getTransactions(int index) { if (transactionsBuilder_ == null) { return transactions_.get(index); } else { return transactionsBuilder_.getMessage(index); } } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder setTransactions( int index, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType value) { if (transactionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTransactionsIsMutable(); transactions_.set(index, value); onChanged(); } else { transactionsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder setTransactions( int index, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder builderForValue) { if (transactionsBuilder_ == null) { ensureTransactionsIsMutable(); transactions_.set(index, builderForValue.build()); onChanged(); } else { transactionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder addTransactions(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType value) { if (transactionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTransactionsIsMutable(); transactions_.add(value); onChanged(); } else { transactionsBuilder_.addMessage(value); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder addTransactions( int index, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType value) { if (transactionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTransactionsIsMutable(); transactions_.add(index, value); onChanged(); } else { transactionsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder addTransactions( com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder builderForValue) { if (transactionsBuilder_ == null) { ensureTransactionsIsMutable(); transactions_.add(builderForValue.build()); onChanged(); } else { transactionsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder addTransactions( int index, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder builderForValue) { if (transactionsBuilder_ == null) { ensureTransactionsIsMutable(); transactions_.add(index, builderForValue.build()); onChanged(); } else { transactionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder addAllTransactions( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.TransactionType> values) { if (transactionsBuilder_ == null) { ensureTransactionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, transactions_); onChanged(); } else { transactionsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder clearTransactions() { if (transactionsBuilder_ == null) { transactions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { transactionsBuilder_.clear(); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public Builder removeTransactions(int index) { if (transactionsBuilder_ == null) { ensureTransactionsIsMutable(); transactions_.remove(index); onChanged(); } else { transactionsBuilder_.remove(index); } return this; } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder getTransactionsBuilder( int index) { return getTransactionsFieldBuilder().getBuilder(index); } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder getTransactionsOrBuilder( int index) { if (transactionsBuilder_ == null) { return transactions_.get(index); } else { return transactionsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> getTransactionsOrBuilderList() { if (transactionsBuilder_ != null) { return transactionsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(transactions_); } } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder addTransactionsBuilder() { return getTransactionsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance()); } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder addTransactionsBuilder( int index) { return getTransactionsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance()); } /** * <code>repeated .TransactionType transactions = 3;</code> * * <pre> * transactions whose outputs are used to build current inputs * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder> getTransactionsBuilderList() { return getTransactionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TransactionType, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> getTransactionsFieldBuilder() { if (transactionsBuilder_ == null) { transactionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TransactionType, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder>( transactions_, ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); transactions_ = null; } return transactionsBuilder_; } private java.lang.Object coinName_ = "Bitcoin"; /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000008); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 4 [default = "Bitcoin"];</code> * * <pre> * coin to use * </pre> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; coinName_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:SimpleSignTx) } static { defaultInstance = new SimpleSignTx(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:SimpleSignTx) } public interface TxRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:TxRequest) com.google.protobuf.MessageOrBuilder { /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ boolean hasRequestType(); /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.RequestType getRequestType(); /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ boolean hasDetails(); /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType getDetails(); /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder getDetailsOrBuilder(); /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ boolean hasSerialized(); /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType getSerialized(); /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder getSerializedOrBuilder(); } /** * Protobuf type {@code TxRequest} * * <pre> ** * Response: Device asks for information for signing transaction or returns the last result * If request_index is set, device awaits TxAck message (with fields filled in according to request_type) * If signature_index is set, 'signature' contains signed input of signature_index's input * @prev SignTx * @prev SimpleSignTx * @prev TxAck * </pre> */ public static final class TxRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxRequest) TxRequestOrBuilder { // Use TxRequest.newBuilder() to construct. private TxRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxRequest defaultInstance; public static TxRequest getDefaultInstance() { return defaultInstance; } public TxRequest getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); com.satoshilabs.trezor.protobuf.TrezorType.RequestType value = com.satoshilabs.trezor.protobuf.TrezorType.RequestType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; requestType_ = value; } break; } case 18: { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder subBuilder = null; if (((bitField0_ & 0x00000002) == 0x00000002)) { subBuilder = details_.toBuilder(); } details_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(details_); details_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000002; break; } case 26: { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = serialized_.toBuilder(); } serialized_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(serialized_); serialized_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.Builder.class); } public static com.google.protobuf.Parser<TxRequest> PARSER = new com.google.protobuf.AbstractParser<TxRequest>() { public TxRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxRequest(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxRequest> getParserForType() { return PARSER; } private int bitField0_; public static final int REQUEST_TYPE_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.RequestType requestType_; /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ public boolean hasRequestType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.RequestType getRequestType() { return requestType_; } public static final int DETAILS_FIELD_NUMBER = 2; private com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType details_; /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public boolean hasDetails() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType getDetails() { return details_; } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder getDetailsOrBuilder() { return details_; } public static final int SERIALIZED_FIELD_NUMBER = 3; private com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType serialized_; /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public boolean hasSerialized() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType getSerialized() { return serialized_; } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder getSerializedOrBuilder() { return serialized_; } private void initFields() { requestType_ = com.satoshilabs.trezor.protobuf.TrezorType.RequestType.TXINPUT; details_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance(); serialized_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, requestType_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, details_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, serialized_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, requestType_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, details_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, serialized_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxRequest} * * <pre> ** * Response: Device asks for information for signing transaction or returns the last result * If request_index is set, device awaits TxAck message (with fields filled in according to request_type) * If signature_index is set, 'signature' contains signed input of signature_index's input * @prev SignTx * @prev SimpleSignTx * @prev TxAck * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxRequest) com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.class, com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getDetailsFieldBuilder(); getSerializedFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); requestType_ = com.satoshilabs.trezor.protobuf.TrezorType.RequestType.TXINPUT; bitField0_ = (bitField0_ & ~0x00000001); if (detailsBuilder_ == null) { details_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance(); } else { detailsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (serializedBuilder_ == null) { serialized_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance(); } else { serializedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxRequest_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest build() { com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest result = new com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.requestType_ = requestType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (detailsBuilder_ == null) { result.details_ = details_; } else { result.details_ = detailsBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } if (serializedBuilder_ == null) { result.serialized_ = serialized_; } else { result.serialized_ = serializedBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest.getDefaultInstance()) return this; if (other.hasRequestType()) { setRequestType(other.getRequestType()); } if (other.hasDetails()) { mergeDetails(other.getDetails()); } if (other.hasSerialized()) { mergeSerialized(other.getSerialized()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.TxRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.RequestType requestType_ = com.satoshilabs.trezor.protobuf.TrezorType.RequestType.TXINPUT; /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ public boolean hasRequestType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.RequestType getRequestType() { return requestType_; } /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ public Builder setRequestType(com.satoshilabs.trezor.protobuf.TrezorType.RequestType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; requestType_ = value; onChanged(); return this; } /** * <code>optional .RequestType request_type = 1;</code> * * <pre> * what should be filled in TxAck message? * </pre> */ public Builder clearRequestType() { bitField0_ = (bitField0_ & ~0x00000001); requestType_ = com.satoshilabs.trezor.protobuf.TrezorType.RequestType.TXINPUT; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType details_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder> detailsBuilder_; /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public boolean hasDetails() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType getDetails() { if (detailsBuilder_ == null) { return details_; } else { return detailsBuilder_.getMessage(); } } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public Builder setDetails(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType value) { if (detailsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } details_ = value; onChanged(); } else { detailsBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public Builder setDetails( com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder builderForValue) { if (detailsBuilder_ == null) { details_ = builderForValue.build(); onChanged(); } else { detailsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public Builder mergeDetails(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType value) { if (detailsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && details_ != com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance()) { details_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.newBuilder(details_).mergeFrom(value).buildPartial(); } else { details_ = value; } onChanged(); } else { detailsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public Builder clearDetails() { if (detailsBuilder_ == null) { details_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance(); onChanged(); } else { detailsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder getDetailsBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDetailsFieldBuilder().getBuilder(); } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder getDetailsOrBuilder() { if (detailsBuilder_ != null) { return detailsBuilder_.getMessageOrBuilder(); } else { return details_; } } /** * <code>optional .TxRequestDetailsType details = 2;</code> * * <pre> * request for tx details * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder> getDetailsFieldBuilder() { if (detailsBuilder_ == null) { detailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder>( getDetails(), getParentForChildren(), isClean()); details_ = null; } return detailsBuilder_; } private com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType serialized_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder> serializedBuilder_; /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public boolean hasSerialized() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType getSerialized() { if (serializedBuilder_ == null) { return serialized_; } else { return serializedBuilder_.getMessage(); } } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public Builder setSerialized(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType value) { if (serializedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } serialized_ = value; onChanged(); } else { serializedBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public Builder setSerialized( com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder builderForValue) { if (serializedBuilder_ == null) { serialized_ = builderForValue.build(); onChanged(); } else { serializedBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public Builder mergeSerialized(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType value) { if (serializedBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && serialized_ != com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance()) { serialized_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.newBuilder(serialized_).mergeFrom(value).buildPartial(); } else { serialized_ = value; } onChanged(); } else { serializedBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public Builder clearSerialized() { if (serializedBuilder_ == null) { serialized_ = com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance(); onChanged(); } else { serializedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder getSerializedBuilder() { bitField0_ |= 0x00000004; onChanged(); return getSerializedFieldBuilder().getBuilder(); } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder getSerializedOrBuilder() { if (serializedBuilder_ != null) { return serializedBuilder_.getMessageOrBuilder(); } else { return serialized_; } } /** * <code>optional .TxRequestSerializedType serialized = 3;</code> * * <pre> * serialized data and request for next * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder> getSerializedFieldBuilder() { if (serializedBuilder_ == null) { serializedBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder>( getSerialized(), getParentForChildren(), isClean()); serialized_ = null; } return serializedBuilder_; } // @@protoc_insertion_point(builder_scope:TxRequest) } static { defaultInstance = new TxRequest(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxRequest) } public interface TxAckOrBuilder extends // @@protoc_insertion_point(interface_extends:TxAck) com.google.protobuf.MessageOrBuilder { /** * <code>optional .TransactionType tx = 1;</code> */ boolean hasTx(); /** * <code>optional .TransactionType tx = 1;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getTx(); /** * <code>optional .TransactionType tx = 1;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder getTxOrBuilder(); } /** * Protobuf type {@code TxAck} * * <pre> ** * Request: Reported transaction data * @prev TxRequest * @next TxRequest * </pre> */ public static final class TxAck extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxAck) TxAckOrBuilder { // Use TxAck.newBuilder() to construct. private TxAck(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxAck defaultInstance; public static TxAck getDefaultInstance() { return defaultInstance; } public TxAck getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxAck( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = tx_.toBuilder(); } tx_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(tx_); tx_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.Builder.class); } public static com.google.protobuf.Parser<TxAck> PARSER = new com.google.protobuf.AbstractParser<TxAck>() { public TxAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxAck(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxAck> getParserForType() { return PARSER; } private int bitField0_; public static final int TX_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.TransactionType tx_; /** * <code>optional .TransactionType tx = 1;</code> */ public boolean hasTx() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .TransactionType tx = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getTx() { return tx_; } /** * <code>optional .TransactionType tx = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder getTxOrBuilder() { return tx_; } private void initFields() { tx_ = com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (hasTx()) { if (!getTx().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, tx_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, tx_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxAck} * * <pre> ** * Request: Reported transaction data * @prev TxRequest * @next TxRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxAck) com.satoshilabs.trezor.protobuf.TrezorMessage.TxAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxAck_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxAck_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.class, com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getTxFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (txBuilder_ == null) { tx_ = com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance(); } else { txBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_TxAck_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck build() { com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck result = new com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (txBuilder_ == null) { result.tx_ = tx_; } else { result.tx_ = txBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck.getDefaultInstance()) return this; if (other.hasTx()) { mergeTx(other.getTx()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (hasTx()) { if (!getTx().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.TxAck) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.TransactionType tx_ = com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TransactionType, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> txBuilder_; /** * <code>optional .TransactionType tx = 1;</code> */ public boolean hasTx() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional .TransactionType tx = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getTx() { if (txBuilder_ == null) { return tx_; } else { return txBuilder_.getMessage(); } } /** * <code>optional .TransactionType tx = 1;</code> */ public Builder setTx(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType value) { if (txBuilder_ == null) { if (value == null) { throw new NullPointerException(); } tx_ = value; onChanged(); } else { txBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * <code>optional .TransactionType tx = 1;</code> */ public Builder setTx( com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder builderForValue) { if (txBuilder_ == null) { tx_ = builderForValue.build(); onChanged(); } else { txBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * <code>optional .TransactionType tx = 1;</code> */ public Builder mergeTx(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType value) { if (txBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && tx_ != com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance()) { tx_ = com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.newBuilder(tx_).mergeFrom(value).buildPartial(); } else { tx_ = value; } onChanged(); } else { txBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * <code>optional .TransactionType tx = 1;</code> */ public Builder clearTx() { if (txBuilder_ == null) { tx_ = com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance(); onChanged(); } else { txBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * <code>optional .TransactionType tx = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder getTxBuilder() { bitField0_ |= 0x00000001; onChanged(); return getTxFieldBuilder().getBuilder(); } /** * <code>optional .TransactionType tx = 1;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder getTxOrBuilder() { if (txBuilder_ != null) { return txBuilder_.getMessageOrBuilder(); } else { return tx_; } } /** * <code>optional .TransactionType tx = 1;</code> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TransactionType, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder> getTxFieldBuilder() { if (txBuilder_ == null) { txBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TransactionType, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder>( getTx(), getParentForChildren(), isClean()); tx_ = null; } return txBuilder_; } // @@protoc_insertion_point(builder_scope:TxAck) } static { defaultInstance = new TxAck(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxAck) } public interface FirmwareEraseOrBuilder extends // @@protoc_insertion_point(interface_extends:FirmwareErase) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code FirmwareErase} * * <pre> ** * Request: Ask device to erase its firmware * @next Success * @next Failure * </pre> */ public static final class FirmwareErase extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:FirmwareErase) FirmwareEraseOrBuilder { // Use FirmwareErase.newBuilder() to construct. private FirmwareErase(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private FirmwareErase(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final FirmwareErase defaultInstance; public static FirmwareErase getDefaultInstance() { return defaultInstance; } public FirmwareErase getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private FirmwareErase( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareErase_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareErase_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.class, com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.Builder.class); } public static com.google.protobuf.Parser<FirmwareErase> PARSER = new com.google.protobuf.AbstractParser<FirmwareErase>() { public FirmwareErase parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new FirmwareErase(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<FirmwareErase> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code FirmwareErase} * * <pre> ** * Request: Ask device to erase its firmware * @next Success * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:FirmwareErase) com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareEraseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareErase_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareErase_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.class, com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareErase_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase build() { com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase result = new com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareErase) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:FirmwareErase) } static { defaultInstance = new FirmwareErase(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:FirmwareErase) } public interface FirmwareUploadOrBuilder extends // @@protoc_insertion_point(interface_extends:FirmwareUpload) com.google.protobuf.MessageOrBuilder { /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ boolean hasPayload(); /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ com.google.protobuf.ByteString getPayload(); } /** * Protobuf type {@code FirmwareUpload} * * <pre> ** * Request: Send firmware in binary form to the device * @next Success * @next Failure * </pre> */ public static final class FirmwareUpload extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:FirmwareUpload) FirmwareUploadOrBuilder { // Use FirmwareUpload.newBuilder() to construct. private FirmwareUpload(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private FirmwareUpload(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final FirmwareUpload defaultInstance; public static FirmwareUpload getDefaultInstance() { return defaultInstance; } public FirmwareUpload getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private FirmwareUpload( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; payload_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareUpload_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareUpload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.class, com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.Builder.class); } public static com.google.protobuf.Parser<FirmwareUpload> PARSER = new com.google.protobuf.AbstractParser<FirmwareUpload>() { public FirmwareUpload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new FirmwareUpload(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<FirmwareUpload> getParserForType() { return PARSER; } private int bitField0_; public static final int PAYLOAD_FIELD_NUMBER = 1; private com.google.protobuf.ByteString payload_; /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ public boolean hasPayload() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ public com.google.protobuf.ByteString getPayload() { return payload_; } private void initFields() { payload_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasPayload()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, payload_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, payload_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code FirmwareUpload} * * <pre> ** * Request: Send firmware in binary form to the device * @next Success * @next Failure * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:FirmwareUpload) com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUploadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareUpload_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareUpload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.class, com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); payload_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_FirmwareUpload_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload build() { com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload result = new com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.payload_ = payload_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload.getDefaultInstance()) return this; if (other.hasPayload()) { setPayload(other.getPayload()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasPayload(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.FirmwareUpload) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ public boolean hasPayload() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ public com.google.protobuf.ByteString getPayload() { return payload_; } /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; payload_ = value; onChanged(); return this; } /** * <code>required bytes payload = 1;</code> * * <pre> * firmware to be loaded into device * </pre> */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000001); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:FirmwareUpload) } static { defaultInstance = new FirmwareUpload(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:FirmwareUpload) } public interface DebugLinkDecisionOrBuilder extends // @@protoc_insertion_point(interface_extends:DebugLinkDecision) com.google.protobuf.MessageOrBuilder { /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ boolean hasYesNo(); /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ boolean getYesNo(); } /** * Protobuf type {@code DebugLinkDecision} * * <pre> ** * Request: "Press" the button on the device * @next Success * </pre> */ public static final class DebugLinkDecision extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DebugLinkDecision) DebugLinkDecisionOrBuilder { // Use DebugLinkDecision.newBuilder() to construct. private DebugLinkDecision(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DebugLinkDecision(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DebugLinkDecision defaultInstance; public static DebugLinkDecision getDefaultInstance() { return defaultInstance; } public DebugLinkDecision getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DebugLinkDecision( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; yesNo_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkDecision_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkDecision_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.Builder.class); } public static com.google.protobuf.Parser<DebugLinkDecision> PARSER = new com.google.protobuf.AbstractParser<DebugLinkDecision>() { public DebugLinkDecision parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DebugLinkDecision(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DebugLinkDecision> getParserForType() { return PARSER; } private int bitField0_; public static final int YES_NO_FIELD_NUMBER = 1; private boolean yesNo_; /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ public boolean hasYesNo() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ public boolean getYesNo() { return yesNo_; } private void initFields() { yesNo_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasYesNo()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBool(1, yesNo_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, yesNo_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DebugLinkDecision} * * <pre> ** * Request: "Press" the button on the device * @next Success * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DebugLinkDecision) com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecisionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkDecision_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkDecision_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); yesNo_ = false; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkDecision_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.yesNo_ = yesNo_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision.getDefaultInstance()) return this; if (other.hasYesNo()) { setYesNo(other.getYesNo()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasYesNo(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkDecision) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private boolean yesNo_ ; /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ public boolean hasYesNo() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ public boolean getYesNo() { return yesNo_; } /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ public Builder setYesNo(boolean value) { bitField0_ |= 0x00000001; yesNo_ = value; onChanged(); return this; } /** * <code>required bool yes_no = 1;</code> * * <pre> * true for "Confirm", false for "Cancel" * </pre> */ public Builder clearYesNo() { bitField0_ = (bitField0_ & ~0x00000001); yesNo_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DebugLinkDecision) } static { defaultInstance = new DebugLinkDecision(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DebugLinkDecision) } public interface DebugLinkGetStateOrBuilder extends // @@protoc_insertion_point(interface_extends:DebugLinkGetState) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code DebugLinkGetState} * * <pre> ** * Request: Computer asks for device state * @next DebugLinkState * </pre> */ public static final class DebugLinkGetState extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DebugLinkGetState) DebugLinkGetStateOrBuilder { // Use DebugLinkGetState.newBuilder() to construct. private DebugLinkGetState(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DebugLinkGetState(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DebugLinkGetState defaultInstance; public static DebugLinkGetState getDefaultInstance() { return defaultInstance; } public DebugLinkGetState getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DebugLinkGetState( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkGetState_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkGetState_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.Builder.class); } public static com.google.protobuf.Parser<DebugLinkGetState> PARSER = new com.google.protobuf.AbstractParser<DebugLinkGetState>() { public DebugLinkGetState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DebugLinkGetState(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DebugLinkGetState> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DebugLinkGetState} * * <pre> ** * Request: Computer asks for device state * @next DebugLinkState * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DebugLinkGetState) com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkGetState_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkGetState_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkGetState_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkGetState) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:DebugLinkGetState) } static { defaultInstance = new DebugLinkGetState(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DebugLinkGetState) } public interface DebugLinkStateOrBuilder extends // @@protoc_insertion_point(interface_extends:DebugLinkState) com.google.protobuf.MessageOrBuilder { /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ boolean hasLayout(); /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ com.google.protobuf.ByteString getLayout(); /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ boolean hasPin(); /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ java.lang.String getPin(); /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ com.google.protobuf.ByteString getPinBytes(); /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ boolean hasMatrix(); /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ java.lang.String getMatrix(); /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ com.google.protobuf.ByteString getMatrixBytes(); /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ boolean hasMnemonic(); /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ java.lang.String getMnemonic(); /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ com.google.protobuf.ByteString getMnemonicBytes(); /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ boolean hasNode(); /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode(); /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder(); /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ boolean hasPassphraseProtection(); /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ boolean getPassphraseProtection(); /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ boolean hasResetWord(); /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ java.lang.String getResetWord(); /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ com.google.protobuf.ByteString getResetWordBytes(); /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ boolean hasResetEntropy(); /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ com.google.protobuf.ByteString getResetEntropy(); /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ boolean hasRecoveryFakeWord(); /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ java.lang.String getRecoveryFakeWord(); /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ com.google.protobuf.ByteString getRecoveryFakeWordBytes(); /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ boolean hasRecoveryWordPos(); /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ int getRecoveryWordPos(); } /** * Protobuf type {@code DebugLinkState} * * <pre> ** * Response: Device current state * @prev DebugLinkGetState * </pre> */ public static final class DebugLinkState extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DebugLinkState) DebugLinkStateOrBuilder { // Use DebugLinkState.newBuilder() to construct. private DebugLinkState(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DebugLinkState(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DebugLinkState defaultInstance; public static DebugLinkState getDefaultInstance() { return defaultInstance; } public DebugLinkState getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DebugLinkState( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; layout_ = input.readBytes(); break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; pin_ = bs; break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; matrix_ = bs; break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; mnemonic_ = bs; break; } case 42: { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder subBuilder = null; if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = node_.toBuilder(); } node_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(node_); node_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000010; break; } case 48: { bitField0_ |= 0x00000020; passphraseProtection_ = input.readBool(); break; } case 58: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000040; resetWord_ = bs; break; } case 66: { bitField0_ |= 0x00000080; resetEntropy_ = input.readBytes(); break; } case 74: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000100; recoveryFakeWord_ = bs; break; } case 80: { bitField0_ |= 0x00000200; recoveryWordPos_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkState_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkState_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.Builder.class); } public static com.google.protobuf.Parser<DebugLinkState> PARSER = new com.google.protobuf.AbstractParser<DebugLinkState>() { public DebugLinkState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DebugLinkState(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DebugLinkState> getParserForType() { return PARSER; } private int bitField0_; public static final int LAYOUT_FIELD_NUMBER = 1; private com.google.protobuf.ByteString layout_; /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ public boolean hasLayout() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ public com.google.protobuf.ByteString getLayout() { return layout_; } public static final int PIN_FIELD_NUMBER = 2; private java.lang.Object pin_; /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public boolean hasPin() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public java.lang.String getPin() { java.lang.Object ref = pin_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pin_ = s; } return s; } } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public com.google.protobuf.ByteString getPinBytes() { java.lang.Object ref = pin_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MATRIX_FIELD_NUMBER = 3; private java.lang.Object matrix_; /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public boolean hasMatrix() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public java.lang.String getMatrix() { java.lang.Object ref = matrix_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { matrix_ = s; } return s; } } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public com.google.protobuf.ByteString getMatrixBytes() { java.lang.Object ref = matrix_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); matrix_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MNEMONIC_FIELD_NUMBER = 4; private java.lang.Object mnemonic_; /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public boolean hasMnemonic() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public java.lang.String getMnemonic() { java.lang.Object ref = mnemonic_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { mnemonic_ = s; } return s; } } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public com.google.protobuf.ByteString getMnemonicBytes() { java.lang.Object ref = mnemonic_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mnemonic_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int NODE_FIELD_NUMBER = 5; private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_; /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { return node_; } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { return node_; } public static final int PASSPHRASE_PROTECTION_FIELD_NUMBER = 6; private boolean passphraseProtection_; /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } public static final int RESET_WORD_FIELD_NUMBER = 7; private java.lang.Object resetWord_; /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public boolean hasResetWord() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public java.lang.String getResetWord() { java.lang.Object ref = resetWord_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { resetWord_ = s; } return s; } } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public com.google.protobuf.ByteString getResetWordBytes() { java.lang.Object ref = resetWord_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resetWord_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESET_ENTROPY_FIELD_NUMBER = 8; private com.google.protobuf.ByteString resetEntropy_; /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ public boolean hasResetEntropy() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ public com.google.protobuf.ByteString getResetEntropy() { return resetEntropy_; } public static final int RECOVERY_FAKE_WORD_FIELD_NUMBER = 9; private java.lang.Object recoveryFakeWord_; /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public boolean hasRecoveryFakeWord() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public java.lang.String getRecoveryFakeWord() { java.lang.Object ref = recoveryFakeWord_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { recoveryFakeWord_ = s; } return s; } } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public com.google.protobuf.ByteString getRecoveryFakeWordBytes() { java.lang.Object ref = recoveryFakeWord_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); recoveryFakeWord_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RECOVERY_WORD_POS_FIELD_NUMBER = 10; private int recoveryWordPos_; /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ public boolean hasRecoveryWordPos() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ public int getRecoveryWordPos() { return recoveryWordPos_; } private void initFields() { layout_ = com.google.protobuf.ByteString.EMPTY; pin_ = ""; matrix_ = ""; mnemonic_ = ""; node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); passphraseProtection_ = false; resetWord_ = ""; resetEntropy_ = com.google.protobuf.ByteString.EMPTY; recoveryFakeWord_ = ""; recoveryWordPos_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (hasNode()) { if (!getNode().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, layout_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getPinBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getMatrixBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getMnemonicBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, node_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBool(6, passphraseProtection_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBytes(7, getResetWordBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeBytes(8, resetEntropy_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeBytes(9, getRecoveryFakeWordBytes()); } if (((bitField0_ & 0x00000200) == 0x00000200)) { output.writeUInt32(10, recoveryWordPos_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, layout_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getPinBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getMatrixBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getMnemonicBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, node_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, passphraseProtection_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(7, getResetWordBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(8, resetEntropy_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(9, getRecoveryFakeWordBytes()); } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(10, recoveryWordPos_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DebugLinkState} * * <pre> ** * Response: Device current state * @prev DebugLinkGetState * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DebugLinkState) com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkState_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkState_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getNodeFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); layout_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); pin_ = ""; bitField0_ = (bitField0_ & ~0x00000002); matrix_ = ""; bitField0_ = (bitField0_ & ~0x00000004); mnemonic_ = ""; bitField0_ = (bitField0_ & ~0x00000008); if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); passphraseProtection_ = false; bitField0_ = (bitField0_ & ~0x00000020); resetWord_ = ""; bitField0_ = (bitField0_ & ~0x00000040); resetEntropy_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000080); recoveryFakeWord_ = ""; bitField0_ = (bitField0_ & ~0x00000100); recoveryWordPos_ = 0; bitField0_ = (bitField0_ & ~0x00000200); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkState_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.layout_ = layout_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.pin_ = pin_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.matrix_ = matrix_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.mnemonic_ = mnemonic_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } if (nodeBuilder_ == null) { result.node_ = node_; } else { result.node_ = nodeBuilder_.build(); } if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.passphraseProtection_ = passphraseProtection_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } result.resetWord_ = resetWord_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } result.resetEntropy_ = resetEntropy_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } result.recoveryFakeWord_ = recoveryFakeWord_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000200; } result.recoveryWordPos_ = recoveryWordPos_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState.getDefaultInstance()) return this; if (other.hasLayout()) { setLayout(other.getLayout()); } if (other.hasPin()) { bitField0_ |= 0x00000002; pin_ = other.pin_; onChanged(); } if (other.hasMatrix()) { bitField0_ |= 0x00000004; matrix_ = other.matrix_; onChanged(); } if (other.hasMnemonic()) { bitField0_ |= 0x00000008; mnemonic_ = other.mnemonic_; onChanged(); } if (other.hasNode()) { mergeNode(other.getNode()); } if (other.hasPassphraseProtection()) { setPassphraseProtection(other.getPassphraseProtection()); } if (other.hasResetWord()) { bitField0_ |= 0x00000040; resetWord_ = other.resetWord_; onChanged(); } if (other.hasResetEntropy()) { setResetEntropy(other.getResetEntropy()); } if (other.hasRecoveryFakeWord()) { bitField0_ |= 0x00000100; recoveryFakeWord_ = other.recoveryFakeWord_; onChanged(); } if (other.hasRecoveryWordPos()) { setRecoveryWordPos(other.getRecoveryWordPos()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (hasNode()) { if (!getNode().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkState) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString layout_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ public boolean hasLayout() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ public com.google.protobuf.ByteString getLayout() { return layout_; } /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ public Builder setLayout(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; layout_ = value; onChanged(); return this; } /** * <code>optional bytes layout = 1;</code> * * <pre> * raw buffer of display * </pre> */ public Builder clearLayout() { bitField0_ = (bitField0_ & ~0x00000001); layout_ = getDefaultInstance().getLayout(); onChanged(); return this; } private java.lang.Object pin_ = ""; /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public boolean hasPin() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public java.lang.String getPin() { java.lang.Object ref = pin_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { pin_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public com.google.protobuf.ByteString getPinBytes() { java.lang.Object ref = pin_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public Builder setPin( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; pin_ = value; onChanged(); return this; } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public Builder clearPin() { bitField0_ = (bitField0_ & ~0x00000002); pin_ = getDefaultInstance().getPin(); onChanged(); return this; } /** * <code>optional string pin = 2;</code> * * <pre> * current PIN, blank if PIN is not set/enabled * </pre> */ public Builder setPinBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; pin_ = value; onChanged(); return this; } private java.lang.Object matrix_ = ""; /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public boolean hasMatrix() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public java.lang.String getMatrix() { java.lang.Object ref = matrix_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { matrix_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public com.google.protobuf.ByteString getMatrixBytes() { java.lang.Object ref = matrix_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); matrix_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public Builder setMatrix( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; matrix_ = value; onChanged(); return this; } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public Builder clearMatrix() { bitField0_ = (bitField0_ & ~0x00000004); matrix_ = getDefaultInstance().getMatrix(); onChanged(); return this; } /** * <code>optional string matrix = 3;</code> * * <pre> * current PIN matrix * </pre> */ public Builder setMatrixBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; matrix_ = value; onChanged(); return this; } private java.lang.Object mnemonic_ = ""; /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public boolean hasMnemonic() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public java.lang.String getMnemonic() { java.lang.Object ref = mnemonic_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { mnemonic_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public com.google.protobuf.ByteString getMnemonicBytes() { java.lang.Object ref = mnemonic_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mnemonic_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public Builder setMnemonic( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; mnemonic_ = value; onChanged(); return this; } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public Builder clearMnemonic() { bitField0_ = (bitField0_ & ~0x00000008); mnemonic_ = getDefaultInstance().getMnemonic(); onChanged(); return this; } /** * <code>optional string mnemonic = 4;</code> * * <pre> * current BIP-39 mnemonic * </pre> */ public Builder setMnemonicBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; mnemonic_ = value; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> nodeBuilder_; /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { if (nodeBuilder_ == null) { return node_; } else { return nodeBuilder_.getMessage(); } } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public Builder setNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } node_ = value; onChanged(); } else { nodeBuilder_.setMessage(value); } bitField0_ |= 0x00000010; return this; } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public Builder setNode( com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); } else { nodeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; return this; } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public Builder mergeNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && node_ != com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance()) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } onChanged(); } else { nodeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public Builder clearNode() { if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); onChanged(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder getNodeBuilder() { bitField0_ |= 0x00000010; onChanged(); return getNodeFieldBuilder().getBuilder(); } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { return node_; } } /** * <code>optional .HDNodeType node = 5;</code> * * <pre> * current BIP-32 node * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { nodeBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder>( getNode(), getParentForChildren(), isClean()); node_ = null; } return nodeBuilder_; } private boolean passphraseProtection_ ; /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean hasPassphraseProtection() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public boolean getPassphraseProtection() { return passphraseProtection_; } /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public Builder setPassphraseProtection(boolean value) { bitField0_ |= 0x00000020; passphraseProtection_ = value; onChanged(); return this; } /** * <code>optional bool passphrase_protection = 6;</code> * * <pre> * is node/mnemonic encrypted using passphrase? * </pre> */ public Builder clearPassphraseProtection() { bitField0_ = (bitField0_ & ~0x00000020); passphraseProtection_ = false; onChanged(); return this; } private java.lang.Object resetWord_ = ""; /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public boolean hasResetWord() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public java.lang.String getResetWord() { java.lang.Object ref = resetWord_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { resetWord_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public com.google.protobuf.ByteString getResetWordBytes() { java.lang.Object ref = resetWord_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resetWord_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public Builder setResetWord( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; resetWord_ = value; onChanged(); return this; } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public Builder clearResetWord() { bitField0_ = (bitField0_ & ~0x00000040); resetWord_ = getDefaultInstance().getResetWord(); onChanged(); return this; } /** * <code>optional string reset_word = 7;</code> * * <pre> * word on device display during ResetDevice workflow * </pre> */ public Builder setResetWordBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; resetWord_ = value; onChanged(); return this; } private com.google.protobuf.ByteString resetEntropy_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ public boolean hasResetEntropy() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ public com.google.protobuf.ByteString getResetEntropy() { return resetEntropy_; } /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ public Builder setResetEntropy(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; resetEntropy_ = value; onChanged(); return this; } /** * <code>optional bytes reset_entropy = 8;</code> * * <pre> * current entropy during ResetDevice workflow * </pre> */ public Builder clearResetEntropy() { bitField0_ = (bitField0_ & ~0x00000080); resetEntropy_ = getDefaultInstance().getResetEntropy(); onChanged(); return this; } private java.lang.Object recoveryFakeWord_ = ""; /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public boolean hasRecoveryFakeWord() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public java.lang.String getRecoveryFakeWord() { java.lang.Object ref = recoveryFakeWord_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { recoveryFakeWord_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public com.google.protobuf.ByteString getRecoveryFakeWordBytes() { java.lang.Object ref = recoveryFakeWord_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); recoveryFakeWord_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public Builder setRecoveryFakeWord( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; recoveryFakeWord_ = value; onChanged(); return this; } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public Builder clearRecoveryFakeWord() { bitField0_ = (bitField0_ & ~0x00000100); recoveryFakeWord_ = getDefaultInstance().getRecoveryFakeWord(); onChanged(); return this; } /** * <code>optional string recovery_fake_word = 9;</code> * * <pre> * (fake) word on display during RecoveryDevice workflow * </pre> */ public Builder setRecoveryFakeWordBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; recoveryFakeWord_ = value; onChanged(); return this; } private int recoveryWordPos_ ; /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ public boolean hasRecoveryWordPos() { return ((bitField0_ & 0x00000200) == 0x00000200); } /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ public int getRecoveryWordPos() { return recoveryWordPos_; } /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ public Builder setRecoveryWordPos(int value) { bitField0_ |= 0x00000200; recoveryWordPos_ = value; onChanged(); return this; } /** * <code>optional uint32 recovery_word_pos = 10;</code> * * <pre> * index of mnemonic word the device is expecting during RecoveryDevice workflow * </pre> */ public Builder clearRecoveryWordPos() { bitField0_ = (bitField0_ & ~0x00000200); recoveryWordPos_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DebugLinkState) } static { defaultInstance = new DebugLinkState(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DebugLinkState) } public interface DebugLinkStopOrBuilder extends // @@protoc_insertion_point(interface_extends:DebugLinkStop) com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code DebugLinkStop} * * <pre> ** * Request: Ask device to restart * </pre> */ public static final class DebugLinkStop extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DebugLinkStop) DebugLinkStopOrBuilder { // Use DebugLinkStop.newBuilder() to construct. private DebugLinkStop(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DebugLinkStop(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DebugLinkStop defaultInstance; public static DebugLinkStop getDefaultInstance() { return defaultInstance; } public DebugLinkStop getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DebugLinkStop( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkStop_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkStop_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.Builder.class); } public static com.google.protobuf.Parser<DebugLinkStop> PARSER = new com.google.protobuf.AbstractParser<DebugLinkStop>() { public DebugLinkStop parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DebugLinkStop(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DebugLinkStop> getParserForType() { return PARSER; } private void initFields() { } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DebugLinkStop} * * <pre> ** * Request: Ask device to restart * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DebugLinkStop) com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStopOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkStop_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkStop_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkStop_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkStop) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } // @@protoc_insertion_point(builder_scope:DebugLinkStop) } static { defaultInstance = new DebugLinkStop(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DebugLinkStop) } public interface DebugLinkLogOrBuilder extends // @@protoc_insertion_point(interface_extends:DebugLinkLog) com.google.protobuf.MessageOrBuilder { /** * <code>optional uint32 level = 1;</code> */ boolean hasLevel(); /** * <code>optional uint32 level = 1;</code> */ int getLevel(); /** * <code>optional string bucket = 2;</code> */ boolean hasBucket(); /** * <code>optional string bucket = 2;</code> */ java.lang.String getBucket(); /** * <code>optional string bucket = 2;</code> */ com.google.protobuf.ByteString getBucketBytes(); /** * <code>optional string text = 3;</code> */ boolean hasText(); /** * <code>optional string text = 3;</code> */ java.lang.String getText(); /** * <code>optional string text = 3;</code> */ com.google.protobuf.ByteString getTextBytes(); } /** * Protobuf type {@code DebugLinkLog} * * <pre> ** * Response: Device wants host to log event * </pre> */ public static final class DebugLinkLog extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:DebugLinkLog) DebugLinkLogOrBuilder { // Use DebugLinkLog.newBuilder() to construct. private DebugLinkLog(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DebugLinkLog(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DebugLinkLog defaultInstance; public static DebugLinkLog getDefaultInstance() { return defaultInstance; } public DebugLinkLog getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DebugLinkLog( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); 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; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; level_ = input.readUInt32(); break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; bucket_ = bs; break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; text_ = bs; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkLog_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkLog_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.Builder.class); } public static com.google.protobuf.Parser<DebugLinkLog> PARSER = new com.google.protobuf.AbstractParser<DebugLinkLog>() { public DebugLinkLog parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DebugLinkLog(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<DebugLinkLog> getParserForType() { return PARSER; } private int bitField0_; public static final int LEVEL_FIELD_NUMBER = 1; private int level_; /** * <code>optional uint32 level = 1;</code> */ public boolean hasLevel() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 level = 1;</code> */ public int getLevel() { return level_; } public static final int BUCKET_FIELD_NUMBER = 2; private java.lang.Object bucket_; /** * <code>optional string bucket = 2;</code> */ public boolean hasBucket() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string bucket = 2;</code> */ public java.lang.String getBucket() { java.lang.Object ref = bucket_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { bucket_ = s; } return s; } } /** * <code>optional string bucket = 2;</code> */ public com.google.protobuf.ByteString getBucketBytes() { java.lang.Object ref = bucket_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); bucket_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TEXT_FIELD_NUMBER = 3; private java.lang.Object text_; /** * <code>optional string text = 3;</code> */ public boolean hasText() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string text = 3;</code> */ public java.lang.String getText() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { text_ = s; } return s; } } /** * <code>optional string text = 3;</code> */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private void initFields() { level_ = 0; bucket_ = ""; text_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, level_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getBucketBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getTextBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, level_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getBucketBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getTextBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code DebugLinkLog} * * <pre> ** * Response: Device wants host to log event * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:DebugLinkLog) com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLogOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkLog_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkLog_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.class, com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); level_ = 0; bitField0_ = (bitField0_ & ~0x00000001); bucket_ = ""; bitField0_ = (bitField0_ & ~0x00000002); text_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.internal_static_DebugLinkLog_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog build() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog buildPartial() { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog result = new com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.level_ = level_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.bucket_ = bucket_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.text_ = text_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog other) { if (other == com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog.getDefaultInstance()) return this; if (other.hasLevel()) { setLevel(other.getLevel()); } if (other.hasBucket()) { bitField0_ |= 0x00000002; bucket_ = other.bucket_; onChanged(); } if (other.hasText()) { bitField0_ |= 0x00000004; text_ = other.text_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorMessage.DebugLinkLog) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int level_ ; /** * <code>optional uint32 level = 1;</code> */ public boolean hasLevel() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 level = 1;</code> */ public int getLevel() { return level_; } /** * <code>optional uint32 level = 1;</code> */ public Builder setLevel(int value) { bitField0_ |= 0x00000001; level_ = value; onChanged(); return this; } /** * <code>optional uint32 level = 1;</code> */ public Builder clearLevel() { bitField0_ = (bitField0_ & ~0x00000001); level_ = 0; onChanged(); return this; } private java.lang.Object bucket_ = ""; /** * <code>optional string bucket = 2;</code> */ public boolean hasBucket() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string bucket = 2;</code> */ public java.lang.String getBucket() { java.lang.Object ref = bucket_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { bucket_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string bucket = 2;</code> */ public com.google.protobuf.ByteString getBucketBytes() { java.lang.Object ref = bucket_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); bucket_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string bucket = 2;</code> */ public Builder setBucket( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; bucket_ = value; onChanged(); return this; } /** * <code>optional string bucket = 2;</code> */ public Builder clearBucket() { bitField0_ = (bitField0_ & ~0x00000002); bucket_ = getDefaultInstance().getBucket(); onChanged(); return this; } /** * <code>optional string bucket = 2;</code> */ public Builder setBucketBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; bucket_ = value; onChanged(); return this; } private java.lang.Object text_ = ""; /** * <code>optional string text = 3;</code> */ public boolean hasText() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional string text = 3;</code> */ public java.lang.String getText() { java.lang.Object ref = text_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { text_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string text = 3;</code> */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string text = 3;</code> */ public Builder setText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; text_ = value; onChanged(); return this; } /** * <code>optional string text = 3;</code> */ public Builder clearText() { bitField0_ = (bitField0_ & ~0x00000004); text_ = getDefaultInstance().getText(); onChanged(); return this; } /** * <code>optional string text = 3;</code> */ public Builder setTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; text_ = value; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:DebugLinkLog) } static { defaultInstance = new DebugLinkLog(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:DebugLinkLog) } private static final com.google.protobuf.Descriptors.Descriptor internal_static_Initialize_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Initialize_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Features_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Features_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ClearSession_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ClearSession_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ApplySettings_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ApplySettings_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ChangePin_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ChangePin_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Ping_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Ping_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Success_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Success_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Failure_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Failure_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ButtonRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ButtonRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ButtonAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ButtonAck_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_PinMatrixRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PinMatrixRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_PinMatrixAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PinMatrixAck_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Cancel_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Cancel_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_PassphraseRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PassphraseRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_PassphraseAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PassphraseAck_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_GetEntropy_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_GetEntropy_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Entropy_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Entropy_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_GetPublicKey_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_GetPublicKey_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_PublicKey_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_PublicKey_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_GetAddress_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_GetAddress_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Address_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Address_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_WipeDevice_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_WipeDevice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_LoadDevice_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_LoadDevice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ResetDevice_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_ResetDevice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_EntropyRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_EntropyRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_EntropyAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_EntropyAck_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_RecoveryDevice_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_RecoveryDevice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_WordRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_WordRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_WordAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_WordAck_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_SignMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SignMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_VerifyMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_VerifyMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_MessageSignature_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_MessageSignature_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_EncryptMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_EncryptMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_EncryptedMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_EncryptedMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DecryptMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DecryptMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DecryptedMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DecryptedMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_CipherKeyValue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_CipherKeyValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_CipheredKeyValue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_CipheredKeyValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_EstimateTxSize_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_EstimateTxSize_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxSize_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxSize_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_SignTx_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SignTx_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_SimpleSignTx_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_SimpleSignTx_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxRequest_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxAck_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_FirmwareErase_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FirmwareErase_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_FirmwareUpload_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_FirmwareUpload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DebugLinkDecision_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DebugLinkDecision_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DebugLinkGetState_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DebugLinkGetState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DebugLinkState_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DebugLinkState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DebugLinkStop_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DebugLinkStop_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_DebugLinkLog_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DebugLinkLog_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\016messages.proto\032\013types.proto\"\014\n\nInitial" + "ize\"\317\002\n\010Features\022\016\n\006vendor\030\001 \001(\t\022\025\n\rmajo" + "r_version\030\002 \001(\r\022\025\n\rminor_version\030\003 \001(\r\022\025" + "\n\rpatch_version\030\004 \001(\r\022\027\n\017bootloader_mode" + "\030\005 \001(\010\022\021\n\tdevice_id\030\006 \001(\t\022\026\n\016pin_protect" + "ion\030\007 \001(\010\022\035\n\025passphrase_protection\030\010 \001(\010" + "\022\020\n\010language\030\t \001(\t\022\r\n\005label\030\n \001(\t\022\030\n\005coi" + "ns\030\013 \003(\0132\t.CoinType\022\023\n\013initialized\030\014 \001(\010" + "\022\020\n\010revision\030\r \001(\014\022\027\n\017bootloader_hash\030\016 " + "\001(\014\022\020\n\010imported\030\017 \001(\010\"\016\n\014ClearSession\"H\n", "\rApplySettings\022\020\n\010language\030\001 \001(\t\022\r\n\005labe" + "l\030\002 \001(\t\022\026\n\016use_passphrase\030\003 \001(\010\"\033\n\tChang" + "ePin\022\016\n\006remove\030\001 \001(\010\"i\n\004Ping\022\017\n\007message\030" + "\001 \001(\t\022\031\n\021button_protection\030\002 \001(\010\022\026\n\016pin_" + "protection\030\003 \001(\010\022\035\n\025passphrase_protectio" + "n\030\004 \001(\010\"\032\n\007Success\022\017\n\007message\030\001 \001(\t\"6\n\007F" + "ailure\022\032\n\004code\030\001 \001(\0162\014.FailureType\022\017\n\007me" + "ssage\030\002 \001(\t\"?\n\rButtonRequest\022 \n\004code\030\001 \001" + "(\0162\022.ButtonRequestType\022\014\n\004data\030\002 \001(\t\"\013\n\t" + "ButtonAck\"7\n\020PinMatrixRequest\022#\n\004type\030\001 ", "\001(\0162\025.PinMatrixRequestType\"\033\n\014PinMatrixA" + "ck\022\013\n\003pin\030\001 \002(\t\"\010\n\006Cancel\"\023\n\021PassphraseR" + "equest\"#\n\rPassphraseAck\022\022\n\npassphrase\030\001 " + "\002(\t\"\032\n\nGetEntropy\022\014\n\004size\030\001 \002(\r\"\032\n\007Entro" + "py\022\017\n\007entropy\030\001 \002(\014\"!\n\014GetPublicKey\022\021\n\ta" + "ddress_n\030\001 \003(\r\"4\n\tPublicKey\022\031\n\004node\030\001 \002(" + "\0132\013.HDNodeType\022\014\n\004xpub\030\002 \001(\t\"~\n\nGetAddre" + "ss\022\021\n\taddress_n\030\001 \003(\r\022\032\n\tcoin_name\030\002 \001(\t" + ":\007Bitcoin\022\024\n\014show_display\030\003 \001(\010\022+\n\010multi" + "sig\030\004 \001(\0132\031.MultisigRedeemScriptType\"\032\n\007", "Address\022\017\n\007address\030\001 \002(\t\"\014\n\nWipeDevice\"\246" + "\001\n\nLoadDevice\022\020\n\010mnemonic\030\001 \001(\t\022\031\n\004node\030" + "\002 \001(\0132\013.HDNodeType\022\013\n\003pin\030\003 \001(\t\022\035\n\025passp" + "hrase_protection\030\004 \001(\010\022\031\n\010language\030\005 \001(\t" + ":\007english\022\r\n\005label\030\006 \001(\t\022\025\n\rskip_checksu" + "m\030\007 \001(\010\"\235\001\n\013ResetDevice\022\026\n\016display_rando" + "m\030\001 \001(\010\022\025\n\010strength\030\002 \001(\r:\003128\022\035\n\025passph" + "rase_protection\030\003 \001(\010\022\026\n\016pin_protection\030" + "\004 \001(\010\022\031\n\010language\030\005 \001(\t:\007english\022\r\n\005labe" + "l\030\006 \001(\t\"\020\n\016EntropyRequest\"\035\n\nEntropyAck\022", "\017\n\007entropy\030\001 \001(\014\"\237\001\n\016RecoveryDevice\022\022\n\nw" + "ord_count\030\001 \001(\r\022\035\n\025passphrase_protection" + "\030\002 \001(\010\022\026\n\016pin_protection\030\003 \001(\010\022\031\n\010langua" + "ge\030\004 \001(\t:\007english\022\r\n\005label\030\005 \001(\t\022\030\n\020enfo" + "rce_wordlist\030\006 \001(\010\"\r\n\013WordRequest\"\027\n\007Wor" + "dAck\022\014\n\004word\030\001 \002(\t\"M\n\013SignMessage\022\021\n\tadd" + "ress_n\030\001 \003(\r\022\017\n\007message\030\002 \002(\014\022\032\n\tcoin_na" + "me\030\003 \001(\t:\007Bitcoin\"D\n\rVerifyMessage\022\017\n\007ad" + "dress\030\001 \001(\t\022\021\n\tsignature\030\002 \001(\014\022\017\n\007messag" + "e\030\003 \001(\014\"6\n\020MessageSignature\022\017\n\007address\030\001", " \001(\t\022\021\n\tsignature\030\002 \001(\014\"v\n\016EncryptMessag" + "e\022\016\n\006pubkey\030\001 \001(\014\022\017\n\007message\030\002 \001(\014\022\024\n\014di" + "splay_only\030\003 \001(\010\022\021\n\taddress_n\030\004 \003(\r\022\032\n\tc" + "oin_name\030\005 \001(\t:\007Bitcoin\"@\n\020EncryptedMess" + "age\022\r\n\005nonce\030\001 \001(\014\022\017\n\007message\030\002 \001(\014\022\014\n\004h" + "mac\030\003 \001(\014\"Q\n\016DecryptMessage\022\021\n\taddress_n" + "\030\001 \003(\r\022\r\n\005nonce\030\002 \001(\014\022\017\n\007message\030\003 \001(\014\022\014" + "\n\004hmac\030\004 \001(\014\"4\n\020DecryptedMessage\022\017\n\007mess" + "age\030\001 \001(\014\022\017\n\007address\030\002 \001(\t\"\200\001\n\016CipherKey" + "Value\022\021\n\taddress_n\030\001 \003(\r\022\013\n\003key\030\002 \001(\t\022\r\n", "\005value\030\003 \001(\014\022\017\n\007encrypt\030\004 \001(\010\022\026\n\016ask_on_" + "encrypt\030\005 \001(\010\022\026\n\016ask_on_decrypt\030\006 \001(\010\"!\n" + "\020CipheredKeyValue\022\r\n\005value\030\001 \001(\014\"Y\n\016Esti" + "mateTxSize\022\025\n\routputs_count\030\001 \002(\r\022\024\n\014inp" + "uts_count\030\002 \002(\r\022\032\n\tcoin_name\030\003 \001(\t:\007Bitc" + "oin\"\031\n\006TxSize\022\017\n\007tx_size\030\001 \001(\r\"Q\n\006SignTx" + "\022\025\n\routputs_count\030\001 \002(\r\022\024\n\014inputs_count\030" + "\002 \002(\r\022\032\n\tcoin_name\030\003 \001(\t:\007Bitcoin\"\220\001\n\014Si" + "mpleSignTx\022\034\n\006inputs\030\001 \003(\0132\014.TxInputType" + "\022\036\n\007outputs\030\002 \003(\0132\r.TxOutputType\022&\n\014tran", "sactions\030\003 \003(\0132\020.TransactionType\022\032\n\tcoin" + "_name\030\004 \001(\t:\007Bitcoin\"\205\001\n\tTxRequest\022\"\n\014re" + "quest_type\030\001 \001(\0162\014.RequestType\022&\n\007detail" + "s\030\002 \001(\0132\025.TxRequestDetailsType\022,\n\nserial" + "ized\030\003 \001(\0132\030.TxRequestSerializedType\"%\n\005" + "TxAck\022\034\n\002tx\030\001 \001(\0132\020.TransactionType\"\017\n\rF" + "irmwareErase\"!\n\016FirmwareUpload\022\017\n\007payloa" + "d\030\001 \002(\014\"#\n\021DebugLinkDecision\022\016\n\006yes_no\030\001" + " \002(\010\"\023\n\021DebugLinkGetState\"\353\001\n\016DebugLinkS" + "tate\022\016\n\006layout\030\001 \001(\014\022\013\n\003pin\030\002 \001(\t\022\016\n\006mat", "rix\030\003 \001(\t\022\020\n\010mnemonic\030\004 \001(\t\022\031\n\004node\030\005 \001(" + "\0132\013.HDNodeType\022\035\n\025passphrase_protection\030" + "\006 \001(\010\022\022\n\nreset_word\030\007 \001(\t\022\025\n\rreset_entro" + "py\030\010 \001(\014\022\032\n\022recovery_fake_word\030\t \001(\t\022\031\n\021" + "recovery_word_pos\030\n \001(\r\"\017\n\rDebugLinkStop" + "\";\n\014DebugLinkLog\022\r\n\005level\030\001 \001(\r\022\016\n\006bucke" + "t\030\002 \001(\t\022\014\n\004text\030\003 \001(\t*\231\016\n\013MessageType\022 \n" + "\026MessageType_Initialize\020\000\032\004\220\265\030\001\022\032\n\020Messa" + "geType_Ping\020\001\032\004\220\265\030\001\022\035\n\023MessageType_Succe" + "ss\020\002\032\004\230\265\030\001\022\035\n\023MessageType_Failure\020\003\032\004\230\265\030", "\001\022\037\n\025MessageType_ChangePin\020\004\032\004\220\265\030\001\022 \n\026Me" + "ssageType_WipeDevice\020\005\032\004\220\265\030\001\022#\n\031MessageT" + "ype_FirmwareErase\020\006\032\004\220\265\030\001\022$\n\032MessageType" + "_FirmwareUpload\020\007\032\004\220\265\030\001\022 \n\026MessageType_G" + "etEntropy\020\t\032\004\220\265\030\001\022\035\n\023MessageType_Entropy" + "\020\n\032\004\230\265\030\001\022\"\n\030MessageType_GetPublicKey\020\013\032\004" + "\220\265\030\001\022\037\n\025MessageType_PublicKey\020\014\032\004\230\265\030\001\022 \n" + "\026MessageType_LoadDevice\020\r\032\004\220\265\030\001\022!\n\027Messa" + "geType_ResetDevice\020\016\032\004\220\265\030\001\022\034\n\022MessageTyp" + "e_SignTx\020\017\032\004\220\265\030\001\022\"\n\030MessageType_SimpleSi", "gnTx\020\020\032\004\220\265\030\001\022\036\n\024MessageType_Features\020\021\032\004" + "\230\265\030\001\022&\n\034MessageType_PinMatrixRequest\020\022\032\004" + "\230\265\030\001\022\"\n\030MessageType_PinMatrixAck\020\023\032\004\220\265\030\001" + "\022\034\n\022MessageType_Cancel\020\024\032\004\220\265\030\001\022\037\n\025Messag" + "eType_TxRequest\020\025\032\004\230\265\030\001\022\033\n\021MessageType_T" + "xAck\020\026\032\004\220\265\030\001\022$\n\032MessageType_CipherKeyVal" + "ue\020\027\032\004\220\265\030\001\022&\n\034MessageType_CipheredKeyVal" + "ue\0200\032\004\230\265\030\001\022\"\n\030MessageType_ClearSession\020\030" + "\032\004\220\265\030\001\022#\n\031MessageType_ApplySettings\020\031\032\004\220" + "\265\030\001\022#\n\031MessageType_ButtonRequest\020\032\032\004\230\265\030\001", "\022\037\n\025MessageType_ButtonAck\020\033\032\004\220\265\030\001\022 \n\026Mes" + "sageType_GetAddress\020\035\032\004\220\265\030\001\022\035\n\023MessageTy" + "pe_Address\020\036\032\004\230\265\030\001\022$\n\032MessageType_Entrop" + "yRequest\020#\032\004\230\265\030\001\022 \n\026MessageType_EntropyA" + "ck\020$\032\004\220\265\030\001\022!\n\027MessageType_SignMessage\020&\032" + "\004\220\265\030\001\022#\n\031MessageType_VerifyMessage\020\'\032\004\220\265" + "\030\001\022&\n\034MessageType_MessageSignature\020(\032\004\230\265" + "\030\001\022$\n\032MessageType_EncryptMessage\0201\032\004\220\265\030\001" + "\022&\n\034MessageType_EncryptedMessage\0202\032\004\230\265\030\001" + "\022$\n\032MessageType_DecryptMessage\0203\032\004\220\265\030\001\022&", "\n\034MessageType_DecryptedMessage\0204\032\004\230\265\030\001\022\'" + "\n\035MessageType_PassphraseRequest\020)\032\004\230\265\030\001\022" + "#\n\031MessageType_PassphraseAck\020*\032\004\220\265\030\001\022$\n\032" + "MessageType_EstimateTxSize\020+\032\004\220\265\030\001\022\034\n\022Me" + "ssageType_TxSize\020,\032\004\230\265\030\001\022$\n\032MessageType_" + "RecoveryDevice\020-\032\004\220\265\030\001\022!\n\027MessageType_Wo" + "rdRequest\020.\032\004\230\265\030\001\022\035\n\023MessageType_WordAck" + "\020/\032\004\220\265\030\001\022\'\n\035MessageType_DebugLinkDecisio" + "n\020d\032\004\240\265\030\001\022\'\n\035MessageType_DebugLinkGetSta" + "te\020e\032\004\240\265\030\001\022$\n\032MessageType_DebugLinkState", "\020f\032\004\250\265\030\001\022#\n\031MessageType_DebugLinkStop\020g\032" + "\004\240\265\030\001\022\"\n\030MessageType_DebugLinkLog\020h\032\004\250\265\030" + "\001B0\n\037com.satoshilabs.trezor.protobufB\rTr" + "ezorMessage" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor(), }, assigner); internal_static_Initialize_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_Initialize_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Initialize_descriptor, new java.lang.String[] { }); internal_static_Features_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_Features_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Features_descriptor, new java.lang.String[] { "Vendor", "MajorVersion", "MinorVersion", "PatchVersion", "BootloaderMode", "DeviceId", "PinProtection", "PassphraseProtection", "Language", "Label", "Coins", "Initialized", "Revision", "BootloaderHash", "Imported", }); internal_static_ClearSession_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_ClearSession_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ClearSession_descriptor, new java.lang.String[] { }); internal_static_ApplySettings_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_ApplySettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ApplySettings_descriptor, new java.lang.String[] { "Language", "Label", "UsePassphrase", }); internal_static_ChangePin_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_ChangePin_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ChangePin_descriptor, new java.lang.String[] { "Remove", }); internal_static_Ping_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_Ping_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Ping_descriptor, new java.lang.String[] { "Message", "ButtonProtection", "PinProtection", "PassphraseProtection", }); internal_static_Success_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_Success_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Success_descriptor, new java.lang.String[] { "Message", }); internal_static_Failure_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_Failure_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Failure_descriptor, new java.lang.String[] { "Code", "Message", }); internal_static_ButtonRequest_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_ButtonRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ButtonRequest_descriptor, new java.lang.String[] { "Code", "Data", }); internal_static_ButtonAck_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_ButtonAck_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ButtonAck_descriptor, new java.lang.String[] { }); internal_static_PinMatrixRequest_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_PinMatrixRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PinMatrixRequest_descriptor, new java.lang.String[] { "Type", }); internal_static_PinMatrixAck_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_PinMatrixAck_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PinMatrixAck_descriptor, new java.lang.String[] { "Pin", }); internal_static_Cancel_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_Cancel_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Cancel_descriptor, new java.lang.String[] { }); internal_static_PassphraseRequest_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_PassphraseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PassphraseRequest_descriptor, new java.lang.String[] { }); internal_static_PassphraseAck_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_PassphraseAck_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PassphraseAck_descriptor, new java.lang.String[] { "Passphrase", }); internal_static_GetEntropy_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_GetEntropy_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_GetEntropy_descriptor, new java.lang.String[] { "Size", }); internal_static_Entropy_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_Entropy_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Entropy_descriptor, new java.lang.String[] { "Entropy", }); internal_static_GetPublicKey_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_GetPublicKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_GetPublicKey_descriptor, new java.lang.String[] { "AddressN", }); internal_static_PublicKey_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_PublicKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_PublicKey_descriptor, new java.lang.String[] { "Node", "Xpub", }); internal_static_GetAddress_descriptor = getDescriptor().getMessageTypes().get(19); internal_static_GetAddress_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_GetAddress_descriptor, new java.lang.String[] { "AddressN", "CoinName", "ShowDisplay", "Multisig", }); internal_static_Address_descriptor = getDescriptor().getMessageTypes().get(20); internal_static_Address_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Address_descriptor, new java.lang.String[] { "Address", }); internal_static_WipeDevice_descriptor = getDescriptor().getMessageTypes().get(21); internal_static_WipeDevice_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_WipeDevice_descriptor, new java.lang.String[] { }); internal_static_LoadDevice_descriptor = getDescriptor().getMessageTypes().get(22); internal_static_LoadDevice_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_LoadDevice_descriptor, new java.lang.String[] { "Mnemonic", "Node", "Pin", "PassphraseProtection", "Language", "Label", "SkipChecksum", }); internal_static_ResetDevice_descriptor = getDescriptor().getMessageTypes().get(23); internal_static_ResetDevice_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ResetDevice_descriptor, new java.lang.String[] { "DisplayRandom", "Strength", "PassphraseProtection", "PinProtection", "Language", "Label", }); internal_static_EntropyRequest_descriptor = getDescriptor().getMessageTypes().get(24); internal_static_EntropyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_EntropyRequest_descriptor, new java.lang.String[] { }); internal_static_EntropyAck_descriptor = getDescriptor().getMessageTypes().get(25); internal_static_EntropyAck_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_EntropyAck_descriptor, new java.lang.String[] { "Entropy", }); internal_static_RecoveryDevice_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_RecoveryDevice_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_RecoveryDevice_descriptor, new java.lang.String[] { "WordCount", "PassphraseProtection", "PinProtection", "Language", "Label", "EnforceWordlist", }); internal_static_WordRequest_descriptor = getDescriptor().getMessageTypes().get(27); internal_static_WordRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_WordRequest_descriptor, new java.lang.String[] { }); internal_static_WordAck_descriptor = getDescriptor().getMessageTypes().get(28); internal_static_WordAck_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_WordAck_descriptor, new java.lang.String[] { "Word", }); internal_static_SignMessage_descriptor = getDescriptor().getMessageTypes().get(29); internal_static_SignMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_SignMessage_descriptor, new java.lang.String[] { "AddressN", "Message", "CoinName", }); internal_static_VerifyMessage_descriptor = getDescriptor().getMessageTypes().get(30); internal_static_VerifyMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_VerifyMessage_descriptor, new java.lang.String[] { "Address", "Signature", "Message", }); internal_static_MessageSignature_descriptor = getDescriptor().getMessageTypes().get(31); internal_static_MessageSignature_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_MessageSignature_descriptor, new java.lang.String[] { "Address", "Signature", }); internal_static_EncryptMessage_descriptor = getDescriptor().getMessageTypes().get(32); internal_static_EncryptMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_EncryptMessage_descriptor, new java.lang.String[] { "Pubkey", "Message", "DisplayOnly", "AddressN", "CoinName", }); internal_static_EncryptedMessage_descriptor = getDescriptor().getMessageTypes().get(33); internal_static_EncryptedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_EncryptedMessage_descriptor, new java.lang.String[] { "Nonce", "Message", "Hmac", }); internal_static_DecryptMessage_descriptor = getDescriptor().getMessageTypes().get(34); internal_static_DecryptMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DecryptMessage_descriptor, new java.lang.String[] { "AddressN", "Nonce", "Message", "Hmac", }); internal_static_DecryptedMessage_descriptor = getDescriptor().getMessageTypes().get(35); internal_static_DecryptedMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DecryptedMessage_descriptor, new java.lang.String[] { "Message", "Address", }); internal_static_CipherKeyValue_descriptor = getDescriptor().getMessageTypes().get(36); internal_static_CipherKeyValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_CipherKeyValue_descriptor, new java.lang.String[] { "AddressN", "Key", "Value", "Encrypt", "AskOnEncrypt", "AskOnDecrypt", }); internal_static_CipheredKeyValue_descriptor = getDescriptor().getMessageTypes().get(37); internal_static_CipheredKeyValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_CipheredKeyValue_descriptor, new java.lang.String[] { "Value", }); internal_static_EstimateTxSize_descriptor = getDescriptor().getMessageTypes().get(38); internal_static_EstimateTxSize_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_EstimateTxSize_descriptor, new java.lang.String[] { "OutputsCount", "InputsCount", "CoinName", }); internal_static_TxSize_descriptor = getDescriptor().getMessageTypes().get(39); internal_static_TxSize_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxSize_descriptor, new java.lang.String[] { "TxSize", }); internal_static_SignTx_descriptor = getDescriptor().getMessageTypes().get(40); internal_static_SignTx_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_SignTx_descriptor, new java.lang.String[] { "OutputsCount", "InputsCount", "CoinName", }); internal_static_SimpleSignTx_descriptor = getDescriptor().getMessageTypes().get(41); internal_static_SimpleSignTx_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_SimpleSignTx_descriptor, new java.lang.String[] { "Inputs", "Outputs", "Transactions", "CoinName", }); internal_static_TxRequest_descriptor = getDescriptor().getMessageTypes().get(42); internal_static_TxRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxRequest_descriptor, new java.lang.String[] { "RequestType", "Details", "Serialized", }); internal_static_TxAck_descriptor = getDescriptor().getMessageTypes().get(43); internal_static_TxAck_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxAck_descriptor, new java.lang.String[] { "Tx", }); internal_static_FirmwareErase_descriptor = getDescriptor().getMessageTypes().get(44); internal_static_FirmwareErase_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_FirmwareErase_descriptor, new java.lang.String[] { }); internal_static_FirmwareUpload_descriptor = getDescriptor().getMessageTypes().get(45); internal_static_FirmwareUpload_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_FirmwareUpload_descriptor, new java.lang.String[] { "Payload", }); internal_static_DebugLinkDecision_descriptor = getDescriptor().getMessageTypes().get(46); internal_static_DebugLinkDecision_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DebugLinkDecision_descriptor, new java.lang.String[] { "YesNo", }); internal_static_DebugLinkGetState_descriptor = getDescriptor().getMessageTypes().get(47); internal_static_DebugLinkGetState_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DebugLinkGetState_descriptor, new java.lang.String[] { }); internal_static_DebugLinkState_descriptor = getDescriptor().getMessageTypes().get(48); internal_static_DebugLinkState_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DebugLinkState_descriptor, new java.lang.String[] { "Layout", "Pin", "Matrix", "Mnemonic", "Node", "PassphraseProtection", "ResetWord", "ResetEntropy", "RecoveryFakeWord", "RecoveryWordPos", }); internal_static_DebugLinkStop_descriptor = getDescriptor().getMessageTypes().get(49); internal_static_DebugLinkStop_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DebugLinkStop_descriptor, new java.lang.String[] { }); internal_static_DebugLinkLog_descriptor = getDescriptor().getMessageTypes().get(50); internal_static_DebugLinkLog_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DebugLinkLog_descriptor, new java.lang.String[] { "Level", "Bucket", "Text", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugOut); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }