|
| 1 | +// Template Source: BaseEntity.java.tt |
| 2 | +// ------------------------------------------------------------------------------ |
| 3 | +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. |
| 4 | +// ------------------------------------------------------------------------------ |
| 5 | + |
| 6 | +package com.microsoft.graph.models.extensions; |
| 7 | +import com.microsoft.graph.serializer.ISerializer; |
| 8 | +import com.microsoft.graph.serializer.IJsonBackedObject; |
| 9 | +import com.microsoft.graph.serializer.AdditionalDataManager; |
| 10 | +import java.util.EnumSet; |
| 11 | +import com.microsoft.graph.models.extensions.Fido2AuthenticationMethod; |
| 12 | +import com.microsoft.graph.models.extensions.AuthenticationMethod; |
| 13 | +import com.microsoft.graph.models.extensions.MicrosoftAuthenticatorAuthenticationMethod; |
| 14 | +import com.microsoft.graph.models.extensions.WindowsHelloForBusinessAuthenticationMethod; |
| 15 | +import com.microsoft.graph.models.extensions.Entity; |
| 16 | +import com.microsoft.graph.requests.extensions.Fido2AuthenticationMethodCollectionPage; |
| 17 | +import com.microsoft.graph.requests.extensions.AuthenticationMethodCollectionPage; |
| 18 | +import com.microsoft.graph.requests.extensions.MicrosoftAuthenticatorAuthenticationMethodCollectionPage; |
| 19 | +import com.microsoft.graph.requests.extensions.WindowsHelloForBusinessAuthenticationMethodCollectionPage; |
| 20 | + |
| 21 | + |
| 22 | +import com.google.gson.JsonObject; |
| 23 | +import com.google.gson.annotations.SerializedName; |
| 24 | +import com.google.gson.annotations.Expose; |
| 25 | + |
| 26 | +// **NOTE** This file was generated by a tool and any changes will be overwritten. |
| 27 | + |
| 28 | +/** |
| 29 | + * The class for the Authentication. |
| 30 | + */ |
| 31 | +public class Authentication extends Entity implements IJsonBackedObject { |
| 32 | + |
| 33 | + |
| 34 | + /** |
| 35 | + * The Fido2Methods. |
| 36 | + * |
| 37 | + */ |
| 38 | + @SerializedName(value = "fido2Methods", alternate = {"Fido2Methods"}) |
| 39 | + @Expose |
| 40 | + public Fido2AuthenticationMethodCollectionPage fido2Methods; |
| 41 | + |
| 42 | + /** |
| 43 | + * The Methods. |
| 44 | + * |
| 45 | + */ |
| 46 | + @SerializedName(value = "methods", alternate = {"Methods"}) |
| 47 | + @Expose |
| 48 | + public AuthenticationMethodCollectionPage methods; |
| 49 | + |
| 50 | + /** |
| 51 | + * The Microsoft Authenticator Methods. |
| 52 | + * |
| 53 | + */ |
| 54 | + @SerializedName(value = "microsoftAuthenticatorMethods", alternate = {"MicrosoftAuthenticatorMethods"}) |
| 55 | + @Expose |
| 56 | + public MicrosoftAuthenticatorAuthenticationMethodCollectionPage microsoftAuthenticatorMethods; |
| 57 | + |
| 58 | + /** |
| 59 | + * The Windows Hello For Business Methods. |
| 60 | + * |
| 61 | + */ |
| 62 | + @SerializedName(value = "windowsHelloForBusinessMethods", alternate = {"WindowsHelloForBusinessMethods"}) |
| 63 | + @Expose |
| 64 | + public WindowsHelloForBusinessAuthenticationMethodCollectionPage windowsHelloForBusinessMethods; |
| 65 | + |
| 66 | + |
| 67 | + /** |
| 68 | + * The raw representation of this class |
| 69 | + */ |
| 70 | + private JsonObject rawObject; |
| 71 | + |
| 72 | + /** |
| 73 | + * The serializer |
| 74 | + */ |
| 75 | + private ISerializer serializer; |
| 76 | + |
| 77 | + /** |
| 78 | + * Gets the raw representation of this class |
| 79 | + * |
| 80 | + * @return the raw representation of this class |
| 81 | + */ |
| 82 | + public JsonObject getRawObject() { |
| 83 | + return rawObject; |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * Gets serializer |
| 88 | + * |
| 89 | + * @return the serializer |
| 90 | + */ |
| 91 | + protected ISerializer getSerializer() { |
| 92 | + return serializer; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Sets the raw JSON object |
| 97 | + * |
| 98 | + * @param serializer the serializer |
| 99 | + * @param json the JSON object to set this object to |
| 100 | + */ |
| 101 | + public void setRawObject(final ISerializer serializer, final JsonObject json) { |
| 102 | + this.serializer = serializer; |
| 103 | + rawObject = json; |
| 104 | + |
| 105 | + |
| 106 | + if (json.has("fido2Methods")) { |
| 107 | + fido2Methods = serializer.deserializeObject(json.get("fido2Methods").toString(), Fido2AuthenticationMethodCollectionPage.class); |
| 108 | + } |
| 109 | + |
| 110 | + if (json.has("methods")) { |
| 111 | + methods = serializer.deserializeObject(json.get("methods").toString(), AuthenticationMethodCollectionPage.class); |
| 112 | + } |
| 113 | + |
| 114 | + if (json.has("microsoftAuthenticatorMethods")) { |
| 115 | + microsoftAuthenticatorMethods = serializer.deserializeObject(json.get("microsoftAuthenticatorMethods").toString(), MicrosoftAuthenticatorAuthenticationMethodCollectionPage.class); |
| 116 | + } |
| 117 | + |
| 118 | + if (json.has("windowsHelloForBusinessMethods")) { |
| 119 | + windowsHelloForBusinessMethods = serializer.deserializeObject(json.get("windowsHelloForBusinessMethods").toString(), WindowsHelloForBusinessAuthenticationMethodCollectionPage.class); |
| 120 | + } |
| 121 | + } |
| 122 | +} |
0 commit comments