com.shell.apitest.models.NetworkRestriction 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 java.util.List;
/**
* This is a model class for NetworkRestriction type.
*/
public class NetworkRestriction {
private String country;
private List networks;
private Boolean exclusive;
/**
* Default constructor.
*/
public NetworkRestriction() {
}
/**
* Initialization constructor.
* @param country String value for country.
* @param networks List of String value for networks.
* @param exclusive Boolean value for exclusive.
*/
public NetworkRestriction(
String country,
List networks,
Boolean exclusive) {
this.country = country;
this.networks = networks;
this.exclusive = exclusive;
}
/**
* Getter for Country.
* ISO 3166-1 Numeric-3 code of the country where the network restriction is applied. Example:
* 826 for United Kingdom.
* @return Returns the String
*/
@JsonGetter("Country")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getCountry() {
return country;
}
/**
* Setter for Country.
* ISO 3166-1 Numeric-3 code of the country where the network restriction is applied. Example:
* 826 for United Kingdom.
* @param country Value for String
*/
@JsonSetter("Country")
public void setCountry(String country) {
this.country = country;
}
/**
* Getter for Networks.
* A list of Gateway network codes, typically 7 or 10 digits. Example: 0002003250
* @return Returns the List of String
*/
@JsonGetter("Networks")
@JsonInclude(JsonInclude.Include.NON_NULL)
public List getNetworks() {
return networks;
}
/**
* Setter for Networks.
* A list of Gateway network codes, typically 7 or 10 digits. Example: 0002003250
* @param networks Value for List of String
*/
@JsonSetter("Networks")
public void setNetworks(List networks) {
this.networks = networks;
}
/**
* Getter for Exclusive.
* Flag indicates whether the profile is inclusive or exclusive. Example: False - (inclusive),
* i.e. the “Networks” property lists the networks in which the transaction will be allowed.
* True - (exclusive), i.e. the “Networks” property lists the networks in which the transactions
* will be declined.
* @return Returns the Boolean
*/
@JsonGetter("Exclusive")
@JsonInclude(JsonInclude.Include.NON_NULL)
public Boolean getExclusive() {
return exclusive;
}
/**
* Setter for Exclusive.
* Flag indicates whether the profile is inclusive or exclusive. Example: False - (inclusive),
* i.e. the “Networks” property lists the networks in which the transaction will be allowed.
* True - (exclusive), i.e. the “Networks” property lists the networks in which the transactions
* will be declined.
* @param exclusive Value for Boolean
*/
@JsonSetter("Exclusive")
public void setExclusive(Boolean exclusive) {
this.exclusive = exclusive;
}
/**
* Converts this NetworkRestriction into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "NetworkRestriction [" + "country=" + country + ", networks=" + networks
+ ", exclusive=" + exclusive + "]";
}
/**
* Builds a new {@link NetworkRestriction.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link NetworkRestriction.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.country(getCountry())
.networks(getNetworks())
.exclusive(getExclusive());
return builder;
}
/**
* Class to build instances of {@link NetworkRestriction}.
*/
public static class Builder {
private String country;
private List networks;
private Boolean exclusive;
/**
* Setter for country.
* @param country String value for country.
* @return Builder
*/
public Builder country(String country) {
this.country = country;
return this;
}
/**
* Setter for networks.
* @param networks List of String value for networks.
* @return Builder
*/
public Builder networks(List networks) {
this.networks = networks;
return this;
}
/**
* Setter for exclusive.
* @param exclusive Boolean value for exclusive.
* @return Builder
*/
public Builder exclusive(Boolean exclusive) {
this.exclusive = exclusive;
return this;
}
/**
* Builds a new {@link NetworkRestriction} object using the set fields.
* @return {@link NetworkRestriction}
*/
public NetworkRestriction build() {
return new NetworkRestriction(country, networks, exclusive);
}
}
}