Class AuthorizationProviderOAuth2GrantTypes
java.lang.Object
com.azure.resourcemanager.apimanagement.models.AuthorizationProviderOAuth2GrantTypes
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AuthorizationProviderOAuth2GrantTypes>
public final class AuthorizationProviderOAuth2GrantTypes
extends Object
implements com.azure.json.JsonSerializable<AuthorizationProviderOAuth2GrantTypes>
Authorization Provider oauth2 grant types settings.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AuthorizationProviderOAuth2GrantTypes class. -
Method Summary
Modifier and TypeMethodDescriptionGet the authorizationCode property: OAuth2 authorization code grant parameters.Get the clientCredentials property: OAuth2 client credential grant parameters.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AuthorizationProviderOAuth2GrantTypes from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAuthorizationCode(Map<String, String> authorizationCode) Set the authorizationCode property: OAuth2 authorization code grant parameters.withClientCredentials(Map<String, String> clientCredentials) Set the clientCredentials property: OAuth2 client credential grant parameters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AuthorizationProviderOAuth2GrantTypes
public AuthorizationProviderOAuth2GrantTypes()Creates an instance of AuthorizationProviderOAuth2GrantTypes class.
-
-
Method Details
-
authorizationCode
Get the authorizationCode property: OAuth2 authorization code grant parameters.- Returns:
- the authorizationCode value.
-
withAuthorizationCode
public AuthorizationProviderOAuth2GrantTypes withAuthorizationCode(Map<String, String> authorizationCode) Set the authorizationCode property: OAuth2 authorization code grant parameters.- Parameters:
authorizationCode- the authorizationCode value to set.- Returns:
- the AuthorizationProviderOAuth2GrantTypes object itself.
-
clientCredentials
Get the clientCredentials property: OAuth2 client credential grant parameters.- Returns:
- the clientCredentials value.
-
withClientCredentials
public AuthorizationProviderOAuth2GrantTypes withClientCredentials(Map<String, String> clientCredentials) Set the clientCredentials property: OAuth2 client credential grant parameters.- Parameters:
clientCredentials- the clientCredentials value to set.- Returns:
- the AuthorizationProviderOAuth2GrantTypes object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AuthorizationProviderOAuth2GrantTypes>- Throws:
IOException
-
fromJson
public static AuthorizationProviderOAuth2GrantTypes fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AuthorizationProviderOAuth2GrantTypes from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AuthorizationProviderOAuth2GrantTypes if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the AuthorizationProviderOAuth2GrantTypes.
-