internal static CallConnectionStateChangedEvent DeserializeCallConnectionStateChangedEvent(JsonElement element) { Optional <string> serverCallId = default; Optional <string> callConnectionId = default; CallConnectionState callConnectionState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("serverCallId")) { serverCallId = property.Value.GetString(); continue; } if (property.NameEquals("callConnectionId")) { callConnectionId = property.Value.GetString(); continue; } if (property.NameEquals("callConnectionState")) { callConnectionState = new CallConnectionState(property.Value.GetString()); continue; } } return(new CallConnectionStateChangedEvent(serverCallId.Value, callConnectionId.Value, callConnectionState)); }
public static CallConnectionStateChangedEvent CallConnectionStateChangedEvent(string serverCallId = null, string callConnectionId = null, CallConnectionState callConnectionState = default) { return(new CallConnectionStateChangedEvent(serverCallId, callConnectionId, callConnectionState)); }