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; 021 022/** 023 * @deprecated Use {@link com.vonage.client.voice.EventWebhook}. 024 */ 025@Deprecated 026public class InputEvent implements Jsonable { 027 private String uuid, conversationUuid, to, from; 028 private DtmfResult dtmf; 029 private Date timestamp; 030 private SpeechResults speech; 031 032 /** 033 * @return The unique identifier for this call 034 */ 035 @JsonProperty("uuid") 036 public String getUuid() { 037 return uuid; 038 } 039 040 /** 041 * @return The unique identifier for this conversation 042 */ 043 @JsonProperty("conversation_uuid") 044 public String getConversationUuid() { 045 return conversationUuid; 046 } 047 048 /** 049 * @return DTMF capturing results. 050 */ 051 @JsonProperty("dtmf") 052 public DtmfResult getDtmf() { 053 return dtmf; 054 } 055 056 /** 057 * @return Timestamp (ISO 8601 format) 058 */ 059 @JsonProperty("timestamp") 060 public Date getTimestamp() { 061 return timestamp; 062 } 063 064 /** 065 * @return The number the call was made to 066 */ 067 @JsonProperty("to") 068 public String getTo() { 069 return to; 070 } 071 072 /** 073 * @return The number the call came from 074 */ 075 @JsonProperty("from") 076 public String getFrom() { 077 return from; 078 } 079 080 /** 081 * @return Speech recognition results 082 * @since 6.0.0 083 */ 084 @JsonProperty("speech") 085 public SpeechResults getSpeech() { 086 return speech; 087 } 088 089 public static InputEvent fromJson(String json) { 090 return Jsonable.fromJson(json); 091 } 092}