Esempio n. 1
0
        internal static EncryptionProperty DeserializeEncryptionProperty(JsonElement element)
        {
            EncryptionStatus             status             = default;
            Optional <IdentityForCmk>    identity           = default;
            EncryptionKeyVaultProperties keyVaultProperties = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("status"))
                {
                    status = new EncryptionStatus(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("identity"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    identity = IdentityForCmk.DeserializeIdentityForCmk(property.Value);
                    continue;
                }
                if (property.NameEquals("keyVaultProperties"))
                {
                    keyVaultProperties = EncryptionKeyVaultProperties.DeserializeEncryptionKeyVaultProperties(property.Value);
                    continue;
                }
            }
            return(new EncryptionProperty(status, identity.Value, keyVaultProperties));
        }
Esempio n. 2
0
 internal EncryptionProperty(EncryptionStatus status, IdentityForCmk identity, EncryptionKeyVaultProperties keyVaultProperties)
 {
     Status             = status;
     Identity           = identity;
     KeyVaultProperties = keyVaultProperties;
 }