use of com.microsoft.azure.management.compute.implementation.DiskInner in project cloudbreak by hortonworks.
the class AzureClient method setupDiskEncryptionWithDesIfNeeded.
@VisibleForTesting
void setupDiskEncryptionWithDesIfNeeded(String diskEncryptionSetId, Disk.DefinitionStages.WithCreate withCreate) {
if (!Strings.isNullOrEmpty(diskEncryptionSetId)) {
// This is nasty. The DES setter is not exposed in WithCreate, so have to rely on the direct tweaking of the underlying DiskInner.
Encryption encryption = new Encryption();
encryption.withDiskEncryptionSetId(diskEncryptionSetId);
// WithCreate is actually a DiskImpl instance, but that type is not visible.
DiskInner inner = (DiskInner) ((IndexableRefreshableWrapperImpl) withCreate).inner();
inner.withEncryption(encryption);
}
}
Aggregations