/** * Gets the encryption key source. * * @param inner the storage account * @return the encryption key source type */ static StorageAccountEncryptionKeySource encryptionKeySource(StorageAccountInner inner) { if (inner.encryption() == null || inner.encryption().keySource() == null) { return null; } return StorageAccountEncryptionKeySource.fromString(inner.encryption().keySource().toString()); }
/** * Gets the encryption key source. * * @param inner the storage account * @return the encryption key source type */ static StorageAccountEncryptionKeySource encryptionKeySource(StorageAccountInner inner) { if (inner.encryption() == null || inner.encryption().keySource() == null) { return null; } return StorageAccountEncryptionKeySource.fromString(inner.encryption().keySource().toString()); }
/** * Specifies that storage blob encryption should be enabled. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withBlobEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Enable encryption for blob service // if (encryption.services().blob() == null) { encryption.services().withBlob(new EncryptionService()); } encryption.services().blob().withEnabled(true); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that storage blob encryption should be enabled. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withBlobEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Enable encryption for blob service // if (encryption.services().blob() == null) { encryption.services().withBlob(new EncryptionService()); } encryption.services().blob().withEnabled(true); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that encryption should be disabled for storage file. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withoutFileEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Disable encryption for blob service // if (encryption.services().file() == null) { encryption.services().withFile(new EncryptionService()); } encryption.services().file().withEnabled(false); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that blob encryption should be disabled for storage blob. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withoutBlobEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Disable encryption for blob service // if (encryption.services().blob() == null) { encryption.services().withBlob(new EncryptionService()); } encryption.services().blob().withEnabled(false); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that storage file encryption should be enabled. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withFileEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Enable encryption for file service // if (encryption.services().file() == null) { encryption.services().withFile(new EncryptionService()); } encryption.services().file().withEnabled(true); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that encryption should be disabled for storage file. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withoutFileEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Disable encryption for blob service // if (encryption.services().file() == null) { encryption.services().withFile(new EncryptionService()); } encryption.services().file().withEnabled(false); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that storage file encryption should be enabled. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withFileEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Enable encryption for file service // if (encryption.services().file() == null) { encryption.services().withFile(new EncryptionService()); } encryption.services().file().withEnabled(true); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
/** * Specifies that blob encryption should be disabled for storage blob. * * @return StorageEncryptionHelper */ StorageEncryptionHelper withoutBlobEncryption() { Encryption encryption = getEncryptionConfig(true); if (encryption.services() == null) { encryption.withServices(new EncryptionServices()); } // Disable encryption for blob service // if (encryption.services().blob() == null) { encryption.services().withBlob(new EncryptionService()); } encryption.services().blob().withEnabled(false); if (encryption.keySource() == null) { encryption.withKeySource(KeySource.MICROSOFT_STORAGE); } return this; }
clonedEncryption.withKeySource(this.inner.encryption().keySource()); if (this.inner.encryption().keyVaultProperties() != null) { clonedEncryption.withKeyVaultProperties(new KeyVaultProperties());
clonedEncryption.withKeySource(this.inner.encryption().keySource()); if (this.inner.encryption().keyVaultProperties() != null) { clonedEncryption.withKeyVaultProperties(new KeyVaultProperties());