internal static ArmDeploymentValidateResult DeserializeArmDeploymentValidateResult(JsonElement element)
        {
            Optional <ResponseError> error = default;
            Optional <ArmDeploymentPropertiesExtended> properties = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("error"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    error = JsonSerializer.Deserialize <ResponseError>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    properties = ArmDeploymentPropertiesExtended.DeserializeArmDeploymentPropertiesExtended(property.Value);
                    continue;
                }
            }
            return(new ArmDeploymentValidateResult(error.Value, properties.Value));
        }
Exemplo n.º 2
0
 internal ArmDeploymentValidateResult(ErrorDetail error, ArmDeploymentPropertiesExtended properties)
 {
     Error      = error;
     Properties = properties;
 }
 internal ArmDeploymentValidateResult(ResponseError error, ArmDeploymentPropertiesExtended properties)
 {
     Error      = error;
     Properties = properties;
 }