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

com.bandwidth.voice.models.ModifyCallRequest 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.voice.models;

import com.bandwidth.internal.OptionalNullable;
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;

/**
 * This is a model class for ModifyCallRequest type.
 */
public class ModifyCallRequest {
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable state;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable redirectUrl;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable redirectFallbackUrl;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable redirectMethod;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable redirectFallbackMethod;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable username;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable password;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable fallbackUsername;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable fallbackPassword;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable tag;

    /**
     * Default constructor.
     */
    public ModifyCallRequest() {
        state = OptionalNullable.of(StateEnum.ACTIVE);
    }

    /**
     * Initialization constructor.
     * @param  state  StateEnum value for state.
     * @param  redirectUrl  String value for redirectUrl.
     * @param  redirectFallbackUrl  String value for redirectFallbackUrl.
     * @param  redirectMethod  RedirectMethodEnum value for redirectMethod.
     * @param  redirectFallbackMethod  RedirectFallbackMethodEnum value for redirectFallbackMethod.
     * @param  username  String value for username.
     * @param  password  String value for password.
     * @param  fallbackUsername  String value for fallbackUsername.
     * @param  fallbackPassword  String value for fallbackPassword.
     * @param  tag  String value for tag.
     */
    public ModifyCallRequest(
            StateEnum state,
            String redirectUrl,
            String redirectFallbackUrl,
            RedirectMethodEnum redirectMethod,
            RedirectFallbackMethodEnum redirectFallbackMethod,
            String username,
            String password,
            String fallbackUsername,
            String fallbackPassword,
            String tag) {
        this.state = OptionalNullable.of(state);
        this.redirectUrl = OptionalNullable.of(redirectUrl);
        this.redirectFallbackUrl = OptionalNullable.of(redirectFallbackUrl);
        this.redirectMethod = OptionalNullable.of(redirectMethod);
        this.redirectFallbackMethod = OptionalNullable.of(redirectFallbackMethod);
        this.username = OptionalNullable.of(username);
        this.password = OptionalNullable.of(password);
        this.fallbackUsername = OptionalNullable.of(fallbackUsername);
        this.fallbackPassword = OptionalNullable.of(fallbackPassword);
        this.tag = OptionalNullable.of(tag);
    }

    /**
     * Internal initialization constructor.
     */
    protected ModifyCallRequest(OptionalNullable state,
            OptionalNullable redirectUrl, OptionalNullable redirectFallbackUrl,
            OptionalNullable redirectMethod,
            OptionalNullable redirectFallbackMethod,
            OptionalNullable username, OptionalNullable password,
            OptionalNullable fallbackUsername, OptionalNullable fallbackPassword,
            OptionalNullable tag) {
        this.state = state;
        this.redirectUrl = redirectUrl;
        this.redirectFallbackUrl = redirectFallbackUrl;
        this.redirectMethod = redirectMethod;
        this.redirectFallbackMethod = redirectFallbackMethod;
        this.username = username;
        this.password = password;
        this.fallbackUsername = fallbackUsername;
        this.fallbackPassword = fallbackPassword;
        this.tag = tag;
    }

    /**
     * Internal Getter for State.
     * @return Returns the Internal StateEnum
     */
    @JsonGetter("state")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetState() {
        return this.state;
    }

    /**
     * Getter for State.
     * @return Returns the StateEnum
     */
    public StateEnum getState() {
        return OptionalNullable.getFrom(state);
    }

    /**
     * Setter for State.
     * @param state Value for StateEnum
     */
    @JsonSetter("state")
    public void setState(StateEnum state) {
        this.state = OptionalNullable.of(state);
    }

    /**
     * UnSetter for State.
     */
    public void unsetState() {
        state = null;
    }

    /**
     * Internal Getter for RedirectUrl.
     * Required if state is 'active'
     * @return Returns the Internal String
     */
    @JsonGetter("redirectUrl")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetRedirectUrl() {
        return this.redirectUrl;
    }

    /**
     * Getter for RedirectUrl.
     * Required if state is 'active'
     * @return Returns the String
     */
    public String getRedirectUrl() {
        return OptionalNullable.getFrom(redirectUrl);
    }

    /**
     * Setter for RedirectUrl.
     * Required if state is 'active'
     * @param redirectUrl Value for String
     */
    @JsonSetter("redirectUrl")
    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = OptionalNullable.of(redirectUrl);
    }

    /**
     * UnSetter for RedirectUrl.
     * Required if state is 'active'
     */
    public void unsetRedirectUrl() {
        redirectUrl = null;
    }

    /**
     * Internal Getter for RedirectFallbackUrl.
     * @return Returns the Internal String
     */
    @JsonGetter("redirectFallbackUrl")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetRedirectFallbackUrl() {
        return this.redirectFallbackUrl;
    }

    /**
     * Getter for RedirectFallbackUrl.
     * @return Returns the String
     */
    public String getRedirectFallbackUrl() {
        return OptionalNullable.getFrom(redirectFallbackUrl);
    }

    /**
     * Setter for RedirectFallbackUrl.
     * @param redirectFallbackUrl Value for String
     */
    @JsonSetter("redirectFallbackUrl")
    public void setRedirectFallbackUrl(String redirectFallbackUrl) {
        this.redirectFallbackUrl = OptionalNullable.of(redirectFallbackUrl);
    }

    /**
     * UnSetter for RedirectFallbackUrl.
     */
    public void unsetRedirectFallbackUrl() {
        redirectFallbackUrl = null;
    }

    /**
     * Internal Getter for RedirectMethod.
     * @return Returns the Internal RedirectMethodEnum
     */
    @JsonGetter("redirectMethod")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetRedirectMethod() {
        return this.redirectMethod;
    }

    /**
     * Getter for RedirectMethod.
     * @return Returns the RedirectMethodEnum
     */
    public RedirectMethodEnum getRedirectMethod() {
        return OptionalNullable.getFrom(redirectMethod);
    }

    /**
     * Setter for RedirectMethod.
     * @param redirectMethod Value for RedirectMethodEnum
     */
    @JsonSetter("redirectMethod")
    public void setRedirectMethod(RedirectMethodEnum redirectMethod) {
        this.redirectMethod = OptionalNullable.of(redirectMethod);
    }

    /**
     * UnSetter for RedirectMethod.
     */
    public void unsetRedirectMethod() {
        redirectMethod = null;
    }

    /**
     * Internal Getter for RedirectFallbackMethod.
     * @return Returns the Internal RedirectFallbackMethodEnum
     */
    @JsonGetter("redirectFallbackMethod")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetRedirectFallbackMethod() {
        return this.redirectFallbackMethod;
    }

    /**
     * Getter for RedirectFallbackMethod.
     * @return Returns the RedirectFallbackMethodEnum
     */
    public RedirectFallbackMethodEnum getRedirectFallbackMethod() {
        return OptionalNullable.getFrom(redirectFallbackMethod);
    }

    /**
     * Setter for RedirectFallbackMethod.
     * @param redirectFallbackMethod Value for RedirectFallbackMethodEnum
     */
    @JsonSetter("redirectFallbackMethod")
    public void setRedirectFallbackMethod(RedirectFallbackMethodEnum redirectFallbackMethod) {
        this.redirectFallbackMethod = OptionalNullable.of(redirectFallbackMethod);
    }

    /**
     * UnSetter for RedirectFallbackMethod.
     */
    public void unsetRedirectFallbackMethod() {
        redirectFallbackMethod = null;
    }

    /**
     * Internal Getter for Username.
     * @return Returns the Internal String
     */
    @JsonGetter("username")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetUsername() {
        return this.username;
    }

    /**
     * Getter for Username.
     * @return Returns the String
     */
    public String getUsername() {
        return OptionalNullable.getFrom(username);
    }

    /**
     * Setter for Username.
     * @param username Value for String
     */
    @JsonSetter("username")
    public void setUsername(String username) {
        this.username = OptionalNullable.of(username);
    }

    /**
     * UnSetter for Username.
     */
    public void unsetUsername() {
        username = null;
    }

    /**
     * Internal Getter for Password.
     * @return Returns the Internal String
     */
    @JsonGetter("password")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetPassword() {
        return this.password;
    }

    /**
     * Getter for Password.
     * @return Returns the String
     */
    public String getPassword() {
        return OptionalNullable.getFrom(password);
    }

    /**
     * Setter for Password.
     * @param password Value for String
     */
    @JsonSetter("password")
    public void setPassword(String password) {
        this.password = OptionalNullable.of(password);
    }

    /**
     * UnSetter for Password.
     */
    public void unsetPassword() {
        password = null;
    }

    /**
     * Internal Getter for FallbackUsername.
     * @return Returns the Internal String
     */
    @JsonGetter("fallbackUsername")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetFallbackUsername() {
        return this.fallbackUsername;
    }

    /**
     * Getter for FallbackUsername.
     * @return Returns the String
     */
    public String getFallbackUsername() {
        return OptionalNullable.getFrom(fallbackUsername);
    }

    /**
     * Setter for FallbackUsername.
     * @param fallbackUsername Value for String
     */
    @JsonSetter("fallbackUsername")
    public void setFallbackUsername(String fallbackUsername) {
        this.fallbackUsername = OptionalNullable.of(fallbackUsername);
    }

    /**
     * UnSetter for FallbackUsername.
     */
    public void unsetFallbackUsername() {
        fallbackUsername = null;
    }

    /**
     * Internal Getter for FallbackPassword.
     * @return Returns the Internal String
     */
    @JsonGetter("fallbackPassword")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetFallbackPassword() {
        return this.fallbackPassword;
    }

    /**
     * Getter for FallbackPassword.
     * @return Returns the String
     */
    public String getFallbackPassword() {
        return OptionalNullable.getFrom(fallbackPassword);
    }

    /**
     * Setter for FallbackPassword.
     * @param fallbackPassword Value for String
     */
    @JsonSetter("fallbackPassword")
    public void setFallbackPassword(String fallbackPassword) {
        this.fallbackPassword = OptionalNullable.of(fallbackPassword);
    }

    /**
     * UnSetter for FallbackPassword.
     */
    public void unsetFallbackPassword() {
        fallbackPassword = null;
    }

    /**
     * Internal Getter for Tag.
     * @return Returns the Internal String
     */
    @JsonGetter("tag")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetTag() {
        return this.tag;
    }

    /**
     * Getter for Tag.
     * @return Returns the String
     */
    public String getTag() {
        return OptionalNullable.getFrom(tag);
    }

    /**
     * Setter for Tag.
     * @param tag Value for String
     */
    @JsonSetter("tag")
    public void setTag(String tag) {
        this.tag = OptionalNullable.of(tag);
    }

    /**
     * UnSetter for Tag.
     */
    public void unsetTag() {
        tag = null;
    }

    /**
     * Converts this ModifyCallRequest into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "ModifyCallRequest [" + "state=" + state + ", redirectUrl=" + redirectUrl
                + ", redirectFallbackUrl=" + redirectFallbackUrl + ", redirectMethod="
                + redirectMethod + ", redirectFallbackMethod=" + redirectFallbackMethod
                + ", username=" + username + ", password=" + password + ", fallbackUsername="
                + fallbackUsername + ", fallbackPassword=" + fallbackPassword + ", tag=" + tag
                + "]";
    }

    /**
     * Builds a new {@link ModifyCallRequest.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link ModifyCallRequest.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder();
        builder.state = internalGetState();
        builder.redirectUrl = internalGetRedirectUrl();
        builder.redirectFallbackUrl = internalGetRedirectFallbackUrl();
        builder.redirectMethod = internalGetRedirectMethod();
        builder.redirectFallbackMethod = internalGetRedirectFallbackMethod();
        builder.username = internalGetUsername();
        builder.password = internalGetPassword();
        builder.fallbackUsername = internalGetFallbackUsername();
        builder.fallbackPassword = internalGetFallbackPassword();
        builder.tag = internalGetTag();
        return builder;
    }

    /**
     * Class to build instances of {@link ModifyCallRequest}.
     */
    public static class Builder {
        private OptionalNullable state = OptionalNullable.of(StateEnum.ACTIVE);
        private OptionalNullable redirectUrl;
        private OptionalNullable redirectFallbackUrl;
        private OptionalNullable redirectMethod;
        private OptionalNullable redirectFallbackMethod;
        private OptionalNullable username;
        private OptionalNullable password;
        private OptionalNullable fallbackUsername;
        private OptionalNullable fallbackPassword;
        private OptionalNullable tag;



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /**
         * Builds a new {@link ModifyCallRequest} object using the set fields.
         * @return {@link ModifyCallRequest}
         */
        public ModifyCallRequest build() {
            return new ModifyCallRequest(state, redirectUrl, redirectFallbackUrl, redirectMethod,
                    redirectFallbackMethod, username, password, fallbackUsername, fallbackPassword,
                    tag);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy