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

com.bandwidth.voice.models.CallState 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.DateTimeHelper;
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.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * This is a model class for CallState type.
 */
public class CallState {
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String callId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable parentCallId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String applicationId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String accountId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String to;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String from;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String direction;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String state;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable identity;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Map stirShaken;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime startTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime enqueuedTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable answerTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable endTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable disconnectCause;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable errorMessage;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable errorId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime lastUpdate;

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

    /**
     * Initialization constructor.
     * @param  callId  String value for callId.
     * @param  parentCallId  String value for parentCallId.
     * @param  applicationId  String value for applicationId.
     * @param  accountId  String value for accountId.
     * @param  to  String value for to.
     * @param  from  String value for from.
     * @param  direction  String value for direction.
     * @param  state  String value for state.
     * @param  identity  String value for identity.
     * @param  stirShaken  Map of String, value for stirShaken.
     * @param  startTime  LocalDateTime value for startTime.
     * @param  enqueuedTime LocalDateTime value for enqueuedTime.
     * @param  answerTime  LocalDateTime value for answerTime.
     * @param  endTime  LocalDateTime value for endTime.
     * @param  disconnectCause  String value for disconnectCause.
     * @param  errorMessage  String value for errorMessage.
     * @param  errorId  String value for errorId.
     * @param  lastUpdate  LocalDateTime value for lastUpdate.
     */
    public CallState(
            String callId,
            String parentCallId,
            String applicationId,
            String accountId,
            String to,
            String from,
            String direction,
            String state,
            String identity,
            Map stirShaken,
            LocalDateTime startTime,
            LocalDateTime enqueuedTime,
            LocalDateTime answerTime,
            LocalDateTime endTime,
            String disconnectCause,
            String errorMessage,
            String errorId,
            LocalDateTime lastUpdate) {
        this.callId = callId;
        this.parentCallId = OptionalNullable.of(parentCallId);
        this.applicationId = applicationId;
        this.accountId = accountId;
        this.to = to;
        this.from = from;
        this.direction = direction;
        this.state = state;
        this.identity = OptionalNullable.of(identity);
        this.stirShaken = stirShaken;
        this.startTime = startTime;
        this.enqueuedTime = enqueuedTime;
        this.answerTime = OptionalNullable.of(answerTime);
        this.endTime = OptionalNullable.of(endTime);
        this.disconnectCause = OptionalNullable.of(disconnectCause);
        this.errorMessage = OptionalNullable.of(errorMessage);
        this.errorId = OptionalNullable.of(errorId);
        this.lastUpdate = lastUpdate;
    }

    /**
     * Internal initialization constructor.
     */
    protected CallState(String callId, OptionalNullable parentCallId, String applicationId,
            String accountId, String to, String from, String direction, String state,
            OptionalNullable identity, Map stirShaken,
            LocalDateTime startTime, LocalDateTime enqueuedTime, OptionalNullable answerTime,
            OptionalNullable endTime, OptionalNullable disconnectCause,
            OptionalNullable errorMessage, OptionalNullable errorId,
            LocalDateTime lastUpdate) {
        this.callId = callId;
        this.parentCallId = parentCallId;
        this.applicationId = applicationId;
        this.accountId = accountId;
        this.to = to;
        this.from = from;
        this.direction = direction;
        this.state = state;
        this.identity = identity;
        this.stirShaken = stirShaken;
        this.startTime = startTime;
        this.enqueuedTime = enqueuedTime;
        this.answerTime = answerTime;
        this.endTime = endTime;
        this.disconnectCause = disconnectCause;
        this.errorMessage = errorMessage;
        this.errorId = errorId;
        this.lastUpdate = lastUpdate;
    }

    /**
     * Getter for CallId.
     * @return Returns the String
     */
    @JsonGetter("callId")
    public String getCallId() {
        return callId;
    }

    /**
     * Setter for CallId.
     * @param callId Value for String
     */
    @JsonSetter("callId")
    public void setCallId(String callId) {
        this.callId = callId;
    }

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

    /**
     * Getter for ParentCallId.
     * @return Returns the String
     */
    public String getParentCallId() {
        return OptionalNullable.getFrom(parentCallId);
    }

    /**
     * Setter for ParentCallId.
     * @param parentCallId Value for String
     */
    @JsonSetter("parentCallId")
    public void setParentCallId(String parentCallId) {
        this.parentCallId = OptionalNullable.of(parentCallId);
    }

    /**
     * UnSetter for ParentCallId.
     */
    public void unsetParentCallId() {
        parentCallId = null;
    }

    /**
     * Getter for ApplicationId.
     * @return Returns the String
     */
    @JsonGetter("applicationId")
    public String getApplicationId() {
        return applicationId;
    }

    /**
     * Setter for ApplicationId.
     * @param applicationId Value for String
     */
    @JsonSetter("applicationId")
    public void setApplicationId(String applicationId) {
        this.applicationId = applicationId;
    }

    /**
     * Getter for AccountId.
     * @return Returns the String
     */
    @JsonGetter("accountId")
    public String getAccountId() {
        return accountId;
    }

    /**
     * Setter for AccountId.
     * @param accountId Value for String
     */
    @JsonSetter("accountId")
    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    /**
     * Getter for To.
     * @return Returns the String
     */
    @JsonGetter("to")
    public String getTo() {
        return to;
    }

    /**
     * Setter for To.
     * @param to Value for String
     */
    @JsonSetter("to")
    public void setTo(String to) {
        this.to = to;
    }

    /**
     * Getter for From.
     * @return Returns the String
     */
    @JsonGetter("from")
    public String getFrom() {
        return from;
    }

    /**
     * Setter for From.
     * @param from Value for String
     */
    @JsonSetter("from")
    public void setFrom(String from) {
        this.from = from;
    }

    /**
     * Getter for Direction.
     * @return Returns the String
     */
    @JsonGetter("direction")
    public String getDirection() {
        return direction;
    }

    /**
     * Setter for Direction.
     * @param direction Value for String
     */
    @JsonSetter("direction")
    public void setDirection(String direction) {
        this.direction = direction;
    }

    /**
     * Getter for State.
     * The current state of the call. Current possible values are 'initiated', 'answered' and
     * 'disconnected'. Additional states may be added in the future, so your application must be
     * tolerant of unknown values.
     * @return Returns the String
     */
    @JsonGetter("state")
    public String getState() {
        return state;
    }

    /**
     * Setter for State.
     * The current state of the call. Current possible values are 'initiated', 'answered' and
     * 'disconnected'. Additional states may be added in the future, so your application must be
     * tolerant of unknown values.
     * @param state Value for String
     */
    @JsonSetter("state")
    public void setState(String state) {
        this.state = state;
    }

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

    /**
     * Getter for Identity.
     * @return Returns the String
     */
    public String getIdentity() {
        return OptionalNullable.getFrom(identity);
    }

    /**
     * Setter for Identity.
     * @param identity Value for String
     */
    @JsonSetter("identity")
    public void setIdentity(String identity) {
        this.identity = OptionalNullable.of(identity);
    }

    /**
     * UnSetter for Identity.
     */
    public void unsetIdentity() {
        identity = null;
    }

    /**
     * Getter for StirShaken.
     * @return Returns the Map of String, String
     */
    @JsonGetter("stirShaken")
    public Map getStirShaken() {
        return stirShaken;
    }

    /**
     * Setter for StirShaken.
     * @param stirShaken Value for Map of String, String
     */
    @JsonSetter("stirShaken")
    public void setStirShaken(Map stirShaken) {
        this.stirShaken = stirShaken;
    }

    /**
     * Getter for StartTime.
     * @return Returns the LocalDateTime
     */
    @JsonGetter("startTime")
    @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class)
    public LocalDateTime getStartTime() {
        return startTime;
    }

    /**
     * Getter for EnqueuedTime
     * @return Returns the LocalDateTime
     */
    @JsonGetter("enqueuedTime")
    @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class)
    public LocalDateTime getEnqueuedTime() { return enqueuedTime; }

    /**
     * Setter for StartTime.
     * @param startTime Value for LocalDateTime
     */
    @JsonSetter("startTime")
    @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class)
    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    /**
     * Setter for EnqueuedTime.
     * @param enqueuedTime Value for LocalDateTime
     */
    @JsonSetter("enqueuedTime")
    @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class)
    public void setEnqueuedTime(LocalDateTime enqueuedTime) {
        this.enqueuedTime = enqueuedTime;
    }

    /**
     * Internal Getter for AnswerTime.
     * @return Returns the Internal LocalDateTime
     */
    @JsonGetter("answerTime")
    @JsonSerialize(using = OptionalNullable.Rfc8601DateTimeSerializer.class)
    protected OptionalNullable internalGetAnswerTime() {
        return this.answerTime;
    }

    /**
     * Getter for AnswerTime.
     * @return Returns the LocalDateTime
     */
    public LocalDateTime getAnswerTime() {
        return OptionalNullable.getFrom(answerTime);
    }

    /**
     * Setter for AnswerTime.
     * @param answerTime Value for LocalDateTime
     */
    @JsonSetter("answerTime")
    @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class)
    public void setAnswerTime(LocalDateTime answerTime) {
        this.answerTime = OptionalNullable.of(answerTime);
    }

    /**
     * UnSetter for AnswerTime.
     */
    public void unsetAnswerTime() {
        answerTime = null;
    }

    /**
     * Internal Getter for EndTime.
     * @return Returns the Internal LocalDateTime
     */
    @JsonGetter("endTime")
    @JsonSerialize(using = OptionalNullable.Rfc8601DateTimeSerializer.class)
    protected OptionalNullable internalGetEndTime() {
        return this.endTime;
    }

    /**
     * Getter for EndTime.
     * @return Returns the LocalDateTime
     */
    public LocalDateTime getEndTime() {
        return OptionalNullable.getFrom(endTime);
    }

    /**
     * Setter for EndTime.
     * @param endTime Value for LocalDateTime
     */
    @JsonSetter("endTime")
    @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class)
    public void setEndTime(LocalDateTime endTime) {
        this.endTime = OptionalNullable.of(endTime);
    }

    /**
     * UnSetter for EndTime.
     */
    public void unsetEndTime() {
        endTime = null;
    }

    /**
     * Internal Getter for DisconnectCause.
     * The reason the call was disconnected, or null if the call is still active. Current values are
     * 'cancel', 'timeout', 'busy', 'rejected', 'hangup', 'invalid-bxml', 'callback-error',
     * 'application-error', 'error', 'account-limit', 'node-capacity-exceeded' and 'unknown'.
     * Additional causes may be added in the future, so your application must be tolerant of unknown
     * values.
     * @return Returns the Internal String
     */
    @JsonGetter("disconnectCause")
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetDisconnectCause() {
        return this.disconnectCause;
    }

    /**
     * Getter for DisconnectCause.
     * The reason the call was disconnected, or null if the call is still active. Current values are
     * 'cancel', 'timeout', 'busy', 'rejected', 'hangup', 'invalid-bxml', 'callback-error',
     * 'application-error', 'error', 'account-limit', 'node-capacity-exceeded' and 'unknown'.
     * Additional causes may be added in the future, so your application must be tolerant of unknown
     * values.
     * @return Returns the String
     */
    public String getDisconnectCause() {
        return OptionalNullable.getFrom(disconnectCause);
    }

    /**
     * Setter for DisconnectCause.
     * The reason the call was disconnected, or null if the call is still active. Current values are
     * 'cancel', 'timeout', 'busy', 'rejected', 'hangup', 'invalid-bxml', 'callback-error',
     * 'application-error', 'error', 'account-limit', 'node-capacity-exceeded' and 'unknown'.
     * Additional causes may be added in the future, so your application must be tolerant of unknown
     * values.
     * @param disconnectCause Value for String
     */
    @JsonSetter("disconnectCause")
    public void setDisconnectCause(String disconnectCause) {
        this.disconnectCause = OptionalNullable.of(disconnectCause);
    }

    /**
     * UnSetter for DisconnectCause.
     * The reason the call was disconnected, or null if the call is still active. Current values are
     * 'cancel', 'timeout', 'busy', 'rejected', 'hangup', 'invalid-bxml', 'callback-error',
     * 'application-error', 'error', 'account-limit', 'node-capacity-exceeded' and 'unknown'.
     * Additional causes may be added in the future, so your application must be tolerant of unknown
     * values.
     */
    public void unsetDisconnectCause() {
        disconnectCause = null;
    }

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

    /**
     * Getter for ErrorMessage.
     * @return Returns the String
     */
    public String getErrorMessage() {
        return OptionalNullable.getFrom(errorMessage);
    }

    /**
     * Setter for ErrorMessage.
     * @param errorMessage Value for String
     */
    @JsonSetter("errorMessage")
    public void setErrorMessage(String errorMessage) {
        this.errorMessage = OptionalNullable.of(errorMessage);
    }

    /**
     * UnSetter for ErrorMessage.
     */
    public void unsetErrorMessage() {
        errorMessage = null;
    }

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

    /**
     * Getter for ErrorId.
     * @return Returns the String
     */
    public String getErrorId() {
        return OptionalNullable.getFrom(errorId);
    }

    /**
     * Setter for ErrorId.
     * @param errorId Value for String
     */
    @JsonSetter("errorId")
    public void setErrorId(String errorId) {
        this.errorId = OptionalNullable.of(errorId);
    }

    /**
     * UnSetter for ErrorId.
     */
    public void unsetErrorId() {
        errorId = null;
    }

    /**
     * Getter for LastUpdate.
     * @return Returns the LocalDateTime
     */
    @JsonGetter("lastUpdate")
    @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class)
    public LocalDateTime getLastUpdate() {
        return lastUpdate;
    }

    /**
     * Setter for LastUpdate.
     * @param lastUpdate Value for LocalDateTime
     */
    @JsonSetter("lastUpdate")
    @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class)
    public void setLastUpdate(LocalDateTime lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    /**
     * Converts this CallState into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "CallState [" + "callId=" + callId + ", parentCallId=" + parentCallId
                + ", applicationId=" + applicationId + ", accountId=" + accountId + ", to=" + to
                + ", from=" + from + ", direction=" + direction + ", state=" + state + ", identity="
                + identity + ", stirShaken=" + stirShaken + ", startTime=" + startTime + ", enqueuedTime=" + enqueuedTime
                + ", answerTime=" + answerTime + ", endTime=" + endTime + ", disconnectCause="
                + disconnectCause + ", errorMessage=" + errorMessage + ", errorId=" + errorId
                + ", lastUpdate=" + lastUpdate + "]";
    }

    /**
     * Builds a new {@link CallState.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link CallState.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .callId(getCallId())
                .applicationId(getApplicationId())
                .accountId(getAccountId())
                .to(getTo())
                .from(getFrom())
                .direction(getDirection())
                .state(getState())
                .stirShaken(getStirShaken())
                .startTime(getStartTime())
                .enqueuedTime(getEnqueuedTime())
                .lastUpdate(getLastUpdate());
        builder.parentCallId = internalGetParentCallId();
        builder.identity = internalGetIdentity();
        builder.answerTime = internalGetAnswerTime();
        builder.endTime = internalGetEndTime();
        builder.disconnectCause = internalGetDisconnectCause();
        builder.errorMessage = internalGetErrorMessage();
        builder.errorId = internalGetErrorId();
        return builder;
    }

    /**
     * Class to build instances of {@link CallState}.
     */
    public static class Builder {
        private String callId;
        private OptionalNullable parentCallId;
        private String applicationId;
        private String accountId;
        private String to;
        private String from;
        private String direction;
        private String state;
        private OptionalNullable identity;
        private Map stirShaken;
        private LocalDateTime startTime;
        private LocalDateTime enqueuedTime;
        private OptionalNullable answerTime;
        private OptionalNullable endTime;
        private OptionalNullable disconnectCause;
        private OptionalNullable errorMessage;
        private OptionalNullable errorId;
        private LocalDateTime lastUpdate;



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

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

        /**
         * UnSetter for parentCallId.
         * @return Builder
         */
        public Builder unsetParentCallId() {
            parentCallId = null;
            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 accountId.
         * @param  accountId  String value for accountId.
         * @return Builder
         */
        public Builder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /**
         * Builds a new {@link CallState} object using the set fields.
         * @return {@link CallState}
         */
        public CallState build() {
            return new CallState(callId, parentCallId, applicationId, accountId, to, from,
                    direction, state, identity, stirShaken, startTime, enqueuedTime, answerTime, endTime,
                    disconnectCause, errorMessage, errorId, lastUpdate);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy