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.incoming;
017
018import com.fasterxml.jackson.annotation.JsonProperty;
019import com.vonage.client.Jsonable;
020import java.util.Date;
021import java.util.Map;
022
023/**
024 * @deprecated Use {@link com.vonage.client.voice.EventWebhook}.
025 */
026@Deprecated
027public class NotifyEvent implements Jsonable {
028    @JsonProperty(value = "conversation_uuid")
029    private String conversationUuid;
030    private Date timestamp;
031    private Map<String, Object> payload;
032
033    public String getConversationUuid() {
034        return conversationUuid;
035    }
036
037    public void setConversationUuid(String conversationUuid) {
038        this.conversationUuid = conversationUuid;
039    }
040
041    public Date getTimestamp() {
042        return timestamp;
043    }
044
045    public void setTimestamp(Date timestamp) {
046        this.timestamp = timestamp;
047    }
048
049    public Map<String, Object> getPayload() {
050        return payload;
051    }
052
053    public void setPayload(Map<String, Object> payload) {
054        this.payload = payload;
055    }
056
057    @Override
058    public String toString() {
059        return "NotifyEvent{" +
060                "conversationUuid='" + conversationUuid + '\'' +
061                ", timestamp=" + timestamp +
062                ", payload=" + payload +
063                '}';
064    }
065
066    public static NotifyEvent fromJson(String json) {
067        return Jsonable.fromJson(json);
068    }
069}