Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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 CancelCardRequest type.
*/
public class CancelCardRequest {
private List cards;
private OptionalNullable reasonId;
private OptionalNullable reasonText;
/**
* Default constructor.
*/
public CancelCardRequest() {
}
/**
* Initialization constructor.
* @param cards List of UpdateCard value for cards.
* @param reasonId Integer value for reasonId.
* @param reasonText String value for reasonText.
*/
public CancelCardRequest(
List cards,
Integer reasonId,
String reasonText) {
this.cards = cards;
this.reasonId = OptionalNullable.of(reasonId);
this.reasonText = OptionalNullable.of(reasonText);
}
/**
* Initialization constructor.
* @param cards List of UpdateCard value for cards.
* @param reasonId Integer value for reasonId.
* @param reasonText String value for reasonText.
*/
protected CancelCardRequest(List cards, OptionalNullable reasonId,
OptionalNullable reasonText) {
this.cards = cards;
this.reasonId = reasonId;
this.reasonText = reasonText;
}
/**
* Getter for Cards.
* List of CancelCardRequest entity. Each card in the list will be Cancelled. The details of the
* entity are given below.
* @return Returns the List of UpdateCard
*/
@JsonGetter("Cards")
public List getCards() {
return cards;
}
/**
* Setter for Cards.
* List of CancelCardRequest entity. Each card in the list will be Cancelled. The details of the
* entity are given below.
* @param cards Value for List of UpdateCard
*/
@JsonSetter("Cards")
public void setCards(List cards) {
this.cards = cards;
}
/**
* Internal Getter for ReasonId.
* Reason id for cancelling the card.<br /> Optional if ReasonText is passed, else mandatory<br
* /> When passed, the reason Id will be validated with the allowed reason id’s configured for
* the card type of the card.<br /> If the reason Id is not allowed, then it will be included on
* the error cards response. Possible values: 1 (Lost) 2 (Stolen) 3 (Card no longer required)
* @return Returns the Internal Integer
*/
@JsonGetter("ReasonId")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetReasonId() {
return this.reasonId;
}
/**
* Getter for ReasonId.
* Reason id for cancelling the card.<br /> Optional if ReasonText is passed, else mandatory<br
* /> When passed, the reason Id will be validated with the allowed reason id’s configured for
* the card type of the card.<br /> If the reason Id is not allowed, then it will be included on
* the error cards response. Possible values: 1 (Lost) 2 (Stolen) 3 (Card no longer required)
* @return Returns the Integer
*/
public Integer getReasonId() {
return OptionalNullable.getFrom(reasonId);
}
/**
* Setter for ReasonId.
* Reason id for cancelling the card.<br /> Optional if ReasonText is passed, else mandatory<br
* /> When passed, the reason Id will be validated with the allowed reason id’s configured for
* the card type of the card.<br /> If the reason Id is not allowed, then it will be included on
* the error cards response. Possible values: 1 (Lost) 2 (Stolen) 3 (Card no longer required)
* @param reasonId Value for Integer
*/
@JsonSetter("ReasonId")
public void setReasonId(Integer reasonId) {
this.reasonId = OptionalNullable.of(reasonId);
}
/**
* UnSetter for ReasonId.
* Reason id for cancelling the card.<br /> Optional if ReasonText is passed, else mandatory<br
* /> When passed, the reason Id will be validated with the allowed reason id’s configured for
* the card type of the card.<br /> If the reason Id is not allowed, then it will be included on
* the error cards response. Possible values: 1 (Lost) 2 (Stolen) 3 (Card no longer required)
*/
public void unsetReasonId() {
reasonId = null;
}
/**
* Internal Getter for ReasonText.
* Reason text for cancelling the card.<br /> Optional if ReasonId is passed, else mandatory<br
* /> When Reason Id is not known to the client, the reason text can be passed.<br /> When
* Reason Text is passed and the Target Status is either Block or Damaged, the text will be
* validated with the allowed list of values configured for the card type of the card. If the
* text is not allowed, then it will be included on the error cards response. However, if the
* Target status is Temporary block or Unblock then the text will be submitted Possible Values:
* 1) Lost 2) Stolen 3) Card no longer required
* @return Returns the Internal String
*/
@JsonGetter("ReasonText")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetReasonText() {
return this.reasonText;
}
/**
* Getter for ReasonText.
* Reason text for cancelling the card.<br /> Optional if ReasonId is passed, else mandatory<br
* /> When Reason Id is not known to the client, the reason text can be passed.<br /> When
* Reason Text is passed and the Target Status is either Block or Damaged, the text will be
* validated with the allowed list of values configured for the card type of the card. If the
* text is not allowed, then it will be included on the error cards response. However, if the
* Target status is Temporary block or Unblock then the text will be submitted Possible Values:
* 1) Lost 2) Stolen 3) Card no longer required
* @return Returns the String
*/
public String getReasonText() {
return OptionalNullable.getFrom(reasonText);
}
/**
* Setter for ReasonText.
* Reason text for cancelling the card.<br /> Optional if ReasonId is passed, else mandatory<br
* /> When Reason Id is not known to the client, the reason text can be passed.<br /> When
* Reason Text is passed and the Target Status is either Block or Damaged, the text will be
* validated with the allowed list of values configured for the card type of the card. If the
* text is not allowed, then it will be included on the error cards response. However, if the
* Target status is Temporary block or Unblock then the text will be submitted Possible Values:
* 1) Lost 2) Stolen 3) Card no longer required
* @param reasonText Value for String
*/
@JsonSetter("ReasonText")
public void setReasonText(String reasonText) {
this.reasonText = OptionalNullable.of(reasonText);
}
/**
* UnSetter for ReasonText.
* Reason text for cancelling the card.<br /> Optional if ReasonId is passed, else mandatory<br
* /> When Reason Id is not known to the client, the reason text can be passed.<br /> When
* Reason Text is passed and the Target Status is either Block or Damaged, the text will be
* validated with the allowed list of values configured for the card type of the card. If the
* text is not allowed, then it will be included on the error cards response. However, if the
* Target status is Temporary block or Unblock then the text will be submitted Possible Values:
* 1) Lost 2) Stolen 3) Card no longer required
*/
public void unsetReasonText() {
reasonText = null;
}
/**
* Converts this CancelCardRequest into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "CancelCardRequest [" + "cards=" + cards + ", reasonId=" + reasonId + ", reasonText="
+ reasonText + "]";
}
/**
* Builds a new {@link CancelCardRequest.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link CancelCardRequest.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(cards);
builder.reasonId = internalGetReasonId();
builder.reasonText = internalGetReasonText();
return builder;
}
/**
* Class to build instances of {@link CancelCardRequest}.
*/
public static class Builder {
private List cards;
private OptionalNullable reasonId;
private OptionalNullable reasonText;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param cards List of UpdateCard value for cards.
*/
public Builder(List cards) {
this.cards = cards;
}
/**
* Setter for cards.
* @param cards List of UpdateCard value for cards.
* @return Builder
*/
public Builder cards(List cards) {
this.cards = cards;
return this;
}
/**
* Setter for reasonId.
* @param reasonId Integer value for reasonId.
* @return Builder
*/
public Builder reasonId(Integer reasonId) {
this.reasonId = OptionalNullable.of(reasonId);
return this;
}
/**
* UnSetter for reasonId.
* @return Builder
*/
public Builder unsetReasonId() {
reasonId = null;
return this;
}
/**
* Setter for reasonText.
* @param reasonText String value for reasonText.
* @return Builder
*/
public Builder reasonText(String reasonText) {
this.reasonText = OptionalNullable.of(reasonText);
return this;
}
/**
* UnSetter for reasonText.
* @return Builder
*/
public Builder unsetReasonText() {
reasonText = null;
return this;
}
/**
* Builds a new {@link CancelCardRequest} object using the set fields.
* @return {@link CancelCardRequest}
*/
public CancelCardRequest build() {
return new CancelCardRequest(cards, reasonId, reasonText);
}
}
}