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 Details

    • AuthorizationProviderOAuth2GrantTypes

      public AuthorizationProviderOAuth2GrantTypes()
      Creates an instance of AuthorizationProviderOAuth2GrantTypes class.
  • Method Details

    • authorizationCode

      public Map<String,String> 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

      public Map<String,String> 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.