Class AuthorizationConfirmConsentCodeRequestContract

java.lang.Object
com.azure.resourcemanager.apimanagement.models.AuthorizationConfirmConsentCodeRequestContract
All Implemented Interfaces:
com.azure.json.JsonSerializable<AuthorizationConfirmConsentCodeRequestContract>

public final class AuthorizationConfirmConsentCodeRequestContract extends Object implements com.azure.json.JsonSerializable<AuthorizationConfirmConsentCodeRequestContract>
Authorization confirm consent code request contract.
  • Constructor Details

    • AuthorizationConfirmConsentCodeRequestContract

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

    • consentCode

      public String consentCode()
      Get the consentCode property: The consent code from the authorization server after authorizing and consenting.
      Returns:
      the consentCode value.
    • withConsentCode

      public AuthorizationConfirmConsentCodeRequestContract withConsentCode(String consentCode)
      Set the consentCode property: The consent code from the authorization server after authorizing and consenting.
      Parameters:
      consentCode - the consentCode value to set.
      Returns:
      the AuthorizationConfirmConsentCodeRequestContract 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<AuthorizationConfirmConsentCodeRequestContract>
      Throws:
      IOException
    • fromJson

      public static AuthorizationConfirmConsentCodeRequestContract fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AuthorizationConfirmConsentCodeRequestContract from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AuthorizationConfirmConsentCodeRequestContract 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 AuthorizationConfirmConsentCodeRequestContract.