com.shell.apitest.models.CardBlockSchedule 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;
/**
* This is a model class for CardBlockSchedule type.
*/
public class CardBlockSchedule {
private OptionalNullable fromDate;
private OptionalNullable toDate;
/**
* Default constructor.
*/
public CardBlockSchedule() {
}
/**
* Initialization constructor.
* @param fromDate String value for fromDate.
* @param toDate String value for toDate.
*/
public CardBlockSchedule(
String fromDate,
String toDate) {
this.fromDate = OptionalNullable.of(fromDate);
this.toDate = OptionalNullable.of(toDate);
}
/**
* Initialization constructor.
* @param fromDate String value for fromDate.
* @param toDate String value for toDate.
*/
protected CardBlockSchedule(OptionalNullable fromDate,
OptionalNullable toDate) {
this.fromDate = fromDate;
this.toDate = toDate;
}
/**
* Internal Getter for FromDate.
* Effective start date of Block / Unblock<br /> Format: yyyyMMdd
* @return Returns the Internal String
*/
@JsonGetter("FromDate")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetFromDate() {
return this.fromDate;
}
/**
* Getter for FromDate.
* Effective start date of Block / Unblock<br /> Format: yyyyMMdd
* @return Returns the String
*/
public String getFromDate() {
return OptionalNullable.getFrom(fromDate);
}
/**
* Setter for FromDate.
* Effective start date of Block / Unblock<br /> Format: yyyyMMdd
* @param fromDate Value for String
*/
@JsonSetter("FromDate")
public void setFromDate(String fromDate) {
this.fromDate = OptionalNullable.of(fromDate);
}
/**
* UnSetter for FromDate.
* Effective start date of Block / Unblock<br /> Format: yyyyMMdd
*/
public void unsetFromDate() {
fromDate = null;
}
/**
* Internal Getter for ToDate.
* Effective end date of Block / Unblock<br /> Format: yyyyMMdd
* @return Returns the Internal String
*/
@JsonGetter("ToDate")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetToDate() {
return this.toDate;
}
/**
* Getter for ToDate.
* Effective end date of Block / Unblock<br /> Format: yyyyMMdd
* @return Returns the String
*/
public String getToDate() {
return OptionalNullable.getFrom(toDate);
}
/**
* Setter for ToDate.
* Effective end date of Block / Unblock<br /> Format: yyyyMMdd
* @param toDate Value for String
*/
@JsonSetter("ToDate")
public void setToDate(String toDate) {
this.toDate = OptionalNullable.of(toDate);
}
/**
* UnSetter for ToDate.
* Effective end date of Block / Unblock<br /> Format: yyyyMMdd
*/
public void unsetToDate() {
toDate = null;
}
/**
* Converts this CardBlockSchedule into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "CardBlockSchedule [" + "fromDate=" + fromDate + ", toDate=" + toDate + "]";
}
/**
* Builds a new {@link CardBlockSchedule.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link CardBlockSchedule.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder();
builder.fromDate = internalGetFromDate();
builder.toDate = internalGetToDate();
return builder;
}
/**
* Class to build instances of {@link CardBlockSchedule}.
*/
public static class Builder {
private OptionalNullable fromDate;
private OptionalNullable toDate;
/**
* Setter for fromDate.
* @param fromDate String value for fromDate.
* @return Builder
*/
public Builder fromDate(String fromDate) {
this.fromDate = OptionalNullable.of(fromDate);
return this;
}
/**
* UnSetter for fromDate.
* @return Builder
*/
public Builder unsetFromDate() {
fromDate = null;
return this;
}
/**
* Setter for toDate.
* @param toDate String value for toDate.
* @return Builder
*/
public Builder toDate(String toDate) {
this.toDate = OptionalNullable.of(toDate);
return this;
}
/**
* UnSetter for toDate.
* @return Builder
*/
public Builder unsetToDate() {
toDate = null;
return this;
}
/**
* Builds a new {@link CardBlockSchedule} object using the set fields.
* @return {@link CardBlockSchedule}
*/
public CardBlockSchedule build() {
return new CardBlockSchedule(fromDate, toDate);
}
}
}