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

com.bandwidth.voice.models.ApiCallResponse Maven / Gradle / Ivy

/*
 * BandwidthLib
 *
 * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
 */
package com.bandwidth.voice.models;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.bandwidth.DateTimeHelper;
import java.time.ZonedDateTime;

public class ApiCallResponse {
    /**
     * Default constructor
     */
    public ApiCallResponse() {
    }

    public ApiCallResponse(
            String callId,
            String applicationId,
            String to,
            String from,
            String callUrl,
            String answerUrl,
            AnswerMethodEnum answerMethod,
            DisconnectMethodEnum disconnectMethod,
            ZonedDateTime startTime,
            Double callTimeout,
            String disconnectUrl,
            String username,
            String password,
            String tag) {
        this.callId = callId;
        this.applicationId = applicationId;
        this.to = to;
        this.from = from;
        this.startTime = startTime;
        this.callUrl = callUrl;
        this.callTimeout = callTimeout;
        this.answerUrl = answerUrl;
        this.answerMethod = answerMethod;
        this.disconnectUrl = disconnectUrl;
        this.disconnectMethod = disconnectMethod;
        this.username = username;
        this.password = password;
        this.tag = tag;
    }

    private String callId;
    private String applicationId;
    private String to;
    private String from;
    private ZonedDateTime startTime;
    private String callUrl;
    private Double callTimeout;
    private String answerUrl;
    private AnswerMethodEnum answerMethod;
    private String disconnectUrl;
    private DisconnectMethodEnum disconnectMethod;
    private String username;
    private String password;
    private String tag;
    /**
     * Getter for CallId.
     */
    @JsonGetter("callId")
    public String getCallId() { 
        return this.callId;
    }
    /**
     * Setter for CallId.
     */
    @JsonSetter("callId")
    public void setCallId(String value) { 
        this.callId = value;
    }

    /**
     * Getter for ApplicationId.
     */
    @JsonGetter("applicationId")
    public String getApplicationId() { 
        return this.applicationId;
    }
    /**
     * Setter for ApplicationId.
     */
    @JsonSetter("applicationId")
    public void setApplicationId(String value) { 
        this.applicationId = value;
    }

    /**
     * Getter for To.
     */
    @JsonGetter("to")
    public String getTo() { 
        return this.to;
    }
    /**
     * Setter for To.
     */
    @JsonSetter("to")
    public void setTo(String value) { 
        this.to = value;
    }

    /**
     * Getter for From.
     */
    @JsonGetter("from")
    public String getFrom() { 
        return this.from;
    }
    /**
     * Setter for From.
     */
    @JsonSetter("from")
    public void setFrom(String value) { 
        this.from = value;
    }

    /**
     * Getter for StartTime.
     */
    @JsonGetter("startTime")
    @JsonSerialize(using=DateTimeHelper.Rfc8601DateTimeSerializer.class)
    public ZonedDateTime getStartTime() { 
        return this.startTime;
    }
    /**
     * Setter for StartTime.
     */
    @JsonSetter("startTime")
    @JsonDeserialize(using=DateTimeHelper.Rfc8601DateTimeDeserializer.class)
    public void setStartTime(ZonedDateTime value) { 
        this.startTime = value;
    }

    /**
     * Getter for CallUrl.
     */
    @JsonGetter("callUrl")
    public String getCallUrl() { 
        return this.callUrl;
    }
    /**
     * Setter for CallUrl.
     */
    @JsonSetter("callUrl")
    public void setCallUrl(String value) { 
        this.callUrl = value;
    }

    /**
     * Getter for CallTimeout.
     */
    @JsonGetter("callTimeout")
    public Double getCallTimeout() { 
        return this.callTimeout;
    }
    /**
     * Setter for CallTimeout.
     */
    @JsonSetter("callTimeout")
    public void setCallTimeout(Double value) { 
        this.callTimeout = value;
    }

    /**
     * Getter for AnswerUrl.
     */
    @JsonGetter("answerUrl")
    public String getAnswerUrl() { 
        return this.answerUrl;
    }
    /**
     * Setter for AnswerUrl.
     */
    @JsonSetter("answerUrl")
    public void setAnswerUrl(String value) { 
        this.answerUrl = value;
    }

    /**
     * Getter for AnswerMethod.
     */
    @JsonGetter("answerMethod")
    public AnswerMethodEnum getAnswerMethod() { 
        return this.answerMethod;
    }
    /**
     * Setter for AnswerMethod.
     */
    @JsonSetter("answerMethod")
    public void setAnswerMethod(AnswerMethodEnum value) { 
        this.answerMethod = value;
    }

    /**
     * Getter for DisconnectUrl.
     */
    @JsonGetter("disconnectUrl")
    public String getDisconnectUrl() { 
        return this.disconnectUrl;
    }
    /**
     * Setter for DisconnectUrl.
     */
    @JsonSetter("disconnectUrl")
    public void setDisconnectUrl(String value) { 
        this.disconnectUrl = value;
    }

    /**
     * Getter for DisconnectMethod.
     */
    @JsonGetter("disconnectMethod")
    public DisconnectMethodEnum getDisconnectMethod() { 
        return this.disconnectMethod;
    }
    /**
     * Setter for DisconnectMethod.
     */
    @JsonSetter("disconnectMethod")
    public void setDisconnectMethod(DisconnectMethodEnum value) { 
        this.disconnectMethod = value;
    }

    /**
     * Getter for Username.
     */
    @JsonGetter("username")
    public String getUsername() { 
        return this.username;
    }
    /**
     * Setter for Username.
     */
    @JsonSetter("username")
    public void setUsername(String value) { 
        this.username = value;
    }

    /**
     * Getter for Password.
     */
    @JsonGetter("password")
    public String getPassword() { 
        return this.password;
    }
    /**
     * Setter for Password.
     */
    @JsonSetter("password")
    public void setPassword(String value) { 
        this.password = value;
    }

    /**
     * Getter for Tag.
     */
    @JsonGetter("tag")
    public String getTag() { 
        return this.tag;
    }
    /**
     * Setter for Tag.
     */
    @JsonSetter("tag")
    public void setTag(String value) { 
        this.tag = value;
    }

 
    public Builder toBuilder() {
        Builder builder = new Builder(callId,
            applicationId,
            to,
            from,
            callUrl,
            answerUrl,
            answerMethod,
            disconnectMethod)
            .startTime(getStartTime())
            .callTimeout(getCallTimeout())
            .disconnectUrl(getDisconnectUrl())
            .username(getUsername())
            .password(getPassword())
            .tag(getTag());
            return builder;
    }

    public static class Builder {
        private String callId;
        private String applicationId;
        private String to;
        private String from;
        private String callUrl;
        private String answerUrl;
        private AnswerMethodEnum answerMethod;
        private DisconnectMethodEnum disconnectMethod;
        private ZonedDateTime startTime;
        private Double callTimeout;
        private String disconnectUrl;
        private String username;
        private String password;
        private String tag;

        public Builder() {
                    }

        public Builder(String callId,
                String applicationId,
                String to,
                String from,
                String callUrl,
                String answerUrl,
                AnswerMethodEnum answerMethod,
                DisconnectMethodEnum disconnectMethod) {
            this.callId = callId;
            this.applicationId = applicationId;
            this.to = to;
            this.from = from;
            this.callUrl = callUrl;
            this.answerUrl = answerUrl;
            this.answerMethod = answerMethod;
            this.disconnectMethod = disconnectMethod;
        }

        public Builder callId(String value) {
            callId = value;
            return this;
        }
        public Builder applicationId(String value) {
            applicationId = value;
            return this;
        }
        public Builder to(String value) {
            to = value;
            return this;
        }
        public Builder from(String value) {
            from = value;
            return this;
        }
        public Builder callUrl(String value) {
            callUrl = value;
            return this;
        }
        public Builder answerUrl(String value) {
            answerUrl = value;
            return this;
        }
        public Builder answerMethod(AnswerMethodEnum value) {
            answerMethod = value;
            return this;
        }
        public Builder disconnectMethod(DisconnectMethodEnum value) {
            disconnectMethod = value;
            return this;
        }
        public Builder startTime(ZonedDateTime value) {
            startTime = value;
            return this;
        }
        public Builder callTimeout(Double value) {
            callTimeout = value;
            return this;
        }
        public Builder disconnectUrl(String value) {
            disconnectUrl = value;
            return this;
        }
        public Builder username(String value) {
            username = value;
            return this;
        }
        public Builder password(String value) {
            password = value;
            return this;
        }
        public Builder tag(String value) {
            tag = value;
            return this;
        }

        public ApiCallResponse build() {
            return new ApiCallResponse(callId,
                applicationId,
                to,
                from,
                callUrl,
                answerUrl,
                answerMethod,
                disconnectMethod,
                startTime,
                callTimeout,
                disconnectUrl,
                username,
                password,
                tag);
        }
    }
}




© 2015 - 2026 Weber Informatics LLC | Privacy Policy