@Override @Deprecated public Encryption encryption() { return inner().encryption(); }
@Override @Deprecated public Encryption encryption() { return inner().encryption(); }
/** * 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()); }
/** * Gets the encryption status of various storage services. * * @param inner the storage account * @return the map containing encryption statuses indexed by storage service name */ static Map<StorageService, StorageAccountEncryptionStatus> encryptionStatuses(StorageAccountInner inner) { HashMap<StorageService, StorageAccountEncryptionStatus> statuses = new HashMap<>(); EncryptionServices services = null; if (inner.encryption() != null) { services = inner.encryption().services(); } statuses.put(StorageService.BLOB, new BlobServiceEncryptionStatusImpl(services)); statuses.put(StorageService.FILE, new FileServiceEncryptionStatusImpl(services)); statuses.put(StorageService.TABLE, new TableServiceEncryptionStatusImpl(services)); statuses.put(StorageService.QUEUE, new QueueServiceEncryptionStatusImpl(services)); return statuses; }
/** * Gets the encryption status of various storage services. * * @param inner the storage account * @return the map containing encryption statuses indexed by storage service name */ static Map<StorageService, StorageAccountEncryptionStatus> encryptionStatuses(StorageAccountInner inner) { HashMap<StorageService, StorageAccountEncryptionStatus> statuses = new HashMap<>(); EncryptionServices services = null; if (inner.encryption() != null) { services = inner.encryption().services(); } statuses.put(StorageService.BLOB, new BlobServiceEncryptionStatusImpl(services)); statuses.put(StorageService.FILE, new FileServiceEncryptionStatusImpl(services)); statuses.put(StorageService.TABLE, new TableServiceEncryptionStatusImpl(services)); statuses.put(StorageService.QUEUE, new QueueServiceEncryptionStatusImpl(services)); return statuses; }
} else { if (this.updateParameters.encryption() == null) { if (this.inner.encryption() == null) { if (createIfNotExists) { this.updateParameters.withEncryption(new Encryption()); clonedEncryption.withKeySource(this.inner.encryption().keySource()); if (this.inner.encryption().keyVaultProperties() != null) { clonedEncryption.withKeyVaultProperties(new KeyVaultProperties()); clonedEncryption.keyVaultProperties() .withKeyName(this.inner .encryption() .keyVaultProperties() .keyName()) .withKeyVaultUri(this.inner .encryption() .keyVaultProperties() .keyVaultUri()) .withKeyVersion(this.inner .encryption() .keyVaultProperties() .keyVersion()); if (this.inner.encryption().services() != null) { clonedEncryption.withServices(new EncryptionServices()); if (this.inner.encryption().services().blob() != null) { clonedEncryption.services().withBlob(new EncryptionService()); clonedEncryption.services().blob() .withEnabled(this.inner.encryption().services().blob().enabled());
} else { if (this.updateParameters.encryption() == null) { if (this.inner.encryption() == null) { if (createIfNotExists) { this.updateParameters.withEncryption(new Encryption()); clonedEncryption.withKeySource(this.inner.encryption().keySource()); if (this.inner.encryption().keyVaultProperties() != null) { clonedEncryption.withKeyVaultProperties(new KeyVaultProperties()); clonedEncryption.keyVaultProperties() .withKeyName(this.inner .encryption() .keyVaultProperties() .keyName()) .withKeyVaultUri(this.inner .encryption() .keyVaultProperties() .keyVaultUri()) .withKeyVersion(this.inner .encryption() .keyVaultProperties() .keyVersion()); if (this.inner.encryption().services() != null) { clonedEncryption.withServices(new EncryptionServices()); if (this.inner.encryption().services().blob() != null) { clonedEncryption.services().withBlob(new EncryptionService()); clonedEncryption.services().blob() .withEnabled(this.inner.encryption().services().blob().enabled());