com.shell.apitest.models.Accounts 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 Accounts type.
*/
public class Accounts {
private OptionalNullable accountId;
private OptionalNullable accountNumber;
/**
* Default constructor.
*/
public Accounts() {
}
/**
* Initialization constructor.
* @param accountId Integer value for accountId.
* @param accountNumber String value for accountNumber.
*/
public Accounts(
Integer accountId,
String accountNumber) {
this.accountId = OptionalNullable.of(accountId);
this.accountNumber = OptionalNullable.of(accountNumber);
}
/**
* Initialization constructor.
* @param accountId Integer value for accountId.
* @param accountNumber String value for accountNumber.
*/
protected Accounts(OptionalNullable accountId,
OptionalNullable accountNumber) {
this.accountId = accountId;
this.accountNumber = accountNumber;
}
/**
* Internal Getter for AccountId.
* Account Id of the customer. Optional, if AccountNumber is passed, else mandatory.
* @return Returns the Internal Integer
*/
@JsonGetter("AccountId")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetAccountId() {
return this.accountId;
}
/**
* Getter for AccountId.
* Account Id of the customer. Optional, if AccountNumber is passed, else mandatory.
* @return Returns the Integer
*/
public Integer getAccountId() {
return OptionalNullable.getFrom(accountId);
}
/**
* Setter for AccountId.
* Account Id of the customer. Optional, if AccountNumber is passed, else mandatory.
* @param accountId Value for Integer
*/
@JsonSetter("AccountId")
public void setAccountId(Integer accountId) {
this.accountId = OptionalNullable.of(accountId);
}
/**
* UnSetter for AccountId.
* Account Id of the customer. Optional, if AccountNumber is passed, else mandatory.
*/
public void unsetAccountId() {
accountId = null;
}
/**
* Internal Getter for AccountNumber.
* Account Number of the customer. Optional, if AccountId is passed, else mandatory.
* @return Returns the Internal String
*/
@JsonGetter("AccountNumber")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
protected OptionalNullable internalGetAccountNumber() {
return this.accountNumber;
}
/**
* Getter for AccountNumber.
* Account Number of the customer. Optional, if AccountId is passed, else mandatory.
* @return Returns the String
*/
public String getAccountNumber() {
return OptionalNullable.getFrom(accountNumber);
}
/**
* Setter for AccountNumber.
* Account Number of the customer. Optional, if AccountId is passed, else mandatory.
* @param accountNumber Value for String
*/
@JsonSetter("AccountNumber")
public void setAccountNumber(String accountNumber) {
this.accountNumber = OptionalNullable.of(accountNumber);
}
/**
* UnSetter for AccountNumber.
* Account Number of the customer. Optional, if AccountId is passed, else mandatory.
*/
public void unsetAccountNumber() {
accountNumber = null;
}
/**
* Converts this Accounts into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "Accounts [" + "accountId=" + accountId + ", accountNumber=" + accountNumber + "]";
}
/**
* Builds a new {@link Accounts.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link Accounts.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder();
builder.accountId = internalGetAccountId();
builder.accountNumber = internalGetAccountNumber();
return builder;
}
/**
* Class to build instances of {@link Accounts}.
*/
public static class Builder {
private OptionalNullable accountId;
private OptionalNullable accountNumber;
/**
* Setter for accountId.
* @param accountId Integer value for accountId.
* @return Builder
*/
public Builder accountId(Integer accountId) {
this.accountId = OptionalNullable.of(accountId);
return this;
}
/**
* UnSetter for accountId.
* @return Builder
*/
public Builder unsetAccountId() {
accountId = null;
return this;
}
/**
* Setter for accountNumber.
* @param accountNumber String value for accountNumber.
* @return Builder
*/
public Builder accountNumber(String accountNumber) {
this.accountNumber = OptionalNullable.of(accountNumber);
return this;
}
/**
* UnSetter for accountNumber.
* @return Builder
*/
public Builder unsetAccountNumber() {
accountNumber = null;
return this;
}
/**
* Builds a new {@link Accounts} object using the set fields.
* @return {@link Accounts}
*/
public Accounts build() {
return new Accounts(accountId, accountNumber);
}
}
}