internal Facebook(bool?enabled, AppRegistration registration, string graphApiVersion, LoginScopes login)
 {
     Enabled         = enabled;
     Registration    = registration;
     GraphApiVersion = graphApiVersion;
     Login           = login;
 }
Exemplo n.º 2
0
 internal Google(bool?enabled, ClientRegistration registration, LoginScopes login, AllowedAudiencesValidation validation)
 {
     Enabled      = enabled;
     Registration = registration;
     Login        = login;
     Validation   = validation;
 }
Exemplo n.º 3
0
 internal LegacyMicrosoftAccount(bool?enabled, ClientRegistration registration, LoginScopes login, AllowedAudiencesValidation validation)
 {
     Enabled      = enabled;
     Registration = registration;
     Login        = login;
     Validation   = validation;
 }
Exemplo n.º 4
0
        internal static LegacyMicrosoftAccount DeserializeLegacyMicrosoftAccount(JsonElement element)
        {
            Optional <bool> enabled = default;
            Optional <ClientRegistration>         registration = default;
            Optional <LoginScopes>                login        = default;
            Optional <AllowedAudiencesValidation> validation   = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("enabled"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    enabled = property.Value.GetBoolean();
                    continue;
                }
                if (property.NameEquals("registration"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    registration = ClientRegistration.DeserializeClientRegistration(property.Value);
                    continue;
                }
                if (property.NameEquals("login"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    login = LoginScopes.DeserializeLoginScopes(property.Value);
                    continue;
                }
                if (property.NameEquals("validation"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    validation = AllowedAudiencesValidation.DeserializeAllowedAudiencesValidation(property.Value);
                    continue;
                }
            }
            return(new LegacyMicrosoftAccount(Optional.ToNullable(enabled), registration.Value, login.Value, validation.Value));
        }
        internal static Facebook DeserializeFacebook(JsonElement element)
        {
            Optional <bool>            enabled         = default;
            Optional <AppRegistration> registration    = default;
            Optional <string>          graphApiVersion = default;
            Optional <LoginScopes>     login           = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("enabled"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    enabled = property.Value.GetBoolean();
                    continue;
                }
                if (property.NameEquals("registration"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    registration = AppRegistration.DeserializeAppRegistration(property.Value);
                    continue;
                }
                if (property.NameEquals("graphApiVersion"))
                {
                    graphApiVersion = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("login"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    login = LoginScopes.DeserializeLoginScopes(property.Value);
                    continue;
                }
            }
            return(new Facebook(Optional.ToNullable(enabled), registration.Value, graphApiVersion.Value, login.Value));
        }
Exemplo n.º 6
0
        internal static GitHub DeserializeGitHub(JsonElement element)
        {
            Optional <bool> enabled = default;
            Optional <ClientRegistration> registration = default;
            Optional <LoginScopes>        login        = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("enabled"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    enabled = property.Value.GetBoolean();
                    continue;
                }
                if (property.NameEquals("registration"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    registration = ClientRegistration.DeserializeClientRegistration(property.Value);
                    continue;
                }
                if (property.NameEquals("login"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    login = LoginScopes.DeserializeLoginScopes(property.Value);
                    continue;
                }
            }
            return(new GitHub(Optional.ToNullable(enabled), registration.Value, login.Value));
        }
Exemplo n.º 7
0
 internal GitHub(bool?enabled, ClientRegistration registration, LoginScopes login)
 {
     Enabled      = enabled;
     Registration = registration;
     Login        = login;
 }
Exemplo n.º 8
0
 internal Apple(bool?enabled, AppleRegistration registration, LoginScopes login)
 {
     Enabled      = enabled;
     Registration = registration;
     Login        = login;
 }