internal CallRecordingStateChangeEvent(string recordingId, CallRecordingState state, DateTimeOffset startDateTime, string serverCallId) { RecordingId = recordingId; State = state; StartDateTime = startDateTime; ServerCallId = serverCallId; }
internal static CallRecordingStateChangeEvent DeserializeCallRecordingStateChangeEvent(JsonElement element) { Optional <string> recordingId = default; CallRecordingState state = default; DateTimeOffset startDateTime = default; Optional <string> serverCallId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("recordingId")) { recordingId = property.Value.GetString(); continue; } if (property.NameEquals("state")) { state = new CallRecordingState(property.Value.GetString()); continue; } if (property.NameEquals("startDateTime")) { startDateTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("serverCallId")) { serverCallId = property.Value.GetString(); continue; } } return(new CallRecordingStateChangeEvent(recordingId.Value, state, startDateTime, serverCallId.Value)); }
internal static CallRecordingProperties DeserializeCallRecordingProperties(JsonElement element) { CallRecordingState recordingState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("recordingState")) { recordingState = new CallRecordingState(property.Value.GetString()); continue; } } return(new CallRecordingProperties(recordingState)); }
internal static GetCallRecordingStateResponse DeserializeGetCallRecordingStateResponse(JsonElement element) { Optional <CallRecordingState> recordingState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("recordingState")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } recordingState = new CallRecordingState(property.Value.GetString()); continue; } } return(new GetCallRecordingStateResponse(Optional.ToNullable(recordingState))); }
internal static CallRecordingStateChangeEvent DeserializeCallRecordingStateChangeEvent(JsonElement element) { Optional <string> recordingId = default; Optional <CallRecordingState> state = default; Optional <DateTimeOffset> startDateTime = default; Optional <string> conversationId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("recordingId")) { recordingId = property.Value.GetString(); continue; } if (property.NameEquals("state")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } state = new CallRecordingState(property.Value.GetString()); continue; } if (property.NameEquals("startDateTime")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } startDateTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("conversationId")) { conversationId = property.Value.GetString(); continue; } } return(new CallRecordingStateChangeEvent(recordingId.Value, Optional.ToNullable(state), Optional.ToNullable(startDateTime), conversationId.Value)); }
public static CallRecordingStateChangeEvent CallRecordingStateChangeEvent(string recordingId = null, CallRecordingState state = default, DateTimeOffset startDateTime = default, string serverCallId = null) { return(new CallRecordingStateChangeEvent(recordingId, state, startDateTime, serverCallId)); }
public static CallRecordingProperties CallRecordingProperties(CallRecordingState recordingState = default) { return(new CallRecordingProperties(recordingState)); }
internal CallRecordingStateChangeEvent(CallRecordingState state, DateTimeOffset startDateTime) { State = state; StartDateTime = startDateTime; }