public Builder clear() { super.clear(); type_ = com.openwallet.core.protos.Protos.Key.Type.ORIGINAL; bitField0_ = (bitField0_ & ~0x00000001); secretBytes_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); if (encryptedDataBuilder_ == null) { encryptedData_ = com.openwallet.core.protos.Protos.EncryptedData.getDefaultInstance(); } else { encryptedDataBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); publicKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); label_ = ""; bitField0_ = (bitField0_ & ~0x00000010); if (deterministicKeyBuilder_ == null) { deterministicKey_ = com.openwallet.core.protos.Protos.DeterministicKey.getDefaultInstance(); } else { deterministicKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); return this; }
/** * <code>optional .com.openwallet.core.protos.EncryptedData encrypted_data = 3;</code> * * <pre> * If the secret data is encrypted, then secret_bytes is missing and this field is set. * </pre> */ public Builder clearEncryptedData() { if (encryptedDataBuilder_ == null) { encryptedData_ = com.openwallet.core.protos.Protos.EncryptedData.getDefaultInstance(); onChanged(); } else { encryptedDataBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /**
/** * <code>optional .com.openwallet.core.protos.EncryptedData encrypted_data = 3;</code> * * <pre> * If the secret data is encrypted, then secret_bytes is missing and this field is set. * </pre> */ public Builder mergeEncryptedData(com.openwallet.core.protos.Protos.EncryptedData value) { if (encryptedDataBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && encryptedData_ != com.openwallet.core.protos.Protos.EncryptedData.getDefaultInstance()) { encryptedData_ = com.openwallet.core.protos.Protos.EncryptedData.newBuilder(encryptedData_).mergeFrom(value).buildPartial(); } else { encryptedData_ = value; } onChanged(); } else { encryptedDataBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /**
public com.openwallet.core.protos.Protos.EncryptedData getDefaultInstanceForType() { return com.openwallet.core.protos.Protos.EncryptedData.getDefaultInstance(); }
/** * <code>required bytes initialisation_vector = 1;</code> * * <pre> * The initialisation vector for the AES encryption (16 bytes) * </pre> */ public Builder clearInitialisationVector() { bitField0_ = (bitField0_ & ~0x00000001); initialisationVector_ = getDefaultInstance().getInitialisationVector(); onChanged(); return this; }
/** * <code>required bytes encrypted_private_key = 2;</code> * * <pre> * The encrypted private key * </pre> */ public Builder clearEncryptedPrivateKey() { bitField0_ = (bitField0_ & ~0x00000002); encryptedPrivateKey_ = getDefaultInstance().getEncryptedPrivateKey(); onChanged(); return this; }
private void initFields() { type_ = com.openwallet.core.protos.Protos.Key.Type.ORIGINAL; secretBytes_ = com.google.protobuf.ByteString.EMPTY; encryptedData_ = com.openwallet.core.protos.Protos.EncryptedData.getDefaultInstance(); publicKey_ = com.google.protobuf.ByteString.EMPTY; label_ = ""; deterministicKey_ = com.openwallet.core.protos.Protos.DeterministicKey.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
public Builder mergeFrom(com.openwallet.core.protos.Protos.EncryptedData other) { if (other == com.openwallet.core.protos.Protos.EncryptedData.getDefaultInstance()) return this; if (other.hasInitialisationVector()) { setInitialisationVector(other.getInitialisationVector()); } if (other.hasEncryptedPrivateKey()) { setEncryptedPrivateKey(other.getEncryptedPrivateKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }