All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shell.apitest.models.SearchCardRestriction 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 SearchCardRestriction type.
 */
public class SearchCardRestriction {
    private OptionalNullable cardId;
    private OptionalNullable pAN;

    /**
     * Default constructor.
     */
    public SearchCardRestriction() {
    }

    /**
     * Initialization constructor.
     * @param  cardId  Integer value for cardId.
     * @param  pAN  String value for pAN.
     */
    public SearchCardRestriction(
            Integer cardId,
            String pAN) {
        this.cardId = OptionalNullable.of(cardId);
        this.pAN = OptionalNullable.of(pAN);
    }

    /**
     * Initialization constructor.
     * @param  cardId  Integer value for cardId.
     * @param  pAN  String value for pAN.
     */

    protected SearchCardRestriction(OptionalNullable cardId,
            OptionalNullable pAN) {
        this.cardId = cardId;
        this.pAN = pAN;
    }

    /**
     * Internal Getter for CardId.
     * Unique Card Id Optional if PAN is given, else mandatory.
     * @return Returns the Internal Integer
     */
    @JsonGetter("CardId")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetCardId() {
        return this.cardId;
    }

    /**
     * Getter for CardId.
     * Unique Card Id Optional if PAN is given, else mandatory.
     * @return Returns the Integer
     */
    public Integer getCardId() {
        return OptionalNullable.getFrom(cardId);
    }

    /**
     * Setter for CardId.
     * Unique Card Id Optional if PAN is given, else mandatory.
     * @param cardId Value for Integer
     */
    @JsonSetter("CardId")
    public void setCardId(Integer cardId) {
        this.cardId = OptionalNullable.of(cardId);
    }

    /**
     * UnSetter for CardId.
     * Unique Card Id Optional if PAN is given, else mandatory.
     */
    public void unsetCardId() {
        cardId = null;
    }

    /**
     * Internal Getter for PAN.
     * Card PAN. Optional if CardId is given, else mandatory. Note: PAN is ignored if CardId is
     * given. Example: 7002051006629890645
     * @return Returns the Internal String
     */
    @JsonGetter("PAN")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetPAN() {
        return this.pAN;
    }

    /**
     * Getter for PAN.
     * Card PAN. Optional if CardId is given, else mandatory. Note: PAN is ignored if CardId is
     * given. Example: 7002051006629890645
     * @return Returns the String
     */
    public String getPAN() {
        return OptionalNullable.getFrom(pAN);
    }

    /**
     * Setter for PAN.
     * Card PAN. Optional if CardId is given, else mandatory. Note: PAN is ignored if CardId is
     * given. Example: 7002051006629890645
     * @param pAN Value for String
     */
    @JsonSetter("PAN")
    public void setPAN(String pAN) {
        this.pAN = OptionalNullable.of(pAN);
    }

    /**
     * UnSetter for PAN.
     * Card PAN. Optional if CardId is given, else mandatory. Note: PAN is ignored if CardId is
     * given. Example: 7002051006629890645
     */
    public void unsetPAN() {
        pAN = null;
    }

    /**
     * Converts this SearchCardRestriction into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "SearchCardRestriction [" + "cardId=" + cardId + ", pAN=" + pAN + "]";
    }

    /**
     * Builds a new {@link SearchCardRestriction.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link SearchCardRestriction.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder();
        builder.cardId = internalGetCardId();
        builder.pAN = internalGetPAN();
        return builder;
    }

    /**
     * Class to build instances of {@link SearchCardRestriction}.
     */
    public static class Builder {
        private OptionalNullable cardId;
        private OptionalNullable pAN;



        /**
         * Setter for cardId.
         * @param  cardId  Integer value for cardId.
         * @return Builder
         */
        public Builder cardId(Integer cardId) {
            this.cardId = OptionalNullable.of(cardId);
            return this;
        }

        /**
         * UnSetter for cardId.
         * @return Builder
         */
        public Builder unsetCardId() {
            cardId = null;
            return this;
        }

        /**
         * Setter for pAN.
         * @param  pAN  String value for pAN.
         * @return Builder
         */
        public Builder pAN(String pAN) {
            this.pAN = OptionalNullable.of(pAN);
            return this;
        }

        /**
         * UnSetter for pAN.
         * @return Builder
         */
        public Builder unsetPAN() {
            pAN = null;
            return this;
        }

        /**
         * Builds a new {@link SearchCardRestriction} object using the set fields.
         * @return {@link SearchCardRestriction}
         */
        public SearchCardRestriction build() {
            return new SearchCardRestriction(cardId, pAN);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy