001/*
002 *   Copyright 2024 Vonage
003 *
004 *   Licensed under the Apache License, Version 2.0 (the "License");
005 *   you may not use this file except in compliance with the License.
006 *   You may obtain a copy of the License at
007 *
008 *        http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *   Unless required by applicable law or agreed to in writing, software
011 *   distributed under the License is distributed on an "AS IS" BASIS,
012 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *   See the License for the specific language governing permissions and
014 *   limitations under the License.
015 */
016package com.vonage.client.video;
017
018import com.fasterxml.jackson.annotation.JsonProperty;
019import com.vonage.client.Jsonable;
020import com.vonage.client.JsonableBaseObject;
021
022/**
023 * Represents a Vonage Video SIP call.
024 */
025public class SipDialResponse extends JsonableBaseObject {
026    private String id, connectionId, streamId;
027
028    protected SipDialResponse() {
029    }
030
031    /**
032     * A unique ID for the SIP call.
033     *
034     * @return The unique ID of the SIP conference.
035     */
036    @JsonProperty("id")
037    public String getId() {
038        return id;
039    }
040
041    /**
042     * The video connection ID for the SIP call's connection in the video session.
043     * You can use this connection ID to terminate the SIP call.
044     *
045     * @return The connection ID of the audio-only stream that is put into a video session.
046     */
047    @JsonProperty("connectionId")
048    public String getConnectionId() {
049        return connectionId;
050    }
051
052    /**
053     * The video stream ID for the SIP call's stream in the OpenTok session.
054     *
055     * @return The stream ID of the audio-only stream that is put into a video session.
056     */
057    @JsonProperty("streamId")
058    public String getStreamId() {
059        return streamId;
060    }
061
062    /**
063     * Creates an instance of this class from a JSON payload.
064     *
065     * @param json The JSON string to parse.
066     * @return An instance of this class with the fields populated, if present.
067     */
068    public static SipDialResponse fromJson(String json) {
069        return Jsonable.fromJson(json);
070    }
071}
072