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

com.bandwidth.multifactorauth.models.TwoFactorVerifyRequestSchema 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.1
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 TwoFactorVerifyRequestSchema type.
 */
public class TwoFactorVerifyRequestSchema {
    private String to;
    private String applicationId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String scope;
    private double expirationTimeInMinutes;
    private String code;

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

    /**
     * Initialization constructor.
     * @param  to  String value for to.
     * @param  applicationId  String value for applicationId.
     * @param  expirationTimeInMinutes  double value for expirationTimeInMinutes.
     * @param  code  String value for code.
     * @param  scope  String value for scope.
     */
    public TwoFactorVerifyRequestSchema(
            String to,
            String applicationId,
            double expirationTimeInMinutes,
            String code,
            String scope) {
        this.to = to;
        this.applicationId = applicationId;
        this.scope = scope;
        this.expirationTimeInMinutes = expirationTimeInMinutes;
        this.code = code;
    }

    /**
     * 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 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 ExpirationTimeInMinutes.
     * The time period, in minutes, to validate the 2fa code. By setting this to 3 minutes, it will
     * mean any code generated within the last 3 minutes are still valid. The valid range for
     * expiration time is between 0 and 15 minutes, exclusively and inclusively, respectively.
     * @return Returns the double
     */
    @JsonGetter("expirationTimeInMinutes")
    public double getExpirationTimeInMinutes() {
        return expirationTimeInMinutes;
    }

    /**
     * Setter for ExpirationTimeInMinutes.
     * The time period, in minutes, to validate the 2fa code. By setting this to 3 minutes, it will
     * mean any code generated within the last 3 minutes are still valid. The valid range for
     * expiration time is between 0 and 15 minutes, exclusively and inclusively, respectively.
     * @param expirationTimeInMinutes Value for double
     */
    @JsonSetter("expirationTimeInMinutes")
    public void setExpirationTimeInMinutes(double expirationTimeInMinutes) {
        this.expirationTimeInMinutes = expirationTimeInMinutes;
    }

    /**
     * Getter for Code.
     * The generated 2fa code to check if valid
     * @return Returns the String
     */
    @JsonGetter("code")
    public String getCode() {
        return code;
    }

    /**
     * Setter for Code.
     * The generated 2fa code to check if valid
     * @param code Value for String
     */
    @JsonSetter("code")
    public void setCode(String code) {
        this.code = code;
    }

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

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

    /**
     * Class to build instances of {@link TwoFactorVerifyRequestSchema}.
     */
    public static class Builder {
        private String to;
        private String applicationId;
        private double expirationTimeInMinutes;
        private String code;
        private String scope;

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

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

        /**
         * Setter for to.
         * @param  to  String value for to.
         * @return Builder
         */
        public Builder to(String to) {
            this.to = to;
            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 expirationTimeInMinutes.
         * @param  expirationTimeInMinutes  double value for expirationTimeInMinutes.
         * @return Builder
         */
        public Builder expirationTimeInMinutes(double expirationTimeInMinutes) {
            this.expirationTimeInMinutes = expirationTimeInMinutes;
            return this;
        }

        /**
         * Setter for code.
         * @param  code  String value for code.
         * @return Builder
         */
        public Builder code(String code) {
            this.code = code;
            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 TwoFactorVerifyRequestSchema} object using the set fields.
         * @return {@link TwoFactorVerifyRequestSchema}
         */
        public TwoFactorVerifyRequestSchema build() {
            return new TwoFactorVerifyRequestSchema(to, applicationId, expirationTimeInMinutes,
                    code, scope);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy