bitField0_ = (bitField0_ & ~0x00000001); if (seedBuilder_ == null) { seed_ = com.openwallet.core.protos.Protos.Key.getDefaultInstance(); } else { seedBuilder_.clear(); bitField0_ = (bitField0_ & ~0x00000004); if (masterKeyBuilder_ == null) { masterKey_ = com.openwallet.core.protos.Protos.Key.getDefaultInstance(); } else { masterKeyBuilder_.clear();
/** * <code>repeated .com.openwallet.core.protos.Key key = 3;</code> */ public com.openwallet.core.protos.Protos.Key.Builder addKeyBuilder() { return getKeyFieldBuilder().addBuilder( com.openwallet.core.protos.Protos.Key.getDefaultInstance()); } /**
/** * <code>repeated .com.openwallet.core.protos.Key key = 3;</code> */ public com.openwallet.core.protos.Protos.Key.Builder addKeyBuilder( int index) { return getKeyFieldBuilder().addBuilder( index, com.openwallet.core.protos.Protos.Key.getDefaultInstance()); } /**
public Builder mergeFrom(com.openwallet.core.protos.Protos.Key other) { if (other == com.openwallet.core.protos.Protos.Key.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasSecretBytes()) { setSecretBytes(other.getSecretBytes()); } if (other.hasEncryptedData()) { mergeEncryptedData(other.getEncryptedData()); } if (other.hasPublicKey()) { setPublicKey(other.getPublicKey()); } if (other.hasLabel()) { bitField0_ |= 0x00000010; label_ = other.label_; onChanged(); } if (other.hasDeterministicKey()) { mergeDeterministicKey(other.getDeterministicKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>optional .com.openwallet.core.protos.Key seed = 2;</code> */ public Builder mergeSeed(com.openwallet.core.protos.Protos.Key value) { if (seedBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && seed_ != com.openwallet.core.protos.Protos.Key.getDefaultInstance()) { seed_ = com.openwallet.core.protos.Protos.Key.newBuilder(seed_).mergeFrom(value).buildPartial(); } else { seed_ = value; } onChanged(); } else { seedBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>required .com.openwallet.core.protos.Key master_key = 3;</code> */ public Builder mergeMasterKey(com.openwallet.core.protos.Protos.Key value) { if (masterKeyBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && masterKey_ != com.openwallet.core.protos.Protos.Key.getDefaultInstance()) { masterKey_ = com.openwallet.core.protos.Protos.Key.newBuilder(masterKey_).mergeFrom(value).buildPartial(); } else { masterKey_ = value; } onChanged(); } else { masterKeyBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .com.openwallet.core.protos.Key seed = 2;</code> */ public Builder clearSeed() { if (seedBuilder_ == null) { seed_ = com.openwallet.core.protos.Protos.Key.getDefaultInstance(); onChanged(); } else { seedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /**
/** * <code>optional bytes public_key = 4;</code> * * <pre> * The public EC key derived from the private key. We allow both to be stored to avoid mobile clients having to * do lots of slow EC math on startup. For DETERMINISTIC_MNEMONIC entries this is missing. * </pre> */ public Builder clearPublicKey() { bitField0_ = (bitField0_ & ~0x00000008); publicKey_ = getDefaultInstance().getPublicKey(); onChanged(); return this; }
public com.openwallet.core.protos.Protos.Key getDefaultInstanceForType() { return com.openwallet.core.protos.Protos.Key.getDefaultInstance(); }
/** * <code>optional string label = 5;</code> * * <pre> * User-provided label associated with the key. * </pre> */ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000010); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /**
/** * <code>required .com.openwallet.core.protos.Key master_key = 3;</code> */ public Builder clearMasterKey() { if (masterKeyBuilder_ == null) { masterKey_ = com.openwallet.core.protos.Protos.Key.getDefaultInstance(); onChanged(); } else { masterKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; } /**
/** * <code>optional bytes secret_bytes = 2;</code> * * <pre> * Either the private EC key bytes (without any ASN.1 wrapping), or the deterministic root seed. * If the secret is encrypted, or this is a "watching entry" then this is missing. * </pre> */ public Builder clearSecretBytes() { bitField0_ = (bitField0_ & ~0x00000002); secretBytes_ = getDefaultInstance().getSecretBytes(); onChanged(); return this; }
private void initFields() { version_ = 1; seed_ = com.openwallet.core.protos.Protos.Key.getDefaultInstance(); seedPasswordProtected_ = false; masterKey_ = com.openwallet.core.protos.Protos.Key.getDefaultInstance(); encryptionType_ = com.openwallet.core.protos.Protos.Wallet.EncryptionType.UNENCRYPTED; encryptionParameters_ = com.openwallet.core.protos.Protos.ScryptParameters.getDefaultInstance(); pockets_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1;