com.shell.apitest.models.CardRestrictionResponse Maven / Gradle / Ivy
/*
* ShellCardManagementAPIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.shell.apitest.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.apimatic.core.types.OptionalNullable;
import java.util.List;
/**
* This is a model class for CardRestrictionResponse type.
*/
public class CardRestrictionResponse {
private OptionalNullable requestId;
private Double restrictionRequestReference;
private List cards;
private ErrorStatus error;
/**
* Default constructor.
*/
public CardRestrictionResponse() {
}
/**
* Initialization constructor.
* @param requestId String value for requestId.
* @param restrictionRequestReference Double value for restrictionRequestReference.
* @param cards List of RestrictioncardsRes value for cards.
* @param error ErrorStatus value for error.
*/
public CardRestrictionResponse(
String requestId,
Double restrictionRequestReference,
List cards,
ErrorStatus error) {
this.requestId = OptionalNullable.of(requestId);
this.restrictionRequestReference = restrictionRequestReference;
this.cards = cards;
this.error = error;
}
/**
* Initialization constructor.
* @param requestId String value for requestId.
* @param restrictionRequestReference Double value for restrictionRequestReference.
* @param cards List of RestrictioncardsRes value for cards.
* @param error ErrorStatus value for error.
*/
protected CardRestrictionResponse(OptionalNullable requestId,
Double restrictionRequestReference, List cards,
ErrorStatus error) {
this.requestId = requestId;
this.restrictionRequestReference = restrictionRequestReference;
this.cards = cards;
this.error = error;
}
/**
* Internal Getter for RequestId.
* Request Id of the API call
* @return Returns the Internal String
*/
@JsonGetter("RequestId")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetRequestId() {
return this.requestId;
}
/**
* Getter for RequestId.
* Request Id of the API call
* @return Returns the String
*/
public String getRequestId() {
return OptionalNullable.getFrom(requestId);
}
/**
* Setter for RequestId.
* Request Id of the API call
* @param requestId Value for String
*/
@JsonSetter("RequestId")
public void setRequestId(String requestId) {
this.requestId = OptionalNullable.of(requestId);
}
/**
* UnSetter for RequestId.
* Request Id of the API call
*/
public void unsetRequestId() {
requestId = null;
}
/**
* Getter for RestrictionRequestReference.
* Reference number for tracking the execution of the card restriction requests.
* @return Returns the Double
*/
@JsonGetter("RestrictionRequestReference")
@JsonInclude(JsonInclude.Include.NON_NULL)
public Double getRestrictionRequestReference() {
return restrictionRequestReference;
}
/**
* Setter for RestrictionRequestReference.
* Reference number for tracking the execution of the card restriction requests.
* @param restrictionRequestReference Value for Double
*/
@JsonSetter("RestrictionRequestReference")
public void setRestrictionRequestReference(Double restrictionRequestReference) {
this.restrictionRequestReference = restrictionRequestReference;
}
/**
* Getter for Cards.
* @return Returns the List of RestrictioncardsRes
*/
@JsonGetter("Cards")
@JsonInclude(JsonInclude.Include.NON_NULL)
public List getCards() {
return cards;
}
/**
* Setter for Cards.
* @param cards Value for List of RestrictioncardsRes
*/
@JsonSetter("Cards")
public void setCards(List cards) {
this.cards = cards;
}
/**
* Getter for Error.
* @return Returns the ErrorStatus
*/
@JsonGetter("Error")
@JsonInclude(JsonInclude.Include.NON_NULL)
public ErrorStatus getError() {
return error;
}
/**
* Setter for Error.
* @param error Value for ErrorStatus
*/
@JsonSetter("Error")
public void setError(ErrorStatus error) {
this.error = error;
}
/**
* Converts this CardRestrictionResponse into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "CardRestrictionResponse [" + "requestId=" + requestId
+ ", restrictionRequestReference=" + restrictionRequestReference + ", cards="
+ cards + ", error=" + error + "]";
}
/**
* Builds a new {@link CardRestrictionResponse.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link CardRestrictionResponse.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.restrictionRequestReference(getRestrictionRequestReference())
.cards(getCards())
.error(getError());
builder.requestId = internalGetRequestId();
return builder;
}
/**
* Class to build instances of {@link CardRestrictionResponse}.
*/
public static class Builder {
private OptionalNullable requestId;
private Double restrictionRequestReference;
private List cards;
private ErrorStatus error;
/**
* Setter for requestId.
* @param requestId String value for requestId.
* @return Builder
*/
public Builder requestId(String requestId) {
this.requestId = OptionalNullable.of(requestId);
return this;
}
/**
* UnSetter for requestId.
* @return Builder
*/
public Builder unsetRequestId() {
requestId = null;
return this;
}
/**
* Setter for restrictionRequestReference.
* @param restrictionRequestReference Double value for restrictionRequestReference.
* @return Builder
*/
public Builder restrictionRequestReference(Double restrictionRequestReference) {
this.restrictionRequestReference = restrictionRequestReference;
return this;
}
/**
* Setter for cards.
* @param cards List of RestrictioncardsRes value for cards.
* @return Builder
*/
public Builder cards(List cards) {
this.cards = cards;
return this;
}
/**
* Setter for error.
* @param error ErrorStatus value for error.
* @return Builder
*/
public Builder error(ErrorStatus error) {
this.error = error;
return this;
}
/**
* Builds a new {@link CardRestrictionResponse} object using the set fields.
* @return {@link CardRestrictionResponse}
*/
public CardRestrictionResponse build() {
return new CardRestrictionResponse(requestId, restrictionRequestReference, cards,
error);
}
}
}