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

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

/**
 * This is a model class for CallRecordingMetadata type.
 */
public class CallRecordingMetadata {
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String applicationId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String accountId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String callId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private OptionalNullable parentCallId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String recordingId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String to;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String from;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String transferCallerId;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String transferTo;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String duration;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private DirectionEnum direction;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer channels;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime startTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime endTime;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private FileFormatEnum fileFormat;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String status;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String mediaUrl;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private TranscriptionMetadata transcription;

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

    /**
     * Initialization constructor.
     * @param  applicationId  String value for applicationId.
     * @param  accountId  String value for accountId.
     * @param  callId  String value for callId.
     * @param  parentCallId  String value for parentCallId.
     * @param  recordingId  String value for recordingId.
     * @param  to  String value for to.
     * @param  from  String value for from.
     * @param  transferCallerId  String value for transferCallerId.
     * @param  transferTo  String value for transferTo.
     * @param  duration  String value for duration.
     * @param  direction  DirectionEnum value for direction.
     * @param  channels  Integer value for channels.
     * @param  startTime  LocalDateTime value for startTime.
     * @param  endTime  LocalDateTime value for endTime.
     * @param  fileFormat  FileFormatEnum value for fileFormat.
     * @param  status  String value for status.
     * @param  mediaUrl  String value for mediaUrl.
     * @param  transcription  TranscriptionMetadata value for transcription.
     */
    public CallRecordingMetadata(
            String applicationId,
            String accountId,
            String callId,
            String parentCallId,
            String recordingId,
            String to,
            String from,
            String transferCallerId,
            String transferTo,
            String duration,
            DirectionEnum direction,
            Integer channels,
            LocalDateTime startTime,
            LocalDateTime endTime,
            FileFormatEnum fileFormat,
            String status,
            String mediaUrl,
            TranscriptionMetadata transcription) {
        this.applicationId = applicationId;
        this.accountId = accountId;
        this.callId = callId;
        this.parentCallId = OptionalNullable.of(parentCallId);
        this.recordingId = recordingId;
        this.to = to;
        this.from = from;
        this.transferCallerId = transferCallerId;
        this.transferTo = transferTo;
        this.duration = duration;
        this.direction = direction;
        this.channels = channels;
        this.startTime = startTime;
        this.endTime = endTime;
        this.fileFormat = fileFormat;
        this.status = status;
        this.mediaUrl = mediaUrl;
        this.transcription = transcription;
    }

    /**
     * Internal initialization constructor.
     */
    protected CallRecordingMetadata(String applicationId, String accountId, String callId,
            OptionalNullable parentCallId, String recordingId, String to, String from,
            String transferCallerId, String transferTo, String duration, DirectionEnum direction,
            Integer channels, LocalDateTime startTime, LocalDateTime endTime,
            FileFormatEnum fileFormat, String status, String mediaUrl,
            TranscriptionMetadata transcription) {
        this.applicationId = applicationId;
        this.accountId = accountId;
        this.callId = callId;
        this.parentCallId = parentCallId;
        this.recordingId = recordingId;
        this.to = to;
        this.from = from;
        this.transferCallerId = transferCallerId;
        this.transferTo = transferTo;
        this.duration = duration;
        this.direction = direction;
        this.channels = channels;
        this.startTime = startTime;
        this.endTime = endTime;
        this.fileFormat = fileFormat;
        this.status = status;
        this.mediaUrl = mediaUrl;
        this.transcription = transcription;
    }

    /**
     * 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 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 RecordingId.
     * @return Returns the String
     */
    @JsonGetter("recordingId")
    public String getRecordingId() {
        return recordingId;
    }

    /**
     * Setter for RecordingId.
     * @param recordingId Value for String
     */
    @JsonSetter("recordingId")
    public void setRecordingId(String recordingId) {
        this.recordingId = recordingId;
    }

    /**
     * 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 TransferCallerId.
     * @return Returns the String
     */
    @JsonGetter("transferCallerId")
    public String getTransferCallerId() {
        return transferCallerId;
    }

    /**
     * Setter for TransferCallerId.
     * @param transferCallerId Value for String
     */
    @JsonSetter("transferCallerId")
    public void setTransferCallerId(String transferCallerId) {
        this.transferCallerId = transferCallerId;
    }

    /**
     * Getter for TransferTo.
     * @return Returns the String
     */
    @JsonGetter("transferTo")
    public String getTransferTo() {
        return transferTo;
    }

    /**
     * Setter for TransferTo.
     * @param transferTo Value for String
     */
    @JsonSetter("transferTo")
    public void setTransferTo(String transferTo) {
        this.transferTo = transferTo;
    }

    /**
     * Getter for Duration.
     * Format is ISO-8601
     * @return Returns the String
     */
    @JsonGetter("duration")
    public String getDuration() {
        return duration;
    }

    /**
     * Setter for Duration.
     * Format is ISO-8601
     * @param duration Value for String
     */
    @JsonSetter("duration")
    public void setDuration(String duration) {
        this.duration = duration;
    }

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

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

    /**
     * Getter for Channels.
     * @return Returns the Integer
     */
    @JsonGetter("channels")
    public Integer getChannels() {
        return channels;
    }

    /**
     * Setter for Channels.
     * @param channels Value for Integer
     */
    @JsonSetter("channels")
    public void setChannels(Integer channels) {
        this.channels = channels;
    }

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

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

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

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

    /**
     * Getter for FileFormat.
     * @return Returns the FileFormatEnum
     */
    @JsonGetter("fileFormat")
    public FileFormatEnum getFileFormat() {
        return fileFormat;
    }

    /**
     * Setter for FileFormat.
     * @param fileFormat Value for FileFormatEnum
     */
    @JsonSetter("fileFormat")
    public void setFileFormat(FileFormatEnum fileFormat) {
        this.fileFormat = fileFormat;
    }

    /**
     * Getter for Status.
     * The current status of the recording. Current values are 'processing', 'partial', 'complete',
     * 'deleted' and 'error'. Additional states may be added in the future, so your application must
     * be tolerant of unknown values.
     * @return Returns the String
     */
    @JsonGetter("status")
    public String getStatus() {
        return status;
    }

    /**
     * Setter for Status.
     * The current status of the recording. Current values are 'processing', 'partial', 'complete',
     * 'deleted' and 'error'. Additional states may be added in the future, so your application must
     * be tolerant of unknown values.
     * @param status Value for String
     */
    @JsonSetter("status")
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * Getter for MediaUrl.
     * @return Returns the String
     */
    @JsonGetter("mediaUrl")
    public String getMediaUrl() {
        return mediaUrl;
    }

    /**
     * Setter for MediaUrl.
     * @param mediaUrl Value for String
     */
    @JsonSetter("mediaUrl")
    public void setMediaUrl(String mediaUrl) {
        this.mediaUrl = mediaUrl;
    }

    /**
     * Getter for Transcription.
     * @return Returns the TranscriptionMetadata
     */
    @JsonGetter("transcription")
    public TranscriptionMetadata getTranscription() {
        return transcription;
    }

    /**
     * Setter for Transcription.
     * @param transcription Value for TranscriptionMetadata
     */
    @JsonSetter("transcription")
    public void setTranscription(TranscriptionMetadata transcription) {
        this.transcription = transcription;
    }

    /**
     * Converts this CallRecordingMetadata into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "CallRecordingMetadata [" + "applicationId=" + applicationId + ", accountId="
                + accountId + ", callId=" + callId + ", parentCallId=" + parentCallId
                + ", recordingId=" + recordingId + ", to=" + to + ", from=" + from
                + ", transferCallerId=" + transferCallerId + ", transferTo=" + transferTo
                + ", duration=" + duration + ", direction=" + direction + ", channels=" + channels
                + ", startTime=" + startTime + ", endTime=" + endTime + ", fileFormat=" + fileFormat
                + ", status=" + status + ", mediaUrl=" + mediaUrl + ", transcription="
                + transcription + "]";
    }

    /**
     * Builds a new {@link CallRecordingMetadata.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link CallRecordingMetadata.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .applicationId(getApplicationId())
                .accountId(getAccountId())
                .callId(getCallId())
                .recordingId(getRecordingId())
                .to(getTo())
                .from(getFrom())
                .transferCallerId(getTransferCallerId())
                .transferTo(getTransferTo())
                .duration(getDuration())
                .direction(getDirection())
                .channels(getChannels())
                .startTime(getStartTime())
                .endTime(getEndTime())
                .fileFormat(getFileFormat())
                .status(getStatus())
                .mediaUrl(getMediaUrl())
                .transcription(getTranscription());
        builder.parentCallId = internalGetParentCallId();
        return builder;
    }

    /**
     * Class to build instances of {@link CallRecordingMetadata}.
     */
    public static class Builder {
        private String applicationId;
        private String accountId;
        private String callId;
        private OptionalNullable parentCallId;
        private String recordingId;
        private String to;
        private String from;
        private String transferCallerId;
        private String transferTo;
        private String duration;
        private DirectionEnum direction;
        private Integer channels;
        private LocalDateTime startTime;
        private LocalDateTime endTime;
        private FileFormatEnum fileFormat;
        private String status;
        private String mediaUrl;
        private TranscriptionMetadata transcription;



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

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

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

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

        /**
         * Setter for channels.
         * @param  channels  Integer value for channels.
         * @return Builder
         */
        public Builder channels(Integer channels) {
            this.channels = channels;
            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 endTime.
         * @param  endTime  LocalDateTime value for endTime.
         * @return Builder
         */
        public Builder endTime(LocalDateTime endTime) {
            this.endTime = endTime;
            return this;
        }

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

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

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

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

        /**
         * Builds a new {@link CallRecordingMetadata} object using the set fields.
         * @return {@link CallRecordingMetadata}
         */
        public CallRecordingMetadata build() {
            return new CallRecordingMetadata(applicationId, accountId, callId, parentCallId,
                    recordingId, to, from, transferCallerId, transferTo, duration, direction,
                    channels, startTime, endTime, fileFormat, status, mediaUrl, transcription);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy