Exemple #1
0
        internal static AzureFirewallRCAction DeserializeAzureFirewallRCAction(JsonElement element)
        {
            Optional <AzureFirewallRCActionType> type = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = new AzureFirewallRCActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new AzureFirewallRCAction(Optional.ToNullable(type)));
        }
        internal static AzureFirewallRCAction DeserializeAzureFirewallRCAction(JsonElement element)
        {
            AzureFirewallRCActionType?type = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    type = new AzureFirewallRCActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new AzureFirewallRCAction(type));
        }