Class RedeemRequest

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

public final class RedeemRequest extends Object implements com.azure.json.JsonSerializable<RedeemRequest>
redeem request.
  • Constructor Details

    • RedeemRequest

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

    • redeemCode

      public String redeemCode()
      Get the redeemCode property: redeem code.
      Returns:
      the redeemCode value.
    • withRedeemCode

      public RedeemRequest withRedeemCode(String redeemCode)
      Set the redeemCode property: redeem code.
      Parameters:
      redeemCode - the redeemCode value to set.
      Returns:
      the RedeemRequest object itself.
    • firstName

      public String firstName()
      Get the firstName property: first name of requester.
      Returns:
      the firstName value.
    • withFirstName

      public RedeemRequest withFirstName(String firstName)
      Set the firstName property: first name of requester.
      Parameters:
      firstName - the firstName value to set.
      Returns:
      the RedeemRequest object itself.
    • lastName

      public String lastName()
      Get the lastName property: last name of requester.
      Returns:
      the lastName value.
    • withLastName

      public RedeemRequest withLastName(String lastName)
      Set the lastName property: last name of requester.
      Parameters:
      lastName - the lastName value to set.
      Returns:
      the RedeemRequest 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<RedeemRequest>
      Throws:
      IOException
    • fromJson

      public static RedeemRequest fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RedeemRequest from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RedeemRequest if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the RedeemRequest.