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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the firstName property: first name of requester.static RedeemRequestfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RedeemRequest from the JsonReader.lastName()Get the lastName property: last name of requester.Get the redeemCode property: redeem code.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withFirstName(String firstName) Set the firstName property: first name of requester.withLastName(String lastName) Set the lastName property: last name of requester.withRedeemCode(String redeemCode) Set the redeemCode property: redeem code.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
-
RedeemRequest
public RedeemRequest()Creates an instance of RedeemRequest class.
-
-
Method Details
-
redeemCode
Get the redeemCode property: redeem code.- Returns:
- the redeemCode value.
-
withRedeemCode
Set the redeemCode property: redeem code.- Parameters:
redeemCode- the redeemCode value to set.- Returns:
- the RedeemRequest object itself.
-
firstName
Get the firstName property: first name of requester.- Returns:
- the firstName value.
-
withFirstName
Set the firstName property: first name of requester.- Parameters:
firstName- the firstName value to set.- Returns:
- the RedeemRequest object itself.
-
lastName
Get the lastName property: last name of requester.- Returns:
- the lastName value.
-
withLastName
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RedeemRequest>- Throws:
IOException
-
fromJson
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.
-