internal static ExpressRouteCircuitAuthorization DeserializeExpressRouteCircuitAuthorization(JsonElement element)
        {
            Optional <string> name             = default;
            Optional <string> etag             = default;
            Optional <string> type             = default;
            Optional <string> id               = default;
            Optional <string> authorizationKey = default;
            Optional <AuthorizationUseStatus> authorizationUseStatus = default;
            Optional <ProvisioningState>      provisioningState      = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("etag"))
                {
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("authorizationKey"))
                        {
                            authorizationKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("authorizationUseStatus"))
                        {
                            authorizationUseStatus = new AuthorizationUseStatus(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new ExpressRouteCircuitAuthorization(id.Value, name.Value, etag.Value, type.Value, authorizationKey.Value, Optional.ToNullable(authorizationUseStatus), Optional.ToNullable(provisioningState)));
        }
        internal static ExpressRouteCircuitAuthorization DeserializeExpressRouteCircuitAuthorization(JsonElement element)
        {
            string name             = default;
            string etag             = default;
            string type             = default;
            string id               = default;
            string authorizationKey = default;
            AuthorizationUseStatus?authorizationUseStatus = default;
            ProvisioningState?     provisioningState      = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("etag"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("authorizationKey"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            authorizationKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("authorizationUseStatus"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            authorizationUseStatus = new AuthorizationUseStatus(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new ExpressRouteCircuitAuthorization(id, name, etag, type, authorizationKey, authorizationUseStatus, provisioningState));
        }