internal static EncryptionSettingsElement DeserializeEncryptionSettingsElement(JsonElement element)
        {
            KeyVaultAndSecretReference diskEncryptionKey = default;
            KeyVaultAndKeyReference    keyEncryptionKey  = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("diskEncryptionKey"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    diskEncryptionKey = KeyVaultAndSecretReference.DeserializeKeyVaultAndSecretReference(property.Value);
                    continue;
                }
                if (property.NameEquals("keyEncryptionKey"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    keyEncryptionKey = KeyVaultAndKeyReference.DeserializeKeyVaultAndKeyReference(property.Value);
                    continue;
                }
            }
            return(new EncryptionSettingsElement(diskEncryptionKey, keyEncryptionKey));
        }
        internal static EncryptionSettingsElement DeserializeEncryptionSettingsElement(JsonElement element)
        {
            Optional <KeyVaultAndSecretReference> diskEncryptionKey = default;
            Optional <KeyVaultAndKeyReference>    keyEncryptionKey  = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("diskEncryptionKey"))
                {
                    diskEncryptionKey = KeyVaultAndSecretReference.DeserializeKeyVaultAndSecretReference(property.Value);
                    continue;
                }
                if (property.NameEquals("keyEncryptionKey"))
                {
                    keyEncryptionKey = KeyVaultAndKeyReference.DeserializeKeyVaultAndKeyReference(property.Value);
                    continue;
                }
            }
            return(new EncryptionSettingsElement(diskEncryptionKey.Value, keyEncryptionKey.Value));
        }