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

com.bandwidth.multifactorauth.models.TwoFactorCodeRequestSchema Maven / Gradle / Ivy

Go to download

The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs

There is a newer version: 12.0.0
Show newest version
/*
 * BandwidthLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

package com.bandwidth.multifactorauth.models;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;

/**
 * This is a model class for TwoFactorCodeRequestSchema type.
 */
public class TwoFactorCodeRequestSchema {
    private String to;
    private String from;
    private String applicationId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String scope;
    private String message;
    private double digits;

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

    /**
     * Initialization constructor.
     * @param  to  String value for to.
     * @param  from  String value for from.
     * @param  applicationId  String value for applicationId.
     * @param  message  String value for message.
     * @param  digits  double value for digits.
     * @param  scope  String value for scope.
     */
    public TwoFactorCodeRequestSchema(
            String to,
            String from,
            String applicationId,
            String message,
            double digits,
            String scope) {
        this.to = to;
        this.from = from;
        this.applicationId = applicationId;
        this.scope = scope;
        this.message = message;
        this.digits = digits;
    }

    /**
     * Getter for To.
     * The phone number to send the 2fa code to.
     * @return Returns the String
     */
    @JsonGetter("to")
    public String getTo() {
        return to;
    }

    /**
     * Setter for To.
     * The phone number to send the 2fa code to.
     * @param to Value for String
     */
    @JsonSetter("to")
    public void setTo(String to) {
        this.to = to;
    }

    /**
     * Getter for From.
     * The application phone number, the sender of the 2fa code.
     * @return Returns the String
     */
    @JsonGetter("from")
    public String getFrom() {
        return from;
    }

    /**
     * Setter for From.
     * The application phone number, the sender of the 2fa code.
     * @param from Value for String
     */
    @JsonSetter("from")
    public void setFrom(String from) {
        this.from = from;
    }

    /**
     * Getter for ApplicationId.
     * The application unique ID, obtained from Bandwidth.
     * @return Returns the String
     */
    @JsonGetter("applicationId")
    public String getApplicationId() {
        return applicationId;
    }

    /**
     * Setter for ApplicationId.
     * The application unique ID, obtained from Bandwidth.
     * @param applicationId Value for String
     */
    @JsonSetter("applicationId")
    public void setApplicationId(String applicationId) {
        this.applicationId = applicationId;
    }

    /**
     * Getter for Scope.
     * An optional field to denote what scope or action the 2fa code is addressing. If not supplied,
     * defaults to "2FA".
     * @return Returns the String
     */
    @JsonGetter("scope")
    public String getScope() {
        return scope;
    }

    /**
     * Setter for Scope.
     * An optional field to denote what scope or action the 2fa code is addressing. If not supplied,
     * defaults to "2FA".
     * @param scope Value for String
     */
    @JsonSetter("scope")
    public void setScope(String scope) {
        this.scope = scope;
    }

    /**
     * Getter for Message.
     * The message format of the 2fa code. There are three values that the system will replace
     * "{CODE}", "{NAME}", "{SCOPE}". The "{SCOPE}" and "{NAME} value template are optional, while
     * "{CODE}" must be supplied. As the name would suggest, code will be replace with the actual
     * 2fa code. Name is replaced with the application name, configured during provisioning of 2fa.
     * The scope value is the same value sent during the call and partitioned by the server.
     * @return Returns the String
     */
    @JsonGetter("message")
    public String getMessage() {
        return message;
    }

    /**
     * Setter for Message.
     * The message format of the 2fa code. There are three values that the system will replace
     * "{CODE}", "{NAME}", "{SCOPE}". The "{SCOPE}" and "{NAME} value template are optional, while
     * "{CODE}" must be supplied. As the name would suggest, code will be replace with the actual
     * 2fa code. Name is replaced with the application name, configured during provisioning of 2fa.
     * The scope value is the same value sent during the call and partitioned by the server.
     * @param message Value for String
     */
    @JsonSetter("message")
    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * Getter for Digits.
     * The number of digits for your 2fa code. The valid number ranges from 2 to 8, inclusively.
     * @return Returns the double
     */
    @JsonGetter("digits")
    public double getDigits() {
        return digits;
    }

    /**
     * Setter for Digits.
     * The number of digits for your 2fa code. The valid number ranges from 2 to 8, inclusively.
     * @param digits Value for double
     */
    @JsonSetter("digits")
    public void setDigits(double digits) {
        this.digits = digits;
    }

    /**
     * Converts this TwoFactorCodeRequestSchema into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "TwoFactorCodeRequestSchema [" + "to=" + to + ", from=" + from + ", applicationId="
                + applicationId + ", message=" + message + ", digits=" + digits + ", scope=" + scope
                + "]";
    }

    /**
     * Builds a new {@link TwoFactorCodeRequestSchema.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link TwoFactorCodeRequestSchema.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder(to, from, applicationId, message, digits)
                .scope(getScope());
        return builder;
    }

    /**
     * Class to build instances of {@link TwoFactorCodeRequestSchema}.
     */
    public static class Builder {
        private String to;
        private String from;
        private String applicationId;
        private String message;
        private double digits;
        private String scope;

        /**
         * Initialization constructor.
         */
        public Builder() {
        }

        /**
         * Initialization constructor.
         * @param  to  String value for to.
         * @param  from  String value for from.
         * @param  applicationId  String value for applicationId.
         * @param  message  String value for message.
         * @param  digits  double value for digits.
         */
        public Builder(String to, String from, String applicationId, String message,
                double digits) {
            this.to = to;
            this.from = from;
            this.applicationId = applicationId;
            this.message = message;
            this.digits = digits;
        }

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

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

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

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

        /**
         * Setter for digits.
         * @param  digits  double value for digits.
         * @return Builder
         */
        public Builder digits(double digits) {
            this.digits = digits;
            return this;
        }

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

        /**
         * Builds a new {@link TwoFactorCodeRequestSchema} object using the set fields.
         * @return {@link TwoFactorCodeRequestSchema}
         */
        public TwoFactorCodeRequestSchema build() {
            return new TwoFactorCodeRequestSchema(to, from, applicationId, message, digits, scope);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy