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 CardManagementV1UpdatestatusRequest type.
*/
public class CardManagementV1UpdatestatusRequest {
private List cards;
private OptionalNullable reasonId;
private OptionalNullable reasonText;
private String targetStatus;
/**
* Default constructor.
*/
public CardManagementV1UpdatestatusRequest() {
}
/**
* Initialization constructor.
* @param cards List of UpdateCard value for cards.
* @param targetStatus String value for targetStatus.
* @param reasonId Integer value for reasonId.
* @param reasonText String value for reasonText.
*/
public CardManagementV1UpdatestatusRequest(
List cards,
String targetStatus,
Integer reasonId,
String reasonText) {
this.cards = cards;
this.reasonId = OptionalNullable.of(reasonId);
this.reasonText = OptionalNullable.of(reasonText);
this.targetStatus = targetStatus;
}
/**
* Initialization constructor.
* @param cards List of UpdateCard value for cards.
* @param targetStatus String value for targetStatus.
* @param reasonId Integer value for reasonId.
* @param reasonText String value for reasonText.
*/
protected CardManagementV1UpdatestatusRequest(List cards, String targetStatus,
OptionalNullable reasonId, OptionalNullable reasonText) {
this.cards = cards;
this.reasonId = reasonId;
this.reasonText = reasonText;
this.targetStatus = targetStatus;
}
/**
* Getter for Cards.
* List of UpdateCardRequest entity. Each card in the list will be updated to the given target
* status. 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 UpdateCardRequest entity. Each card in the list will be updated to the given target
* status. 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 updating the card status.<br /> Optional<br /> Either Reason ID or Text is
* madatory when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br
* /> -Lost <br /> -Stolen <br /> -Card no longer required<br /> When passed, the reason Id will
* be validated with the allowed reason ids configured for the card type of the card.<br /> . If
* the given reason Id is not allowed for certain card types, then the request will be rejected
* as invalid ResonId.
* @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 updating the card status.<br /> Optional<br /> Either Reason ID or Text is
* madatory when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br
* /> -Lost <br /> -Stolen <br /> -Card no longer required<br /> When passed, the reason Id will
* be validated with the allowed reason ids configured for the card type of the card.<br /> . If
* the given reason Id is not allowed for certain card types, then the request will be rejected
* as invalid ResonId.
* @return Returns the Integer
*/
public Integer getReasonId() {
return OptionalNullable.getFrom(reasonId);
}
/**
* Setter for ReasonId.
* Reason id for updating the card status.<br /> Optional<br /> Either Reason ID or Text is
* madatory when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br
* /> -Lost <br /> -Stolen <br /> -Card no longer required<br /> When passed, the reason Id will
* be validated with the allowed reason ids configured for the card type of the card.<br /> . If
* the given reason Id is not allowed for certain card types, then the request will be rejected
* as invalid ResonId.
* @param reasonId Value for Integer
*/
@JsonSetter("ReasonId")
public void setReasonId(Integer reasonId) {
this.reasonId = OptionalNullable.of(reasonId);
}
/**
* UnSetter for ReasonId.
* Reason id for updating the card status.<br /> Optional<br /> Either Reason ID or Text is
* madatory when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br
* /> -Lost <br /> -Stolen <br /> -Card no longer required<br /> When passed, the reason Id will
* be validated with the allowed reason ids configured for the card type of the card.<br /> . If
* the given reason Id is not allowed for certain card types, then the request will be rejected
* as invalid ResonId.
*/
public void unsetReasonId() {
reasonId = null;
}
/**
* Internal Getter for ReasonText.
* Reason text for updating the card status.<br /> Optional Either Reason ID or Text is madatory
* when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br /> -Lost
* <br /> -Stolen <br /> -Card no longer required <br /> Optional – However, either Reason ID or
* Text is madatory when TargetStatus is ‘Block’ or ‘Damaged’.<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.<br /> If the text is not allowed,
* request will be rejected as invaid ResonText.<br /> Note:<br /> Customer blocked’ will be
* used as the reason for ‘Temporary Block’.
* @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 updating the card status.<br /> Optional Either Reason ID or Text is madatory
* when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br /> -Lost
* <br /> -Stolen <br /> -Card no longer required <br /> Optional – However, either Reason ID or
* Text is madatory when TargetStatus is ‘Block’ or ‘Damaged’.<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.<br /> If the text is not allowed,
* request will be rejected as invaid ResonText.<br /> Note:<br /> Customer blocked’ will be
* used as the reason for ‘Temporary Block’.
* @return Returns the String
*/
public String getReasonText() {
return OptionalNullable.getFrom(reasonText);
}
/**
* Setter for ReasonText.
* Reason text for updating the card status.<br /> Optional Either Reason ID or Text is madatory
* when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br /> -Lost
* <br /> -Stolen <br /> -Card no longer required <br /> Optional – However, either Reason ID or
* Text is madatory when TargetStatus is ‘Block’ or ‘Damaged’.<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.<br /> If the text is not allowed,
* request will be rejected as invaid ResonText.<br /> Note:<br /> Customer blocked’ will be
* used as the reason for ‘Temporary Block’.
* @param reasonText Value for String
*/
@JsonSetter("ReasonText")
public void setReasonText(String reasonText) {
this.reasonText = OptionalNullable.of(reasonText);
}
/**
* UnSetter for ReasonText.
* Reason text for updating the card status.<br /> Optional Either Reason ID or Text is madatory
* when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored.<br /> Possible values:<br /> -Lost
* <br /> -Stolen <br /> -Card no longer required <br /> Optional – However, either Reason ID or
* Text is madatory when TargetStatus is ‘Block’ or ‘Damaged’.<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.<br /> If the text is not allowed,
* request will be rejected as invaid ResonText.<br /> Note:<br /> Customer blocked’ will be
* used as the reason for ‘Temporary Block’.
*/
public void unsetReasonText() {
reasonText = null;
}
/**
* Getter for TargetStatus.
* The list of cards passed in Cards parameter will be updated to this status.<br />
* Mandatory<br /> Allowed values:<br /> -TemporaryBlock<br /> -Unblock<br /> -Block<br />
* -Damaged<br />
* @return Returns the String
*/
@JsonGetter("TargetStatus")
public String getTargetStatus() {
return targetStatus;
}
/**
* Setter for TargetStatus.
* The list of cards passed in Cards parameter will be updated to this status.<br />
* Mandatory<br /> Allowed values:<br /> -TemporaryBlock<br /> -Unblock<br /> -Block<br />
* -Damaged<br />
* @param targetStatus Value for String
*/
@JsonSetter("TargetStatus")
public void setTargetStatus(String targetStatus) {
this.targetStatus = targetStatus;
}
/**
* Converts this CardManagementV1UpdatestatusRequest into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "CardManagementV1UpdatestatusRequest [" + "cards=" + cards + ", targetStatus="
+ targetStatus + ", reasonId=" + reasonId + ", reasonText=" + reasonText + "]";
}
/**
* Builds a new {@link CardManagementV1UpdatestatusRequest.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link CardManagementV1UpdatestatusRequest.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(cards, targetStatus);
builder.reasonId = internalGetReasonId();
builder.reasonText = internalGetReasonText();
return builder;
}
/**
* Class to build instances of {@link CardManagementV1UpdatestatusRequest}.
*/
public static class Builder {
private List cards;
private String targetStatus;
private OptionalNullable reasonId;
private OptionalNullable reasonText;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param cards List of UpdateCard value for cards.
* @param targetStatus String value for targetStatus.
*/
public Builder(List cards, String targetStatus) {
this.cards = cards;
this.targetStatus = targetStatus;
}
/**
* 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 targetStatus.
* @param targetStatus String value for targetStatus.
* @return Builder
*/
public Builder targetStatus(String targetStatus) {
this.targetStatus = targetStatus;
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 CardManagementV1UpdatestatusRequest} object using the set fields.
* @return {@link CardManagementV1UpdatestatusRequest}
*/
public CardManagementV1UpdatestatusRequest build() {
return new CardManagementV1UpdatestatusRequest(cards, targetStatus, reasonId,
reasonText);
}
}
}