internal Facebook(bool?enabled, AppRegistration registration, string graphApiVersion, LoginScopes login) { Enabled = enabled; Registration = registration; GraphApiVersion = graphApiVersion; Login = login; }
internal Google(bool?enabled, ClientRegistration registration, LoginScopes login, AllowedAudiencesValidation validation) { Enabled = enabled; Registration = registration; Login = login; Validation = validation; }
internal LegacyMicrosoftAccount(bool?enabled, ClientRegistration registration, LoginScopes login, AllowedAudiencesValidation validation) { Enabled = enabled; Registration = registration; Login = login; Validation = validation; }
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)); }
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)); }
internal GitHub(bool?enabled, ClientRegistration registration, LoginScopes login) { Enabled = enabled; Registration = registration; Login = login; }
internal Apple(bool?enabled, AppleRegistration registration, LoginScopes login) { Enabled = enabled; Registration = registration; Login = login; }