/** * <code>optional .com.openwallet.core.protos.DeterministicKey deterministic_key = 6;</code> */ public Builder setDeterministicKey(com.openwallet.core.protos.Protos.DeterministicKey value) { if (deterministicKeyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } deterministicKey_ = value; onChanged(); } else { deterministicKeyBuilder_.setMessage(value); } 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 setEncryptedData(com.openwallet.core.protos.Protos.EncryptedData value) { if (encryptedDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } encryptedData_ = value; onChanged(); } else { encryptedDataBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>required .com.openwallet.core.protos.Key.Type type = 1;</code> */ public Builder setType(com.openwallet.core.protos.Protos.Key.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value; onChanged(); 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 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.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 setEncryptedData( com.openwallet.core.protos.Protos.EncryptedData.Builder builderForValue) { if (encryptedDataBuilder_ == null) { encryptedData_ = builderForValue.build(); onChanged(); } else { encryptedDataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional string label = 5;</code> * * <pre> * User-provided label associated with the key. * </pre> */ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; label_ = value; onChanged(); return this; } /**
/** * <code>optional .com.openwallet.core.protos.DeterministicKey deterministic_key = 6;</code> */ public Builder mergeDeterministicKey(com.openwallet.core.protos.Protos.DeterministicKey value) { if (deterministicKeyBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && deterministicKey_ != com.openwallet.core.protos.Protos.DeterministicKey.getDefaultInstance()) { deterministicKey_ = com.openwallet.core.protos.Protos.DeterministicKey.newBuilder(deterministicKey_).mergeFrom(value).buildPartial(); } else { deterministicKey_ = value; } onChanged(); } else { deterministicKeyBuilder_.mergeFrom(value); } bitField0_ |= 0x00000020; 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 setPublicKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; publicKey_ = value; onChanged(); 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 setSecretBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; secretBytes_ = value; onChanged(); 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.DeterministicKey deterministic_key = 6;</code> */ public Builder setDeterministicKey( com.openwallet.core.protos.Protos.DeterministicKey.Builder builderForValue) { if (deterministicKeyBuilder_ == null) { deterministicKey_ = builderForValue.build(); onChanged(); } else { deterministicKeyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; return this; } /**
/** * <code>optional string label = 5;</code> * * <pre> * User-provided label associated with the key. * </pre> */ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; label_ = value; onChanged(); return this; }
/** * <code>optional .com.openwallet.core.protos.DeterministicKey deterministic_key = 6;</code> */ public Builder clearDeterministicKey() { if (deterministicKeyBuilder_ == null) { deterministicKey_ = com.openwallet.core.protos.Protos.DeterministicKey.getDefaultInstance(); onChanged(); } else { deterministicKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); return this; } /**
/** * <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>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; }
/** * <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; }
/** * <code>required .com.openwallet.core.protos.Key.Type type = 1;</code> */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = com.openwallet.core.protos.Protos.Key.Type.ORIGINAL; onChanged(); 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 com.openwallet.core.protos.Protos.EncryptedData.Builder getEncryptedDataBuilder() { bitField0_ |= 0x00000004; onChanged(); return getEncryptedDataFieldBuilder().getBuilder(); } /**
/** * <code>optional .com.openwallet.core.protos.DeterministicKey deterministic_key = 6;</code> */ public com.openwallet.core.protos.Protos.DeterministicKey.Builder getDeterministicKeyBuilder() { bitField0_ |= 0x00000020; onChanged(); return getDeterministicKeyFieldBuilder().getBuilder(); } /**