Ejemplo 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));
        }
Ejemplo n.º 2
0
        public EncryptionProperty(EncryptionStatus status, EncryptionKeyVaultProperties keyVaultProperties)
        {
            if (keyVaultProperties == null)
            {
                throw new ArgumentNullException(nameof(keyVaultProperties));
            }

            Status             = status;
            KeyVaultProperties = keyVaultProperties;
        }
Ejemplo n.º 3
0
 internal EncryptionProperty(EncryptionStatus status, IdentityForCmk identity, EncryptionKeyVaultProperties keyVaultProperties)
 {
     Status             = status;
     Identity           = identity;
     KeyVaultProperties = keyVaultProperties;
 }