dto) {
if (null == dto) {
return null;
}
return dto.stream().map(f -> new Pair<>(f.getKey(), f.getValue())).collect(Collectors.toList());
}
- private static MenuResult convert(PieRequestAllOfMenuResultDto dto) {
- return MenuResult.builder()
- .setMenuId(dto.getMenuId())
- .setType(MenuInputType.from(dto.getType()))
- .setValue(dto.getValue())
- .setInputMethod(MenuResultInputMethodType.from(dto.getInputMethod()))
- .build();
+ private static MenuResult convert(com.sinch.sdk.domains.voice.models.v1.webhooks.MenuResult dto) {
+
+ MenuResult.Builder builder =
+ MenuResult.builder().setMenuId(dto.getMenuId()).setValue(dto.getValue());
+
+ if (null != dto.getType()) {
+ builder.setType(MenuInputType.from(dto.getType().value()));
+ }
+ if (null != dto.getInputMethod()) {
+ builder.setInputMethod(MenuResultInputMethodType.from(dto.getInputMethod().value()));
+ }
+ return builder.build();
}
}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/ApplicationsService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/ApplicationsService.java
new file mode 100644
index 000000000..356604b3b
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/ApplicationsService.java
@@ -0,0 +1,68 @@
+package com.sinch.sdk.domains.voice.api.v1;
+
+import com.sinch.sdk.domains.voice.models.v1.applications.Callbacks;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponse;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberResponse;
+
+/**
+ * You can use the API to manage features of applications in your project.
+ *
+ * @since 1.4
+ */
+public interface ApplicationsService {
+
+ /**
+ * Get information about your numbers.
+ *
+ * It returns a list of numbers that you own, as well as their capability (Voice or SMS). For
+ * the ones that are assigned to an app, it returns the application key of the app.
+ *
+ * @return Your numbers
+ * @since 1.4
+ */
+ OwnedNumbersResponse listNumbers();
+
+ /**
+ * Returns any callback URLs configured for the specified application
+ *
+ * @param applicationKey The unique identifying key of the application
+ * @return Assigned callback to application
+ * @since 1.4
+ */
+ Callbacks getCallbackUrls(String applicationKey);
+
+ /**
+ * Update the configured callback URLs for the specified application.
+ *
+ * @param applicationKey The unique identifying key of the application
+ * @param parameters Callbacks settings
+ * @since 1.4
+ */
+ void updateCallbackUrls(String applicationKey, Callbacks parameters);
+
+ /**
+ * Returns information about the requested number
+ *
+ * @param number The phone number you want to query
+ * @return Number information
+ */
+ QueryNumberResponse queryNumber(String number);
+
+ /**
+ * Update or assign a list of numbers to an application.
+ *
+ * @param parameters Request parameters
+ * @since 1.4
+ */
+ void assignNumbers(UpdateNumbersRequest parameters);
+
+ /**
+ * Un-assign a number from an application.
+ *
+ * @param parameters Request parameters
+ * @since 1.4
+ */
+ public void unassignNumber(UnAssignNumberRequest parameters);
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/CalloutsService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/CalloutsService.java
new file mode 100644
index 000000000..12a71528f
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/CalloutsService.java
@@ -0,0 +1,57 @@
+package com.sinch.sdk.domains.voice.api.v1;
+
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestCustom;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
+
+/**
+ * A callout is a call made to a phone number or app using the API.
+ *
+ * @see https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callouts
+ * @since 1.4
+ */
+public interface CalloutsService {
+
+ /**
+ * The text-to-speech callout calls a phone number and plays a synthesized text messages or
+ * pre-recorded sound files.
+ *
+ * @param parameters Text to speech parameters
+ * @return The returned call identifier (callId)
+ * @since 1.4
+ */
+ String textToSpeech(CalloutRequestTTS parameters);
+
+ /**
+ * The conference callout calls a phone number or a user. When the call is answered, it's
+ * connected to a conference room.
+ *
+ * @param parameters Conference parameters
+ * @return The returned call identifier (callId)
+ * @since 1.4
+ */
+ String conference(CalloutRequestConference parameters);
+
+ /**
+ * The custom callout, the server initiates a call from the servers that can be controlled by
+ * specifying how the call should progress at each call event.
+ *
+ * @param parameters Custom parameters
+ * @return The returned call identifier (callId)
+ * @since 1.4
+ */
+ String custom(CalloutRequestCustom parameters);
+
+ /**
+ * Makes a call out to a phone number. The types of callouts currently supported are conference
+ * callouts, text-to-speech callouts, and custom callouts. The custom callout is the most
+ * flexible, but text-to-speech and conference callouts are more convenient.
+ *
+ * @param parameters Callout type to be performed
+ * @return The returned call identifier (callId)
+ * @since 1.4
+ */
+ String call(CalloutRequest parameters);
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/CallsService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/CallsService.java
new file mode 100644
index 000000000..70cd10e55
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/CallsService.java
@@ -0,0 +1,58 @@
+package com.sinch.sdk.domains.voice.api.v1;
+
+import com.sinch.sdk.domains.voice.models.v1.calls.request.CallLeg;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+
+/**
+ * Using the Calls service, you can manage on-going calls or retrieve information about a call.
+ *
+ * @see https://developers.sinch.com/docs/voice/api-reference/voice/tag/Calls
+ * @since 1.4
+ */
+public interface CallsService {
+
+ /**
+ * You can retrieve information about an ongoing or completed call using a call ID. You can find
+ * the call ID of an ongoing call by viewing the response object from a callout request. You can
+ * find the call ID of a completed call by looking at your call logs in your Sinch Dashboard.
+ *
+ *
Note: You can only use this method for calls that terminate to PSTN or SIP networks from an
+ * In-app call.
+ *
+ * @param callId The unique identifier of the call. This value is generated by the system
+ * @return Information about the call
+ * @since 1.4
+ */
+ CallInformation get(String callId);
+
+ /**
+ * This method is used to manage ongoing, connected calls. This method uses SVAML in the request
+ * body to perform various tasks related to the call. For more information about SVAML, see the
+ * Callback API documentation.
+ *
+ *
Note: You can only use this method for calls that terminate to PSTN or SIP networks from an
+ * In-app call.
+ *
+ * @param callId The unique identifier of the call. This value is generated by the system
+ * @param parameters Tasks to be used related to this call
+ * @since 1.4
+ */
+ void update(String callId, SvamlControl parameters);
+
+ /**
+ * This method is used to manage ongoing, connected calls. This method is only used when using the
+ * PlayFiles and Say instructions in the request body. This method uses SVAML in the request body
+ * to perform various tasks related to the call. For more information about SVAML, see the
+ * Callback API documentation.
+ *
+ *
Note: You can only use this method for calls that terminate to PSTN or SIP networks from an
+ * In-app call.
+ *
+ * @param callId The unique identifier of the call. This value is generated by the system
+ * @param parameters Tasks to be used related to this call
+ * @since 1.4
+ */
+ void manageWithCallLeg(String callId, CallLeg callLeg, SvamlControl parameters);
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/ConferencesService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/ConferencesService.java
new file mode 100644
index 000000000..4d30b0821
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/ConferencesService.java
@@ -0,0 +1,63 @@
+package com.sinch.sdk.domains.voice.api.v1;
+
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.GetConferenceInfoResponse;
+
+/**
+ * Using the Conferences endpoint, you can perform tasks like retrieving information about an
+ * on-going conference, muting or unmuting participants, or removing participants from a conference.
+ *
+ * @see https://developers.sinch.com/docs/voice/api-reference/voice/tag/Conferences
+ * @since 1.4
+ */
+public interface ConferencesService {
+
+ /**
+ * Calls a phone number or a user to join a conference. When the call is answered, it's connected
+ * to a conference room.
+ *
+ * @param parameters Conference parameters
+ * @return The returned call identifier (callId)
+ * @since 1.4
+ */
+ String call(CalloutRequestConference parameters);
+
+ /**
+ * Returns information about a conference that matches the provided conference ID.
+ *
+ * @param conferenceId The unique identifier of the conference. The user sets this value.
+ * @return The list of participants joined the conference
+ * @since 1.4
+ */
+ GetConferenceInfoResponse get(String conferenceId);
+
+ /**
+ * Removes all participants from a conference
+ *
+ * @param conferenceId The unique identifier of the conference. The user sets this value.
+ * @since 1.4
+ */
+ void kickAll(String conferenceId);
+
+ /**
+ * Remove a specified conference participant from a specified conference
+ *
+ * @param conferenceId The unique identifier of the conference. The user sets this value.
+ * @param callId The unique identifier of the call. This value is generated by the system
+ * @since 1.4
+ */
+ void kickParticipant(String conferenceId, String callId);
+
+ /**
+ * Manages conference participant in a specified conference:
+ *
+ * @param conferenceId The unique identifier of the conference. The user sets this value.
+ * @param callId The unique identifier of the call. This value is generated by the system
+ * @param parameters Parameters to manage participant
+ * @since 1.4
+ */
+ void manageParticipant(
+ String conferenceId, String callId, ManageConferenceParticipantRequest parameters);
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/VoiceService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/VoiceService.java
new file mode 100644
index 000000000..21ec5834e
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/VoiceService.java
@@ -0,0 +1,51 @@
+package com.sinch.sdk.domains.voice.api.v1;
+
+/**
+ * Voice service
+ *
+ * @see https://developers.sinch.com/docs/voice/
+ * @since 1.4
+ */
+public interface VoiceService {
+
+ /**
+ * Callouts Service instance
+ *
+ * @return service instance for project
+ * @since 1.4
+ */
+ CalloutsService callouts();
+
+ /**
+ * Conference Service instance
+ *
+ * @return service instance for project
+ * @since 1.4
+ */
+ ConferencesService conferences();
+
+ /**
+ * Calls Service instance
+ *
+ * @return service instance for project
+ * @since 1.4
+ */
+ CallsService calls();
+
+ /**
+ * Applications Service instance
+ *
+ * @return service instance for project
+ * @since 1.4
+ */
+ ApplicationsService applications();
+
+ /**
+ * Webhooks helpers instance
+ *
+ * @return instance service related to webhooks helpers
+ * @since 1.4
+ */
+ WebHooksService webhooks();
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/WebHooksService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/WebHooksService.java
new file mode 100644
index 000000000..fca05fc90
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/WebHooksService.java
@@ -0,0 +1,59 @@
+package com.sinch.sdk.domains.voice.api.v1;
+
+import com.sinch.sdk.core.exceptions.ApiMappingException;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.VoiceWebhookEvent;
+import java.util.Map;
+
+/**
+ * Webhooks service
+ *
+ * @see https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/
+ * @since 1.4
+ */
+public interface WebHooksService {
+
+ /**
+ * The Sinch Platform can initiate callback requests to a URL you define (Callback URL) on request
+ * and result events. All callback requests are signed using your Application key and secret pair
+ * found on your dashboard. The signature is included in the Authorization header of the request
+ *
+ *
By using following function, you can ensure authentication according to received payload
+ * from your backend
+ *
+ * @param method The HTTP method used ot handle the callback
+ * @param path The path to you backend endpoint used for callback
+ * @param headers Received headers
+ * @param jsonPayload Received payload
+ * @return Is authentication is validated (true) or not (false)
+ *
see https://developers.sinch.com/docs/voice/api-reference/authentication/callback-signed-request/
+ * @since 1.4
+ */
+ boolean validateAuthenticationHeader(
+ String method, String path, Map headers, String jsonPayload);
+
+ /**
+ * This function can be called to deserialize received payload onto callback onto proper java
+ * Voice event class
+ *
+ * @param jsonPayload Received payload to be deserialized
+ * @return The Voice event instance class
+ * see https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/
+ * @since 1.4
+ */
+ VoiceWebhookEvent parseEvent(String jsonPayload) throws ApiMappingException;
+
+ /**
+ * This function can be called to serialize a Voice response to be sent as JSON
+ *
+ * @param response The response to be serialized
+ * @return The JSON string to be sent
+ *
see https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/
+ * @since 1.4
+ */
+ String serializeResponse(SvamlControl response) throws ApiMappingException;
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/ApplicationsService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/ApplicationsService.java
new file mode 100644
index 000000000..0f7e4852a
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/ApplicationsService.java
@@ -0,0 +1,57 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.core.http.HttpMapper;
+import com.sinch.sdk.domains.voice.api.v1.internal.ApplicationsApi;
+import com.sinch.sdk.domains.voice.models.v1.applications.Callbacks;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponse;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberResponse;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+
+public class ApplicationsService implements com.sinch.sdk.domains.voice.api.v1.ApplicationsService {
+
+ private final ApplicationsApi api;
+
+ public ApplicationsService(
+ VoiceContext context, HttpClient httpClient, Map authManagers) {
+ this.api =
+ new ApplicationsApi(
+ httpClient,
+ context.getVoiceApplicationManagementServer(),
+ authManagers,
+ new HttpMapper());
+ }
+
+ protected ApplicationsApi getApi() {
+ return this.api;
+ }
+
+ public OwnedNumbersResponse listNumbers() {
+ return getApi().configurationGetNumbers();
+ }
+
+ public Callbacks getCallbackUrls(String applicationKey) {
+ return getApi().configurationGetCallbackURLs(applicationKey);
+ }
+
+ public void updateCallbackUrls(String applicationKey, Callbacks parameters) {
+
+ getApi().configurationUpdateCallbackURLs(applicationKey, parameters);
+ }
+
+ public QueryNumberResponse queryNumber(String number) {
+ return getApi().callingQueryNumber(number);
+ }
+
+ public void assignNumbers(UpdateNumbersRequest parameters) {
+ getApi().configurationUpdateNumbers(parameters);
+ }
+
+ public void unassignNumber(UnAssignNumberRequest parameters) {
+ getApi().configurationUnassignNumber(parameters);
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/CalloutsService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/CalloutsService.java
new file mode 100644
index 000000000..873dabc3d
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/CalloutsService.java
@@ -0,0 +1,76 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.core.http.HttpMapper;
+import com.sinch.sdk.domains.voice.api.v1.adapters.mapper.CalloutRequestCustomMapper;
+import com.sinch.sdk.domains.voice.api.v1.internal.CalloutsApi;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestCustom;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.internal.CalloutRequestInternalImpl;
+import com.sinch.sdk.domains.voice.models.v1.callouts.response.CalloutResponse;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+
+public class CalloutsService implements com.sinch.sdk.domains.voice.api.v1.CalloutsService {
+
+ private final CalloutsApi api;
+
+ static {
+ LocalLazyInit.init();
+ }
+
+ public CalloutsService(
+ VoiceContext context, HttpClient httpClient, Map authManagers) {
+ this.api =
+ new CalloutsApi(httpClient, context.getVoiceServer(), authManagers, new HttpMapper());
+ }
+
+ protected CalloutsApi getApi() {
+ return this.api;
+ }
+
+ public String textToSpeech(CalloutRequestTTS parameters) {
+
+ return call(parameters);
+ }
+
+ public String conference(CalloutRequestConference parameters) {
+
+ return call(parameters);
+ }
+
+ public String custom(CalloutRequestCustom parameters) {
+
+ return call(parameters);
+ }
+
+ public String call(CalloutRequest parameters) {
+
+ CalloutRequestInternalImpl request = new CalloutRequestInternalImpl();
+ request.setActualInstance(parameters);
+ CalloutResponse response = getApi().callouts(request);
+ if (null == response) {
+ return null;
+ }
+ return response.getCallId();
+ }
+
+ public static final class LocalLazyInit {
+
+ private LocalLazyInit() {
+ CalloutRequestCustomMapper.initMapper();
+ }
+
+ public static LocalLazyInit init() {
+ return LazyHolder.INSTANCE;
+ }
+
+ private static class LazyHolder {
+
+ public static final LocalLazyInit INSTANCE = new LocalLazyInit();
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/CallsService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/CallsService.java
new file mode 100644
index 000000000..811b99105
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/CallsService.java
@@ -0,0 +1,58 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.core.http.HttpMapper;
+import com.sinch.sdk.domains.voice.api.v1.adapters.mapper.CallInformationMapper;
+import com.sinch.sdk.domains.voice.api.v1.internal.CallsApi;
+import com.sinch.sdk.domains.voice.models.v1.calls.request.CallLeg;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+
+public class CallsService implements com.sinch.sdk.domains.voice.api.v1.CallsService {
+
+ private final CallsApi api;
+
+ static {
+ LocalLazyInit.init();
+ }
+
+ public CallsService(
+ VoiceContext context, HttpClient httpClient, Map authManagers) {
+ this.api = new CallsApi(httpClient, context.getVoiceServer(), authManagers, new HttpMapper());
+ }
+
+ protected CallsApi getApi() {
+ return this.api;
+ }
+
+ public CallInformation get(String callId) {
+ return getApi().callingGetCallResult(callId);
+ }
+
+ public void update(String callId, SvamlControl parameters) {
+ getApi().callingUpdateCall(callId, parameters);
+ }
+
+ public void manageWithCallLeg(String callId, CallLeg callLeg, SvamlControl parameters) {
+ getApi().callingManageCallWithCallLeg(callId, callLeg.value(), parameters);
+ }
+
+ public static final class LocalLazyInit {
+
+ private LocalLazyInit() {
+ CallInformationMapper.initMapper();
+ }
+
+ public static CallsService.LocalLazyInit init() {
+ return CallsService.LocalLazyInit.LazyHolder.INSTANCE;
+ }
+
+ private static class LazyHolder {
+
+ public static final CallsService.LocalLazyInit INSTANCE = new LocalLazyInit();
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/ConferencesService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/ConferencesService.java
new file mode 100644
index 000000000..a3f1c8400
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/ConferencesService.java
@@ -0,0 +1,52 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.core.http.HttpMapper;
+import com.sinch.sdk.domains.voice.api.v1.internal.ConferencesApi;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.GetConferenceInfoResponse;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+
+public class ConferencesService implements com.sinch.sdk.domains.voice.api.v1.ConferencesService {
+
+ private final ConferencesApi api;
+ private final CalloutsService calloutsService;
+
+ public ConferencesService(
+ VoiceContext context,
+ HttpClient httpClient,
+ Map authManagers,
+ CalloutsService calloutsService) {
+ this.api =
+ new ConferencesApi(httpClient, context.getVoiceServer(), authManagers, new HttpMapper());
+ this.calloutsService = calloutsService;
+ }
+
+ protected ConferencesApi getApi() {
+ return this.api;
+ }
+
+ public String call(CalloutRequestConference parameters) {
+ return calloutsService.conference(parameters);
+ }
+
+ public GetConferenceInfoResponse get(String conferenceId) {
+ return getApi().callingGetConferenceInfo(conferenceId);
+ }
+
+ public void kickAll(String conferenceId) {
+ getApi().callingKickConferenceAll(conferenceId);
+ }
+
+ public void kickParticipant(String conferenceId, String callId) {
+ getApi().callingKickConferenceParticipant(callId, conferenceId);
+ }
+
+ public void manageParticipant(
+ String conferenceId, String callId, ManageConferenceParticipantRequest parameters) {
+ getApi().callingManageConferenceParticipant(callId, conferenceId, parameters);
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/VoiceService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/VoiceService.java
new file mode 100644
index 000000000..9630599f7
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/VoiceService.java
@@ -0,0 +1,145 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import com.sinch.sdk.auth.adapters.ApplicationAuthManager;
+import com.sinch.sdk.auth.adapters.BasicAuthManager;
+import com.sinch.sdk.core.exceptions.ApiAuthException;
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.core.utils.StringUtil;
+import com.sinch.sdk.domains.voice.api.v1.adapters.CallsService.LocalLazyInit;
+import com.sinch.sdk.domains.voice.api.v1.adapters.mapper.DestinationMapper;
+import com.sinch.sdk.models.ApplicationCredentials;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+import java.util.Objects;
+import java.util.TreeMap;
+import java.util.logging.Logger;
+
+public class VoiceService implements com.sinch.sdk.domains.voice.api.v1.VoiceService {
+ private static final Logger LOGGER = Logger.getLogger(VoiceService.class.getName());
+
+ private static final String SECURITY_SCHEME_KEYWORD = "Signed";
+
+ private static final String BASIC_SECURITY_SCHEME_KEYWORD = "Basic";
+
+ private static final String APPLICATION_SECURITY_SCHEME_KEYWORD = "Application";
+
+ private final VoiceContext context;
+ private final HttpClient httpClient;
+ private CalloutsService callouts;
+ private ConferencesService conferences;
+ private CallsService calls;
+ private ApplicationsService applications;
+ private WebHooksService webhooks;
+
+ private Map clientAuthManagers;
+ private Map webhooksAuthManagers;
+
+ static {
+ LocalLazyInit.init();
+ }
+
+ public VoiceService(
+ ApplicationCredentials credentials, VoiceContext context, HttpClient httpClient) {
+
+ // Currently, we are not supporting unified credentials: ensure application credentials are
+ // defined
+ Objects.requireNonNull(credentials, "Credentials must be defined");
+ Objects.requireNonNull(context, "Context must be defined");
+ StringUtil.requireNonEmpty(credentials.getApplicationKey(), "'applicationKey' must be defined");
+ StringUtil.requireNonEmpty(
+ credentials.getApplicationSecret(), "'applicationSecret' must be defined");
+
+ LOGGER.fine("Activate voice API with server='" + context.getVoiceServer().getUrl() + "'");
+
+ this.context = context;
+ this.httpClient = httpClient;
+ setApplicationCredentials(credentials);
+ }
+
+ private void setApplicationCredentials(ApplicationCredentials credentials) {
+
+ AuthManager basicAuthManager =
+ new BasicAuthManager(credentials.getApplicationKey(), credentials.getApplicationSecret());
+ AuthManager applicationAuthManager =
+ new ApplicationAuthManager(
+ credentials.getApplicationKey(), credentials.getApplicationSecret());
+
+ clientAuthManagers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+ clientAuthManagers.put(SECURITY_SCHEME_KEYWORD, applicationAuthManager);
+
+ // here we need both auth managers to handle webhooks because we are receiving an Authorization
+ // header with "Application" keyword
+ webhooksAuthManagers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+ webhooksAuthManagers.put(BASIC_SECURITY_SCHEME_KEYWORD, basicAuthManager);
+ webhooksAuthManagers.put(APPLICATION_SECURITY_SCHEME_KEYWORD, applicationAuthManager);
+ }
+
+ public CalloutsService callouts() {
+ if (null == this.callouts) {
+ checkCredentials();
+ this.callouts = new CalloutsService(context, httpClient, clientAuthManagers);
+ }
+ return this.callouts;
+ }
+
+ public ConferencesService conferences() {
+ if (null == this.conferences) {
+ checkCredentials();
+ this.conferences =
+ new ConferencesService(context, httpClient, clientAuthManagers, this.callouts());
+ }
+ return this.conferences;
+ }
+
+ public CallsService calls() {
+ if (null == this.calls) {
+ checkCredentials();
+ this.calls = new CallsService(context, httpClient, clientAuthManagers);
+ }
+ return this.calls;
+ }
+
+ public ApplicationsService applications() {
+ if (null == this.applications) {
+ checkCredentials();
+ this.applications =
+ new com.sinch.sdk.domains.voice.api.v1.adapters.ApplicationsService(
+ context, httpClient, clientAuthManagers);
+ }
+ return this.applications;
+ }
+
+ public WebHooksService webhooks() {
+ checkCredentials();
+ if (null == this.webhooks) {
+ this.webhooks = new WebHooksService(webhooksAuthManagers);
+ }
+ return this.webhooks;
+ }
+
+ private void checkCredentials() throws ApiAuthException {
+ if (null == clientAuthManagers || clientAuthManagers.isEmpty()) {
+ throw new ApiAuthException(
+ String.format(
+ "Service '%s' cannot be called without defined credentials",
+ this.getClass().getSimpleName()));
+ }
+ }
+
+ public static final class LocalLazyInit {
+
+ private LocalLazyInit() {
+ DestinationMapper.initMapper();
+ }
+
+ public static LocalLazyInit init() {
+ return LocalLazyInit.LazyHolder.INSTANCE;
+ }
+
+ private static class LazyHolder {
+
+ public static final LocalLazyInit INSTANCE = new LocalLazyInit();
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/WebHooksService.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/WebHooksService.java
new file mode 100644
index 000000000..4457caac2
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/WebHooksService.java
@@ -0,0 +1,68 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.sinch.sdk.core.exceptions.ApiMappingException;
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.utils.MapUtils;
+import com.sinch.sdk.core.utils.StringUtil;
+import com.sinch.sdk.core.utils.databind.Mapper;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.VoiceWebhookEvent;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.internal.WebhooksEventInternalImpl;
+import java.util.Map;
+import java.util.logging.Logger;
+
+public class WebHooksService implements com.sinch.sdk.domains.voice.api.v1.WebHooksService {
+ private static final Logger LOGGER = Logger.getLogger(WebHooksService.class.getName());
+
+ private final Map authManagers;
+
+ public WebHooksService(Map authManagers) {
+ this.authManagers = authManagers;
+ }
+
+ public boolean validateAuthenticationHeader(
+ String method, String path, Map headers, String jsonPayload) {
+
+ // convert header keys to use case-insensitive map keys
+ Map caseInsensitiveHeaders = MapUtils.getCaseInsensitiveMap(headers);
+
+ String authorizationHeader = caseInsensitiveHeaders.get("Authorization");
+
+ if (StringUtil.isEmpty(authorizationHeader)) {
+ return false;
+ }
+
+ String[] split = authorizationHeader.split(" ");
+ String authorizationKeyword = split.length > 0 ? split[0] : "";
+
+ AuthManager authManager = authManagers.get(authorizationKeyword);
+ if (null == authManager) {
+ // unknown auth manager
+ LOGGER.severe(
+ String.format("Auth manager for authorization '%s' not found", authorizationKeyword));
+ return false;
+ }
+ return authManager.validateAuthenticatedRequest(method, path, headers, jsonPayload);
+ }
+
+ @Override
+ public VoiceWebhookEvent parseEvent(String jsonPayload) throws ApiMappingException {
+ try {
+ WebhooksEventInternalImpl o =
+ Mapper.getInstance().readValue(jsonPayload, WebhooksEventInternalImpl.class);
+ return (VoiceWebhookEvent) o.getActualInstance();
+ } catch (JsonProcessingException e) {
+ throw new ApiMappingException(jsonPayload, e);
+ }
+ }
+
+ @Override
+ public String serializeResponse(SvamlControl response) throws ApiMappingException {
+ try {
+ return Mapper.getInstance().writeValueAsString(response);
+ } catch (JsonProcessingException e) {
+ throw new ApiMappingException(response.toString(), e);
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/CallInformationMapper.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/CallInformationMapper.java
new file mode 100644
index 000000000..c986b9c49
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/CallInformationMapper.java
@@ -0,0 +1,81 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters.mapper;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.sinch.sdk.core.utils.databind.Mapper;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformationFrom;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformationTo;
+import com.sinch.sdk.domains.voice.models.v1.destination.internal.DestinationInternalImpl;
+import java.io.IOException;
+import java.util.logging.Logger;
+
+public class CallInformationMapper {
+
+ private static final Logger LOGGER = Logger.getLogger(CallInformationMapper.class.getName());
+
+ public static void initMapper() {
+
+ SimpleModule module = new SimpleModule();
+ module.addDeserializer(CallInformationFrom.class, new CallInformationFromDeserializer());
+ module.addDeserializer(CallInformationTo.class, new CallInformationToDeserializer());
+ Mapper.getInstance().registerModule(module);
+ }
+
+ static class CallInformationFromDeserializer extends StdDeserializer {
+
+ public CallInformationFromDeserializer() {
+ this(null);
+ }
+
+ public CallInformationFromDeserializer(Class vc) {
+ super(vc);
+ }
+
+ @Override
+ public CallInformationFrom deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException {
+
+ DestinationInternalImpl read = jp.readValueAs(DestinationInternalImpl.class);
+
+ if (null == read) {
+ return null;
+ }
+ Object instance = read.getActualInstance();
+ if (!(instance instanceof CallInformationFrom)) {
+ LOGGER.severe("Unexpected class: " + instance);
+ return null;
+ }
+ return (CallInformationFrom) instance;
+ }
+ }
+
+ static class CallInformationToDeserializer extends StdDeserializer {
+
+ public CallInformationToDeserializer() {
+ this(null);
+ }
+
+ public CallInformationToDeserializer(Class vc) {
+ super(vc);
+ }
+
+ @Override
+ public CallInformationTo deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException {
+
+ DestinationInternalImpl read = jp.readValueAs(DestinationInternalImpl.class);
+
+ if (null == read) {
+ return null;
+ }
+ Object instance = read.getActualInstance();
+ if (!(instance instanceof CallInformationTo)) {
+ LOGGER.severe("Unexpected class: " + instance);
+ return null;
+ }
+ return (CallInformationTo) instance;
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/CalloutRequestCustomMapper.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/CalloutRequestCustomMapper.java
new file mode 100644
index 000000000..ddad3dc85
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/CalloutRequestCustomMapper.java
@@ -0,0 +1,76 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters.mapper;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.sinch.sdk.core.models.OptionalValue;
+import com.sinch.sdk.core.utils.databind.Mapper;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.internal.CustomCalloutInternal;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.internal.CustomCalloutInternalImpl;
+import com.sinch.sdk.domains.voice.models.v1.svaml.Control;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import java.io.IOException;
+
+public class CalloutRequestCustomMapper {
+
+ public static void initMapper() {
+ Mapper.getInstance()
+ .addMixIn(CustomCalloutInternal.class, CalloutRequestCustomMapperMixin.class);
+ }
+
+ public static class CalloutRequestCustomMapperMixin extends CustomCalloutInternalImpl {
+
+ @Override
+ @JsonSerialize(using = InlineControlSerializer.class)
+ public OptionalValue ace() {
+ return super.ace();
+ }
+
+ @Override
+ @JsonSerialize(using = InlineControlSerializer.class)
+ public OptionalValue ice() {
+ return super.ice();
+ }
+
+ @Override
+ @JsonSerialize(using = InlineControlSerializer.class)
+ public OptionalValue pie() {
+ return super.pie();
+ }
+ }
+
+ static class InlineControlSerializer extends JsonSerializer> {
+
+ public InlineControlSerializer() {
+ super();
+ }
+
+ @Override
+ public void serialize(
+ OptionalValue _value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException {
+
+ if (!_value.isPresent()) {
+ return;
+ }
+
+ Control value = _value.get();
+
+ ObjectMapper mapper = (ObjectMapper) jgen.getCodec();
+ String serialized = null;
+ if (value instanceof SvamlControl) {
+ serialized = mapper.writeValueAsString(value);
+ }
+
+ if (value instanceof com.sinch.sdk.domains.voice.models.v1.svaml.ControlUrl) {
+ com.sinch.sdk.domains.voice.models.v1.svaml.ControlUrl url =
+ (com.sinch.sdk.domains.voice.models.v1.svaml.ControlUrl) value;
+ serialized = url.getUrl();
+ }
+
+ jgen.writeString(serialized);
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/DestinationMapper.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/DestinationMapper.java
new file mode 100644
index 000000000..f645afbd6
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/adapters/mapper/DestinationMapper.java
@@ -0,0 +1,45 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters.mapper;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.sinch.sdk.core.utils.databind.Mapper;
+import com.sinch.sdk.domains.voice.models.v1.destination.Destination;
+import com.sinch.sdk.domains.voice.models.v1.destination.internal.DestinationInternalImpl;
+import java.io.IOException;
+import java.util.logging.Logger;
+
+public class DestinationMapper {
+
+ private static final Logger LOGGER = Logger.getLogger(DestinationMapper.class.getName());
+
+ public static void initMapper() {
+
+ SimpleModule module = new SimpleModule();
+ module.addDeserializer(Destination.class, new DestinationDeserializer());
+ Mapper.getInstance().registerModule(module);
+ }
+
+ static class DestinationDeserializer extends StdDeserializer {
+
+ public DestinationDeserializer() {
+ this(null);
+ }
+
+ public DestinationDeserializer(Class vc) {
+ super(vc);
+ }
+
+ @Override
+ public Destination deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
+
+ DestinationInternalImpl read = jp.readValueAs(DestinationInternalImpl.class);
+
+ if (null == read) {
+ return null;
+ }
+ return (Destination) read.getActualInstance();
+ }
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/api/v1/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/api/v1/package-info.java
new file mode 100644
index 000000000..3aef5315a
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/api/v1/package-info.java
@@ -0,0 +1,8 @@
+/**
+ * Voice API interface V1
+ *
+ * @see https://developers.sinch.com/docs/voice
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.api.v1;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/package-info.java
new file mode 100644
index 000000000..8df776093
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Applications
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.applications;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/request/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/request/package-info.java
new file mode 100644
index 000000000..7669c3e17
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/request/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Applications requests
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.applications.request;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/response/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/response/package-info.java
new file mode 100644
index 000000000..d7569a8b9
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/applications/response/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Applications responses
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.applications.response;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/request/CalloutRequest.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/request/CalloutRequest.java
new file mode 100644
index 000000000..e0e9c32cd
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/request/CalloutRequest.java
@@ -0,0 +1,8 @@
+package com.sinch.sdk.domains.voice.models.v1.callouts.request;
+
+/**
+ * Base class related a Callout request
+ *
+ * @since 1.4
+ */
+public interface CalloutRequest {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/request/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/request/package-info.java
new file mode 100644
index 000000000..22cfbc52b
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/request/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Callouts requests
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.callouts.request;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/response/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/response/package-info.java
new file mode 100644
index 000000000..d7a301589
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/callouts/response/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Callouts responses
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.callouts.response;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/request/CallLeg.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/request/CallLeg.java
new file mode 100644
index 000000000..20f93044d
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/request/CallLeg.java
@@ -0,0 +1,43 @@
+package com.sinch.sdk.domains.voice.models.v1.calls.request;
+
+import com.sinch.sdk.core.utils.EnumDynamic;
+import com.sinch.sdk.core.utils.EnumSupportDynamic;
+import java.util.Arrays;
+import java.util.stream.Stream;
+
+/**
+ * Specifies which part of the call will be managed. This option is used only by the PlayFiles and
+ * Say instructions to indicate which channel the sound will be played on. Valid options are caller,
+ * callee or both. If not specified, the default value is caller.
+ *
+ * The callLeg identifier is ignored for calls that are part of a conference and calls initiated
+ * using the Callout API.
+ *
+ * @since 1.4
+ */
+public class CallLeg extends EnumDynamic {
+
+ public static final CallLeg CALLER = new CallLeg("caller");
+ public static final CallLeg CALLEE = new CallLeg("callee");
+ public static final CallLeg BOTH = new CallLeg("both");
+
+ /** */
+ private static final EnumSupportDynamic ENUM_SUPPORT =
+ new EnumSupportDynamic<>(CallLeg.class, CallLeg::new, Arrays.asList(CALLER, CALLEE, BOTH));
+
+ private CallLeg(String value) {
+ super(value);
+ }
+
+ public static Stream values() {
+ return ENUM_SUPPORT.values();
+ }
+
+ public static CallLeg from(String value) {
+ return ENUM_SUPPORT.from(value);
+ }
+
+ public static String valueOf(CallLeg e) {
+ return ENUM_SUPPORT.valueOf(e);
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/request/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/request/package-info.java
new file mode 100644
index 000000000..216dffea0
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/request/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Calls requests
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.calls.request;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/CallInformationFrom.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/CallInformationFrom.java
new file mode 100644
index 000000000..3c3f413a9
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/CallInformationFrom.java
@@ -0,0 +1,9 @@
+package com.sinch.sdk.domains.voice.models.v1.calls.response;
+
+/**
+ * Class related to a From
destination for {@link CallInformation#getFrom()}
+ *
+ * @see com.sinch.sdk.domains.voice.api.v1.CallsService#get(String)
+ * @since 1.4
+ */
+public interface CallInformationFrom {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/CallInformationTo.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/CallInformationTo.java
new file mode 100644
index 000000000..232f42482
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/CallInformationTo.java
@@ -0,0 +1,9 @@
+package com.sinch.sdk.domains.voice.models.v1.calls.response;
+
+/**
+ * Class related to a To
destination for {@link CallInformation#getTo()}
+ *
+ * @see com.sinch.sdk.domains.voice.api.v1.CallsService#get(String)
+ * @since 1.4
+ */
+public interface CallInformationTo {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/package-info.java
new file mode 100644
index 000000000..6590a5ba4
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/calls/response/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Calls responses
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.calls.response;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/package-info.java
new file mode 100644
index 000000000..58fb80c60
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Conferences
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.conferences;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/request/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/request/package-info.java
new file mode 100644
index 000000000..eaa8f6134
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/request/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Conferences requests
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.conferences.request;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/response/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/response/package-info.java
new file mode 100644
index 000000000..55d036feb
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/conferences/response/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice Conferences responses
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.conferences.response;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/Destination.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/Destination.java
new file mode 100644
index 000000000..104c98165
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/Destination.java
@@ -0,0 +1,8 @@
+package com.sinch.sdk.domains.voice.models.v1.destination;
+
+/**
+ * Base class related to a Destination
+ *
+ * @since 1.4
+ */
+public interface Destination {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationConference.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationConference.java
new file mode 100644
index 000000000..8e3ccf0a4
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationConference.java
@@ -0,0 +1,11 @@
+package com.sinch.sdk.domains.voice.models.v1.destination;
+
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+
+/**
+ * Base class related to a Conference
call destination
+ *
+ * @see com.sinch.sdk.domains.voice.api.v1.CalloutsService#conference(CalloutRequestConference)
+ * @since 1.4
+ */
+public interface DestinationConference {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationCustom.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationCustom.java
new file mode 100644
index 000000000..7660ba3ef
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationCustom.java
@@ -0,0 +1,11 @@
+package com.sinch.sdk.domains.voice.models.v1.destination;
+
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestCustom;
+
+/**
+ * Base class related to a Custom
call destination
+ *
+ * @see com.sinch.sdk.domains.voice.api.v1.CalloutsService#custom(CalloutRequestCustom)
+ * @since 1.4
+ */
+public interface DestinationCustom {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationTextToSpeech.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationTextToSpeech.java
new file mode 100644
index 000000000..529858ec5
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/DestinationTextToSpeech.java
@@ -0,0 +1,11 @@
+package com.sinch.sdk.domains.voice.models.v1.destination;
+
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
+
+/**
+ * Base class related to a Text To Speech
call destination
+ *
+ * @see com.sinch.sdk.domains.voice.api.v1.CalloutsService#textToSpeech(CalloutRequestTTS)
+ * @since 1.4
+ */
+public interface DestinationTextToSpeech {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/package-info.java
new file mode 100644
index 000000000..eb44073a9
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/destination/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Destination related classes
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.destination;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/package-info.java
new file mode 100644
index 000000000..08434a4cc
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Voice API interface V1 models
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/Control.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/Control.java
new file mode 100644
index 000000000..9b4bfa34a
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/Control.java
@@ -0,0 +1,10 @@
+package com.sinch.sdk.domains.voice.models.v1.svaml;
+
+/**
+ * Base class related to a control
+ *
+ * Could be a URL or an SVAML control object
+ *
+ * @since 1.4
+ */
+public interface Control {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/ControlUrl.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/ControlUrl.java
new file mode 100644
index 000000000..18619cf43
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/ControlUrl.java
@@ -0,0 +1,41 @@
+package com.sinch.sdk.domains.voice.models.v1.svaml;
+
+/**
+ * Control URL used during a custom callout
+ *
+ * @see Custom
+ * Callout Description
+ * @since 1.4
+ */
+public class ControlUrl implements Control {
+
+ private final String url;
+
+ private ControlUrl(String URL) {
+ this.url = URL;
+ }
+
+ /**
+ * @see #from(String)
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ @Override
+ public String toString() {
+ return "ControlUrl{" + "URL='" + url + '\'' + "} " + super.toString();
+ }
+
+ /**
+ * Create a Custom URL instance from String
+ *
+ * @param URL URL representation
+ * @return A newly created instance
+ * @since 1.4
+ */
+ public static ControlUrl from(String URL) {
+ return new ControlUrl(URL);
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/MenuOptionActionFactory.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/MenuOptionActionFactory.java
new file mode 100644
index 000000000..9bc3bf03c
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/MenuOptionActionFactory.java
@@ -0,0 +1,61 @@
+package com.sinch.sdk.domains.voice.models.v1.svaml.action;
+
+import com.sinch.sdk.core.utils.EnumDynamic;
+import com.sinch.sdk.core.utils.EnumSupportDynamic;
+import com.sinch.sdk.domains.voice.models.svaml.MenuOptionActionType;
+import java.util.Arrays;
+import java.util.Objects;
+import java.util.stream.Stream;
+
+/** Menu option action factory helper */
+public class MenuOptionActionFactory {
+
+ public static class MenuOptionActionType extends EnumDynamic {
+
+ /**
+ * Triggers a Prompt Input Event (PIE)
+ *
+ * @see Prompt
+ * Input Event
+ */
+ public static final MenuOptionActionType RETURN = new MenuOptionActionType("return");
+
+ /** Navigates to the named menu */
+ public static final MenuOptionActionType MENU = new MenuOptionActionType("menu");
+
+ /** */
+ private static final EnumSupportDynamic ENUM_SUPPORT =
+ new EnumSupportDynamic<>(
+ MenuOptionActionType.class, MenuOptionActionType::new, Arrays.asList(RETURN, MENU));
+
+ private MenuOptionActionType(String value) {
+ super(value);
+ }
+
+ public static Stream values() {
+ return ENUM_SUPPORT.values();
+ }
+
+ public static MenuOptionActionType from(String value) {
+ return ENUM_SUPPORT.from(value);
+ }
+
+ public static String valueOf(MenuOptionActionType e) {
+ return ENUM_SUPPORT.valueOf(e);
+ }
+ }
+
+ public static String menuAction(String id) {
+ return build(MenuOptionActionType.MENU, id);
+ }
+
+ public static String returnAction(String id) {
+ return build(MenuOptionActionType.RETURN, id);
+ }
+
+ public static String build(MenuOptionActionType type, String id) {
+ Objects.requireNonNull(type, "Action type cannot be null");
+ return String.format("%s(%s)", type.value(), id);
+ }
+}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/SvamlAction.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/SvamlAction.java
new file mode 100644
index 000000000..024d200cd
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/SvamlAction.java
@@ -0,0 +1,8 @@
+package com.sinch.sdk.domains.voice.models.v1.svaml.action;
+
+/**
+ * Base class related SVAML actions
+ *
+ * @since 1.4
+ */
+public interface SvamlAction {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/package-info.java
new file mode 100644
index 000000000..015d07d3f
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/action/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice SVAML actions
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.svaml.action;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/instruction/SvamlInstruction.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/instruction/SvamlInstruction.java
new file mode 100644
index 000000000..ed409eb2f
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/instruction/SvamlInstruction.java
@@ -0,0 +1,8 @@
+package com.sinch.sdk.domains.voice.models.v1.svaml.instruction;
+
+/**
+ * Base class related SVAML instructions
+ *
+ * @since 1.4
+ */
+public interface SvamlInstruction {}
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/instruction/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/instruction/package-info.java
new file mode 100644
index 000000000..fa7d34f26
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/instruction/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice SVAML instructions
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.svaml.instruction;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/package-info.java
new file mode 100644
index 000000000..91387c459
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/svaml/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice SVAML
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.svaml;
diff --git a/client/src/main/com/sinch/sdk/domains/voice/models/v1/webhooks/package-info.java b/client/src/main/com/sinch/sdk/domains/voice/models/v1/webhooks/package-info.java
new file mode 100644
index 000000000..2f6c91da4
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/domains/voice/models/v1/webhooks/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Models related to Voice WebHooks
+ *
+ * @since 1.4
+ */
+package com.sinch.sdk.domains.voice.models.v1.webhooks;
diff --git a/client/src/main/com/sinch/sdk/models/adapters/DualToneMultiFrequencyMapper.java b/client/src/main/com/sinch/sdk/models/adapters/DualToneMultiFrequencyMapper.java
new file mode 100644
index 000000000..d52a7d96d
--- /dev/null
+++ b/client/src/main/com/sinch/sdk/models/adapters/DualToneMultiFrequencyMapper.java
@@ -0,0 +1,70 @@
+package com.sinch.sdk.models.adapters;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import com.sinch.sdk.core.utils.databind.Mapper;
+import com.sinch.sdk.models.DualToneMultiFrequency;
+import java.io.IOException;
+import java.util.logging.Logger;
+
+public class DualToneMultiFrequencyMapper {
+ private static final Logger LOGGER =
+ Logger.getLogger(DualToneMultiFrequencyMapper.class.getName());
+
+ public static void initMapper() {
+ SimpleModule module =
+ new SimpleModule()
+ .addSerializer(DualToneMultiFrequency.class, new Serializer())
+ .addDeserializer(DualToneMultiFrequency.class, new Deserializer());
+ Mapper.getInstance().registerModule(module);
+ }
+
+ static class Serializer extends StdSerializer {
+
+ public Serializer() {
+ this(null);
+ }
+
+ public Serializer(Class t) {
+ super(t);
+ }
+
+ @Override
+ public void serialize(
+ DualToneMultiFrequency raw, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException {
+ if (null == raw) {
+ // avoid exception
+ LOGGER.severe("Unexpected type'" + raw + "'");
+ return;
+ }
+ jgen.writeObject(raw.stringValue());
+ }
+ }
+
+ static final class Deserializer extends StdDeserializer {
+
+ private static final long serialVersionUID = 1L;
+
+ public Deserializer() {
+ this(DualToneMultiFrequency.class);
+ }
+
+ public Deserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public DualToneMultiFrequency deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException {
+
+ String strValue = Mapper.getInstance().readValue(jp, String.class);
+ return DualToneMultiFrequency.valueOf(strValue);
+ }
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/domains/verification/api/v1/adapters/VerificationServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/verification/api/v1/adapters/VerificationServiceTest.java
index 1e9a275dc..8eb23f545 100644
--- a/client/src/test/java/com/sinch/sdk/domains/verification/api/v1/adapters/VerificationServiceTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/verification/api/v1/adapters/VerificationServiceTest.java
@@ -1,5 +1,6 @@
package com.sinch.sdk.domains.verification.api.v1.adapters;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -87,4 +88,16 @@ void doNotAcceptNullVerificationUrl() {
() -> new VerificationService(credentials, context, httpClient));
assertTrue(exception.getMessage().contains("verificationUrl"));
}
+
+ @Test
+ void passInit() {
+ ApplicationCredentials credentials =
+ ApplicationCredentials.builder()
+ .setApplicationKey("foo key")
+ .setApplicationSecret("Zm9vIHNlY3JldA==")
+ .build();
+
+ assertDoesNotThrow(
+ () -> new VerificationService(credentials, context, httpClient), "Init passed");
+ }
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ApplicationsServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ApplicationsServiceTest.java
index 3f74dc1f3..978b263a3 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ApplicationsServiceTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ApplicationsServiceTest.java
@@ -1,29 +1,24 @@
package com.sinch.sdk.domains.voice.adapters;
import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.core.exceptions.ApiException;
-import com.sinch.sdk.core.http.AuthManager;
-import com.sinch.sdk.core.http.HttpClient;
-import com.sinch.sdk.domains.voice.adapters.api.v1.ApplicationsApi;
import com.sinch.sdk.domains.voice.adapters.converters.ApplicationsDtoConverter;
import com.sinch.sdk.domains.voice.adapters.converters.ApplicationsDtoConverterTest;
import com.sinch.sdk.domains.voice.models.CallbackUrls;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsCallbackUrlsDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsGetNumbersResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.CallbacksDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.UnassignNumbersDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.UpdateNumbersDto;
import com.sinch.sdk.domains.voice.models.response.AssignedNumbers;
+import com.sinch.sdk.domains.voice.models.v1.applications.Callbacks;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.GetCallbackUrlsResponseTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponseTest;
import com.sinch.sdk.models.E164PhoneNumber;
-import com.sinch.sdk.models.VoiceContext;
-import java.util.Map;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -34,47 +29,39 @@
@TestWithResources
public class ApplicationsServiceTest extends BaseTest {
- @Mock ApplicationsApi api;
- @Mock VoiceContext context;
- @Mock HttpClient httpClient;
- @Mock Map authManagers;
+ @Mock com.sinch.sdk.domains.voice.api.v1.ApplicationsService v1;
@Captor ArgumentCaptor applicationKeyCaptor;
- @Captor ArgumentCaptor callbacksDtoCaptor;
- @Captor ArgumentCaptor updateNumbersDtoCaptor;
- @Captor ArgumentCaptor unassignNumbersDtoCaptor;
+ @Captor ArgumentCaptor callbacksDtoCaptor;
+ @Captor ArgumentCaptor updateNumbersRequestDtoCaptor;
+ @Captor ArgumentCaptor unAssignNumberRequestDtoCaptor;
ApplicationsService service;
@BeforeEach
public void initMocks() {
- service = spy(new ApplicationsService(context, httpClient, authManagers));
- doReturn(api).when(service).getApi();
+ service = spy(new ApplicationsService(v1));
}
@Test
void getNumbers() throws ApiException {
- when(api.configurationGetNumbers()).thenReturn(ApplicationsGetNumbersResponseDtoTest.expected);
+ when(v1.listNumbers()).thenReturn(OwnedNumbersResponseTest.expected);
AssignedNumbers response = service.listNumbers();
- Assertions.assertThat(response)
- .usingRecursiveComparison()
- .isEqualTo(ApplicationsDtoConverterTest.expectedAssignedNumbersResponse);
+ TestHelpers.recursiveEquals(
+ response, ApplicationsDtoConverterTest.expectedAssignedNumbersResponse);
}
@Test
void getCallbackUrls() throws ApiException {
-
- when(api.configurationGetCallbackURLs(eq("app id")))
- .thenReturn(ApplicationsCallbackUrlsDtoTest.expected);
+ when(v1.getCallbackUrls(eq("app id"))).thenReturn(GetCallbackUrlsResponseTest.expected);
CallbackUrls response = service.getCallbackUrls("app id");
- Assertions.assertThat(response)
- .usingRecursiveComparison()
- .isEqualTo(ApplicationsDtoConverterTest.expectedApplicationsCallbackUrls);
+ TestHelpers.recursiveEquals(
+ response, ApplicationsDtoConverterTest.expectedApplicationsCallbackUrls);
}
@Test
@@ -83,18 +70,16 @@ void updateCallbackUrls() {
service.updateCallbackUrls(
"app key", ApplicationsDtoConverterTest.expectedApplicationsCallbackUrls);
- verify(api)
- .configurationUpdateCallbackURLs(
- applicationKeyCaptor.capture(), callbacksDtoCaptor.capture());
+ verify(v1).updateCallbackUrls(applicationKeyCaptor.capture(), callbacksDtoCaptor.capture());
String appKey = applicationKeyCaptor.getValue();
Assertions.assertThat(appKey).isEqualTo("app key");
- CallbacksDto body = callbacksDtoCaptor.getValue();
- Assertions.assertThat(body)
- .isEqualTo(
- ApplicationsDtoConverter.convert(
- ApplicationsDtoConverterTest.expectedApplicationsCallbackUrls));
+ Callbacks body = callbacksDtoCaptor.getValue();
+ TestHelpers.recursiveEquals(
+ body,
+ ApplicationsDtoConverter.convert(
+ ApplicationsDtoConverterTest.expectedApplicationsCallbackUrls));
}
@Test
@@ -102,25 +87,24 @@ void updateNumbers() {
service.assignNumbers(
ApplicationsDtoConverterTest.expectedApplicationsAssignNumbersRequestParameters);
- verify(api).configurationUpdateNumbers(updateNumbersDtoCaptor.capture());
+ verify(v1).assignNumbers(updateNumbersRequestDtoCaptor.capture());
- UpdateNumbersDto body = updateNumbersDtoCaptor.getValue();
- Assertions.assertThat(body)
- .isEqualTo(
- ApplicationsDtoConverter.convert(
- ApplicationsDtoConverterTest.expectedApplicationsAssignNumbersRequestParameters));
+ UpdateNumbersRequest body = updateNumbersRequestDtoCaptor.getValue();
+ TestHelpers.recursiveEquals(
+ body,
+ ApplicationsDtoConverter.convert(
+ ApplicationsDtoConverterTest.expectedApplicationsAssignNumbersRequestParameters));
}
@Test
void unassignNumber() {
service.unassignNumber(E164PhoneNumber.valueOf("+12345678"), "application key");
- verify(api).configurationUnassignNumber(unassignNumbersDtoCaptor.capture());
+ verify(v1).unassignNumber(unAssignNumberRequestDtoCaptor.capture());
- UnassignNumbersDto body = unassignNumbersDtoCaptor.getValue();
- Assertions.assertThat(body)
- .isEqualTo(
- ApplicationsDtoConverter.convert(
- E164PhoneNumber.valueOf("+12345678"), "application key"));
+ UnAssignNumberRequest body = unAssignNumberRequestDtoCaptor.getValue();
+ TestHelpers.recursiveEquals(
+ body,
+ ApplicationsDtoConverter.convert(E164PhoneNumber.valueOf("+12345678"), "application key"));
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CalloutsServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CalloutsServiceTest.java
index 00d21c931..e16426486 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CalloutsServiceTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CalloutsServiceTest.java
@@ -1,74 +1,77 @@
package com.sinch.sdk.domains.voice.adapters;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
-import com.sinch.sdk.BaseTest;
import com.sinch.sdk.core.exceptions.ApiException;
-import com.sinch.sdk.core.http.AuthManager;
-import com.sinch.sdk.core.http.HttpClient;
-import com.sinch.sdk.domains.voice.adapters.api.v1.CalloutsApi;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutRequestDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutResponseDtoTest;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersConferenceTest;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersCustomTest;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersTTSTest;
-import com.sinch.sdk.models.VoiceContext;
-import java.util.Map;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutResponseDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestCustom;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
@TestWithResources
-public class CalloutsServiceTest extends BaseTest {
-
- @Mock CalloutsApi api;
- @Mock VoiceContext context;
- @Mock HttpClient httpClient;
- @Mock Map authManagers;
+public class CalloutsServiceTest extends VoiceBaseTest {
+ @Mock com.sinch.sdk.domains.voice.api.v1.CalloutsService v1;
CalloutsService service;
@BeforeEach
public void initMocks() {
- service = spy(new CalloutsService(context, httpClient, authManagers));
- doReturn(api).when(service).getApi();
+ service = spy(new CalloutsService(v1));
}
@Test
- void callConference() throws ApiException {
+ void conference() throws ApiException {
- when(api.callouts(eq(CalloutRequestDtoTest.conferenceRequestCalloutDto)))
- .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+ when(v1.conference(any(CalloutRequestConference.class)))
+ .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
String response =
- service.call(CalloutRequestParametersConferenceTest.conferenceRequestParameters);
+ service.conference(CalloutRequestParametersConferenceTest.conferenceRequestParameters);
+
+ Assertions.assertThat(response)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ }
+
+ @Test
+ void textToSpeech() throws ApiException {
+
+ when(v1.textToSpeech(any(CalloutRequestTTS.class)))
+ .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+
+ String response = service.textToSpeech(CalloutRequestParametersTTSTest.ttsRequestParameters);
Assertions.assertThat(response)
.isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
}
@Test
- void callTTS() throws ApiException {
+ void custom() throws ApiException {
- when(api.callouts(eq(CalloutRequestDtoTest.ttsRequestDto)))
- .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+ when(v1.custom(any(CalloutRequestCustom.class)))
+ .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
- String response = service.call(CalloutRequestParametersTTSTest.ttsRequestParameters);
+ String response = service.custom(CalloutRequestParametersCustomTest.customRequestParameters);
Assertions.assertThat(response)
.isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
}
@Test
- void callCustom() throws ApiException {
+ void call() throws ApiException {
- when(api.callouts(eq(CalloutRequestDtoTest.customRequestDto)))
- .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+ when(v1.call(any(CalloutRequest.class)))
+ .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
String response = service.call(CalloutRequestParametersCustomTest.customRequestParameters);
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CallsServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CallsServiceTest.java
index 0c902fee3..8f7775a24 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CallsServiceTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/CallsServiceTest.java
@@ -1,25 +1,21 @@
package com.sinch.sdk.domains.voice.adapters;
import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.core.exceptions.ApiException;
-import com.sinch.sdk.core.http.AuthManager;
-import com.sinch.sdk.core.http.HttpClient;
-import com.sinch.sdk.domains.voice.adapters.api.v1.CallsApi;
import com.sinch.sdk.domains.voice.adapters.converters.CallsDtoConverterTest;
import com.sinch.sdk.domains.voice.models.CallLegType;
-import com.sinch.sdk.domains.voice.models.dto.v1.CallsResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.SVAMLRequestBodyDto;
import com.sinch.sdk.domains.voice.models.response.CallInformation;
import com.sinch.sdk.domains.voice.models.svaml.SVAMLControlTest;
-import com.sinch.sdk.models.VoiceContext;
-import java.util.Map;
+import com.sinch.sdk.domains.voice.models.v1.calls.CallInformationTest;
+import com.sinch.sdk.domains.voice.models.v1.calls.request.CallLeg;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -30,49 +26,40 @@
@TestWithResources
public class CallsServiceTest extends BaseTest {
- @Mock CallsApi api;
- @Mock VoiceContext context;
- @Mock HttpClient httpClient;
- @Mock Map authManagers;
+ @Mock com.sinch.sdk.domains.voice.api.v1.CallsService v1;
@Captor ArgumentCaptor callIdCaptor;
- @Captor ArgumentCaptor callLegCaptor;
- @Captor ArgumentCaptor updateParametersCaptor;
+ @Captor ArgumentCaptor callLegCaptor;
+ @Captor ArgumentCaptor updateParametersCaptor;
CallsService service;
@BeforeEach
public void initMocks() {
- service = spy(new CallsService(context, httpClient, authManagers));
- doReturn(api).when(service).getApi();
+ service = spy(new CallsService(v1));
}
@Test
void get() throws ApiException {
-
- when(api.callingGetCallResult(
- eq(CallsResponseDtoTest.expectedCallsGetInformationResponseDto.getCallId())))
- .thenReturn(CallsResponseDtoTest.expectedCallsGetInformationResponseDto);
+ when(v1.get(eq(CallInformationTest.expectedCallsGetInformationResponseDto.getCallId())))
+ .thenReturn(CallInformationTest.expectedCallsGetInformationResponseDto);
CallInformation response =
- service.get(CallsResponseDtoTest.expectedCallsGetInformationResponseDto.getCallId());
+ service.get(CallInformationTest.expectedCallsGetInformationResponseDto.getCallId());
- Assertions.assertThat(response)
- .usingRecursiveComparison()
- .isEqualTo(CallsDtoConverterTest.expectedCallInformation);
+ TestHelpers.recursiveEquals(response, CallsDtoConverterTest.expectedCallInformation);
}
@Test
void update() throws ApiException {
-
service.update("call id", SVAMLControlTest.parameters);
- verify(api).callingUpdateCall(callIdCaptor.capture(), updateParametersCaptor.capture());
+ verify(v1).update(callIdCaptor.capture(), updateParametersCaptor.capture());
String callId = callIdCaptor.getValue();
Assertions.assertThat(callId).isEqualTo("call id");
- SVAMLRequestBodyDto body = updateParametersCaptor.getValue();
- Assertions.assertThat(body).isEqualTo(CallsDtoConverterTest.svamlRequestBodyDto);
+ SvamlControl body = updateParametersCaptor.getValue();
+ TestHelpers.recursiveEquals(body, CallsDtoConverterTest.svamlControlDto);
}
@Test
@@ -80,17 +67,17 @@ void manageWithCallLeg() throws ApiException {
service.manageWithCallLeg("call id", CallLegType.BOTH, SVAMLControlTest.parameters);
- verify(api)
- .callingManageCallWithCallLeg(
+ verify(v1)
+ .manageWithCallLeg(
callIdCaptor.capture(), callLegCaptor.capture(), updateParametersCaptor.capture());
String callId = callIdCaptor.getValue();
Assertions.assertThat(callId).isEqualTo("call id");
- String legType = callLegCaptor.getValue();
- Assertions.assertThat(legType).isEqualTo("both");
+ CallLeg legType = callLegCaptor.getValue();
+ Assertions.assertThat(legType).isEqualTo(CallLeg.BOTH);
- SVAMLRequestBodyDto body = updateParametersCaptor.getValue();
- Assertions.assertThat(body).isEqualTo(CallsDtoConverterTest.svamlRequestBodyDto);
+ SvamlControl body = updateParametersCaptor.getValue();
+ Assertions.assertThat(body).isEqualTo(CallsDtoConverterTest.svamlControlDto);
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ConferencesServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ConferencesServiceTest.java
index 3df744174..acde2ff1c 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ConferencesServiceTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/ConferencesServiceTest.java
@@ -1,29 +1,24 @@
package com.sinch.sdk.domains.voice.adapters;
import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.core.exceptions.ApiException;
-import com.sinch.sdk.core.http.AuthManager;
-import com.sinch.sdk.core.http.HttpClient;
-import com.sinch.sdk.domains.voice.adapters.api.v1.ConferencesApi;
import com.sinch.sdk.domains.voice.adapters.converters.ConferencesDtoConverterTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutRequestDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ConferencesRequestDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ConferencesResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ManageConferenceParticipantRequestDto;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersConferenceTest;
import com.sinch.sdk.domains.voice.models.requests.ConferenceManageParticipantRequestParametersTest;
import com.sinch.sdk.domains.voice.models.response.ConferenceParticipant;
-import com.sinch.sdk.models.VoiceContext;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutRequestDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutResponseDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ConferencesRequestDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.ConferencesResponseDtoTest;
import java.util.Collection;
-import java.util.Map;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -34,27 +29,23 @@
@TestWithResources
public class ConferencesServiceTest extends BaseTest {
- @Mock ConferencesApi api;
- @Mock VoiceContext context;
- @Mock HttpClient httpClient;
- @Mock Map authManagers;
+ @Mock com.sinch.sdk.domains.voice.api.v1.ConferencesService v1;
@Captor ArgumentCaptor conferenceIdCaptor;
@Captor ArgumentCaptor callIdCaptor;
- @Captor ArgumentCaptor participantCaptor;
+ @Captor ArgumentCaptor participantCaptor;
ConferencesService service;
@BeforeEach
public void initMocks() {
- service = spy(new ConferencesService(context, httpClient, authManagers));
- doReturn(api).when(service).getApi();
+ service = spy(new ConferencesService(v1));
}
@Test
void call() throws ApiException {
- when(api.callouts(eq(CalloutRequestDtoTest.conferenceRequestCalloutDto)))
- .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+ when(v1.call(eq(CalloutRequestDtoTest.conferenceRequestCalloutDto)))
+ .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
String response =
service.call(CalloutRequestParametersConferenceTest.conferenceRequestParameters);
@@ -66,83 +57,63 @@ void call() throws ApiException {
@Test
void get() throws ApiException {
- when(api.callingGetConferenceInfo(
- eq(
- CalloutRequestDtoTest.conferenceRequestCalloutDto
- .getConferenceCallout()
- .getConferenceId())))
+ when(v1.get(eq(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId())))
.thenReturn(ConferencesResponseDtoTest.expectedGetConferenceInfoResponseDto);
Collection response =
- service.get(
- CalloutRequestDtoTest.conferenceRequestCalloutDto
- .getConferenceCallout()
- .getConferenceId());
+ service.get(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
- Assertions.assertThat(response)
- .usingRecursiveComparison()
- .isEqualTo(ConferencesDtoConverterTest.expectedConferenceGetInfoResponse);
+ TestHelpers.recursiveEquals(
+ response, ConferencesDtoConverterTest.expectedConferenceGetInfoResponse);
}
@Test
void kickParticipant() throws ApiException {
-
service.kickParticipant(
- CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceCallout().getConferenceId(),
+ CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId(),
CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
- verify(api)
- .callingKickConferenceParticipant(callIdCaptor.capture(), conferenceIdCaptor.capture());
+ verify(v1).kickParticipant(conferenceIdCaptor.capture(), callIdCaptor.capture());
String parameter = callIdCaptor.getValue();
Assertions.assertThat(parameter)
.isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
parameter = conferenceIdCaptor.getValue();
Assertions.assertThat(parameter)
- .isEqualTo(
- CalloutRequestDtoTest.conferenceRequestCalloutDto
- .getConferenceCallout()
- .getConferenceId());
+ .isEqualTo(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
}
@Test
void kickAll() throws ApiException {
- service.kickAll(
- CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceCallout().getConferenceId());
- verify(api).callingKickConferenceAll(conferenceIdCaptor.capture());
+ service.kickAll(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
+ verify(v1).kickAll(conferenceIdCaptor.capture());
String parameter = conferenceIdCaptor.getValue();
Assertions.assertThat(parameter)
- .isEqualTo(
- CalloutRequestDtoTest.conferenceRequestCalloutDto
- .getConferenceCallout()
- .getConferenceId());
+ .isEqualTo(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
}
@Test
void manageParticipant() throws ApiException {
service.manageParticipant(
- CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceCallout().getConferenceId(),
+ CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId(),
CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId(),
ConferenceManageParticipantRequestParametersTest
.conferenceManageParticipantRequestParameters);
- verify(api)
- .callingManageConferenceParticipant(
- callIdCaptor.capture(), conferenceIdCaptor.capture(), participantCaptor.capture());
+ verify(v1)
+ .manageParticipant(
+ conferenceIdCaptor.capture(), callIdCaptor.capture(), participantCaptor.capture());
String parameter = callIdCaptor.getValue();
Assertions.assertThat(parameter)
.isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
parameter = conferenceIdCaptor.getValue();
Assertions.assertThat(parameter)
- .isEqualTo(
- CalloutRequestDtoTest.conferenceRequestCalloutDto
- .getConferenceCallout()
- .getConferenceId());
+ .isEqualTo(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
- ManageConferenceParticipantRequestDto participant = participantCaptor.getValue();
+ ManageConferenceParticipantRequest participant = participantCaptor.getValue();
Assertions.assertThat(participant)
.isEqualTo(ConferencesRequestDtoTest.manageConferenceParticipantRequestDto);
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/VoiceServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/VoiceServiceTest.java
index 9b565c63f..0af9f3e41 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/VoiceServiceTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/VoiceServiceTest.java
@@ -1,5 +1,6 @@
package com.sinch.sdk.domains.voice.adapters;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -13,9 +14,10 @@ class VoiceServiceTest {
@Mock HttpClient httpClient;
+ VoiceContext context = VoiceContext.builder().build();
+
@Test
void doNotAcceptNullApplicationCredentials() {
- VoiceContext context = VoiceContext.builder().build();
Exception exception =
assertThrows(NullPointerException.class, () -> new VoiceService(null, context, httpClient));
@@ -40,7 +42,6 @@ void doNotAcceptNullApplicationKey() {
.setApplicationKey(null)
.setApplicationSecret("foo secret")
.build();
- VoiceContext context = VoiceContext.builder().build();
Exception exception =
assertThrows(
@@ -57,7 +58,6 @@ void doNotAcceptNullApplicationSecret() {
.setApplicationKey("foo key")
.setApplicationSecret(null)
.build();
- VoiceContext context = VoiceContext.builder().build();
Exception exception =
assertThrows(
@@ -66,4 +66,15 @@ void doNotAcceptNullApplicationSecret() {
assertTrue(exception.getMessage().contains("applicationSecret"));
}
+
+ @Test
+ void passInit() {
+ ApplicationCredentials credentials =
+ ApplicationCredentials.builder()
+ .setApplicationKey("foo key")
+ .setApplicationSecret("Zm9vIHNlY3JldA==")
+ .build();
+
+ assertDoesNotThrow(() -> new VoiceService(credentials, context, httpClient), "Init passed");
+ }
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ApplicationsDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ApplicationsDtoConverterTest.java
index 4ea9d1320..55a560f00 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ApplicationsDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ApplicationsDtoConverterTest.java
@@ -2,6 +2,7 @@
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.domains.voice.models.ApplicationAssignedNumber;
import com.sinch.sdk.domains.voice.models.ApplicationURL;
import com.sinch.sdk.domains.voice.models.CallbackUrls;
@@ -9,17 +10,16 @@
import com.sinch.sdk.domains.voice.models.NumberInformation;
import com.sinch.sdk.domains.voice.models.NumberType;
import com.sinch.sdk.domains.voice.models.Price;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsCallbackUrlsDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsGetNumbersResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsQueryNumberResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsUnassignNumberRequestDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ApplicationsUpdateNumberRequestDtoTest;
import com.sinch.sdk.domains.voice.models.requests.ApplicationsAssignNumbersRequestParameters;
import com.sinch.sdk.domains.voice.models.response.AssignedNumbers;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequestTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateCallbackUrlsRequestTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequestTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponseTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberResponseTest;
import com.sinch.sdk.models.E164PhoneNumber;
import java.util.Arrays;
import java.util.Collections;
-import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
@TestWithResources
@@ -68,48 +68,43 @@ public class ApplicationsDtoConverterTest extends BaseTest {
@Test
void convertGetApplicationsNumbersResponseDto() {
- Assertions.assertThat(
- ApplicationsDtoConverter.convert(ApplicationsGetNumbersResponseDtoTest.expected))
- .usingRecursiveComparison()
- .isEqualTo(expectedAssignedNumbersResponse);
+ TestHelpers.recursiveEquals(
+ ApplicationsDtoConverter.convert(OwnedNumbersResponseTest.expected),
+ expectedAssignedNumbersResponse);
}
@Test
void convertCallbackUrlsResponseDto() {
- Assertions.assertThat(
- ApplicationsDtoConverter.convert(ApplicationsCallbackUrlsDtoTest.expected))
- .usingRecursiveComparison()
- .isEqualTo(expectedApplicationsCallbackUrls);
+ TestHelpers.recursiveEquals(
+ ApplicationsDtoConverter.convert(UpdateCallbackUrlsRequestTest.expected),
+ expectedApplicationsCallbackUrls);
}
@Test
void convertCallbackUrlsRequestDto() {
- Assertions.assertThat(ApplicationsDtoConverter.convert(expectedApplicationsCallbackUrls))
- .usingRecursiveComparison()
- .isEqualTo(ApplicationsCallbackUrlsDtoTest.expected);
+ TestHelpers.recursiveEquals(
+ ApplicationsDtoConverter.convert(expectedApplicationsCallbackUrls),
+ UpdateCallbackUrlsRequestTest.expected);
}
@Test
void convertGetQueryNumberDto() {
- Assertions.assertThat(
- ApplicationsDtoConverter.convert(ApplicationsQueryNumberResponseDtoTest.expected))
- .usingRecursiveComparison()
- .isEqualTo(expectedApplicationsNumberInformation);
+ TestHelpers.recursiveEquals(
+ ApplicationsDtoConverter.convert(QueryNumberResponseTest.expected),
+ expectedApplicationsNumberInformation);
}
@Test
void convertApplicationsUpdateNumberRequestParameters() {
- Assertions.assertThat(
- ApplicationsDtoConverter.convert(expectedApplicationsAssignNumbersRequestParameters))
- .usingRecursiveComparison()
- .isEqualTo(ApplicationsUpdateNumberRequestDtoTest.updateNumbersDto);
+ TestHelpers.recursiveEquals(
+ ApplicationsDtoConverter.convert(expectedApplicationsAssignNumbersRequestParameters),
+ UpdateNumbersRequestTest.updateNumbersDto);
}
@Test
- void convertUnassignNumbersDto() {
- Assertions.assertThat(
- ApplicationsDtoConverter.convert(E164PhoneNumber.valueOf("+12073091712"), "an app key"))
- .usingRecursiveComparison()
- .isEqualTo(ApplicationsUnassignNumberRequestDtoTest.unassignNumberDto);
+ void convertUnAssignNumbersDto() {
+ TestHelpers.recursiveEquals(
+ ApplicationsDtoConverter.convert(E164PhoneNumber.valueOf("+12073091712"), "an app key"),
+ UnAssignNumberRequestTest.unAssignNumberDto);
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CalloutsDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CalloutsDtoConverterTest.java
index e944594af..c9e6d940b 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CalloutsDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CalloutsDtoConverterTest.java
@@ -2,10 +2,10 @@
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutRequestDtoTest;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersConferenceTest;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersCustomTest;
import com.sinch.sdk.domains.voice.models.requests.CalloutRequestParametersTTSTest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutRequestDtoTest;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CallsDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CallsDtoConverterTest.java
index b9aaa2317..078233685 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CallsDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/CallsDtoConverterTest.java
@@ -2,24 +2,22 @@
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.domains.voice.models.CallReasonType;
import com.sinch.sdk.domains.voice.models.CallResultType;
import com.sinch.sdk.domains.voice.models.DestinationNumber;
import com.sinch.sdk.domains.voice.models.DestinationUser;
import com.sinch.sdk.domains.voice.models.DomainType;
import com.sinch.sdk.domains.voice.models.Price;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionConnectConfDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionAnswerDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.CallsResponseDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.SVAMLRequestBodyDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.SvamlActionDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.SvamlInstructionDto;
import com.sinch.sdk.domains.voice.models.response.CallInformation;
import com.sinch.sdk.domains.voice.models.response.CallStatusType;
import com.sinch.sdk.domains.voice.models.svaml.SVAMLControlTest;
+import com.sinch.sdk.domains.voice.models.v1.calls.CallInformationTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionConnectConferenceTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionAnswerTest;
import java.time.Instant;
import java.util.Collections;
-import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
@TestWithResources
@@ -41,26 +39,24 @@ public class CallsDtoConverterTest extends BaseTest {
.setDebit(Price.builder().setCurrencyId("EUR").setAmount(0.5274F).build())
.build();
- public static SVAMLRequestBodyDto svamlRequestBodyDto =
- new SVAMLRequestBodyDto()
- .action(new SvamlActionDto(ActionConnectConfDtoTest.dto))
- .instructions(
- Collections.singletonList(new SvamlInstructionDto(InstructionAnswerDtoTest.dto)));
+ public static SvamlControl svamlControlDto =
+ SvamlControl.builder()
+ .setAction(SvamlActionConnectConferenceTest.dto)
+ .setInstructions(Collections.singletonList(SvamlInstructionAnswerTest.dto))
+ .build();
@Test
void convertCallInformation() {
- Assertions.assertThat(
- CallsDtoConverter.convert(CallsResponseDtoTest.expectedCallsGetInformationResponseDto))
- .usingRecursiveComparison()
- .isEqualTo(expectedCallInformation);
+ TestHelpers.recursiveEquals(
+ CallsDtoConverter.convert(CallInformationTest.expectedCallsGetInformationResponseDto),
+ expectedCallInformation);
}
@Test
void convertCallsUpdateRequestParameters() {
- Assertions.assertThat(svamlRequestBodyDto)
- .usingRecursiveComparison()
- .isEqualTo(CallsDtoConverter.convert(SVAMLControlTest.parameters));
+ TestHelpers.recursiveEquals(
+ svamlControlDto, ControlDtoConverter.convertControl(SVAMLControlTest.parameters));
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ConferencesDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ConferencesDtoConverterTest.java
index ca5b957b1..9a68fc154 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ConferencesDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/ConferencesDtoConverterTest.java
@@ -1,9 +1,10 @@
package com.sinch.sdk.domains.voice.adapters.converters;
-import com.sinch.sdk.domains.voice.models.dto.v1.ConferencesRequestDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.ConferencesResponseDtoTest;
import com.sinch.sdk.domains.voice.models.requests.ConferenceManageParticipantRequestParametersTest;
import com.sinch.sdk.domains.voice.models.response.ConferenceParticipant;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ConferencesRequestDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.ConferencesResponseDtoTest;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import org.assertj.core.api.Assertions;
@@ -12,14 +13,15 @@
public class ConferencesDtoConverterTest {
public static Collection expectedConferenceGetInfoResponse =
- Collections.singletonList(
- ConferenceParticipant.builder()
- .setCli("a cli")
- .setId("an id")
- .setDuration(5)
- .setMuted(true)
- .setOnhold(false)
- .build());
+ new ArrayList<>(
+ Collections.singletonList(
+ ConferenceParticipant.builder()
+ .setCli("a cli")
+ .setId("an id")
+ .setDuration(5)
+ .setMuted(true)
+ .setOnhold(false)
+ .build()));
@Test
void convertGetConferenceInfoResponseDto() {
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLActionDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLActionDtoConverterTest.java
index 054003e2a..8375d02b1 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLActionDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLActionDtoConverterTest.java
@@ -1,5 +1,6 @@
package com.sinch.sdk.domains.voice.adapters.converters;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.core.utils.Pair;
import com.sinch.sdk.domains.voice.models.ConferenceDtfmOptions;
import com.sinch.sdk.domains.voice.models.DestinationSip;
@@ -7,15 +8,6 @@
import com.sinch.sdk.domains.voice.models.DtfmModeType;
import com.sinch.sdk.domains.voice.models.MusicOnHoldType;
import com.sinch.sdk.domains.voice.models.TransportType;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionConnectConfDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionConnectMxpDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionConnectPstnDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionConnectSipDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionContinueDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionHangUpDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionParkDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.ActionRunMenuDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.SvamlActionDto;
import com.sinch.sdk.domains.voice.models.svaml.ActionConnectConference;
import com.sinch.sdk.domains.voice.models.svaml.ActionConnectMxp;
import com.sinch.sdk.domains.voice.models.svaml.ActionConnectPstn;
@@ -30,10 +22,17 @@
import com.sinch.sdk.domains.voice.models.svaml.MenuOption;
import com.sinch.sdk.domains.voice.models.svaml.MenuOptionAction;
import com.sinch.sdk.domains.voice.models.svaml.MenuOptionActionType;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionConnectConferenceTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionConnectMxpTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionConnectPstnTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionConnectSipTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionContinueTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionHangupTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionParkTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionRunMenuTest;
import com.sinch.sdk.models.DualToneMultiFrequency;
import com.sinch.sdk.models.E164PhoneNumber;
import java.util.Collections;
-import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
public class SVAMLActionDtoConverterTest {
@@ -121,57 +120,50 @@ public class SVAMLActionDtoConverterTest {
@Test
void convertActionConnectConf() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionConnectConference))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionConnectConfDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionConnectConference),
+ SvamlActionConnectConferenceTest.dto);
}
@Test
void convertActionConnectMxp() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionConnectMxp))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionConnectMxpDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionConnectMxp), SvamlActionConnectMxpTest.dto);
}
@Test
void convertActionConnectPstn() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionConnectPstn))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionConnectPstnDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionConnectPstn), SvamlActionConnectPstnTest.dto);
}
@Test
void convertActionConnectSip() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionConnectSip))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionConnectSipDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionConnectSip), SvamlActionConnectSipTest.dto);
}
@Test
void convertActionContinue() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionContinue))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionContinueDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionContinue), SvamlActionContinueTest.dto);
}
@Test
void convertActionHangup() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionHanghup))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionHangUpDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionHanghup), SvamlActionHangupTest.dto);
}
@Test
void convertActionPark() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionPark))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionParkDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionPark), SvamlActionParkTest.dto);
}
@Test
void convertActionRunMenu() {
- Assertions.assertThat(SVAMLActionDtoConverter.convert(actionRunMenu))
- .usingRecursiveComparison()
- .isEqualTo(new SvamlActionDto(ActionRunMenuDtoTest.dto));
+ TestHelpers.recursiveEquals(
+ SVAMLActionDtoConverter.convert(actionRunMenu), SvamlActionRunMenuTest.dto);
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLInstructionDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLInstructionDtoConverterTest.java
index 3dfe12578..401600fcf 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLInstructionDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/SVAMLInstructionDtoConverterTest.java
@@ -1,13 +1,6 @@
package com.sinch.sdk.domains.voice.adapters.converters;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionAnswerDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionPlayFilesDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionSayDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionSendDtfmDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionSetCookieDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionStartRecordingDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.svaml.InstructionStopRecordingDtoTest;
-import com.sinch.sdk.domains.voice.models.dto.v1.SvamlInstructionDto;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.domains.voice.models.svaml.InstructionAnswer;
import com.sinch.sdk.domains.voice.models.svaml.InstructionPlayFiles;
import com.sinch.sdk.domains.voice.models.svaml.InstructionSay;
@@ -17,9 +10,16 @@
import com.sinch.sdk.domains.voice.models.svaml.InstructionStopRecording;
import com.sinch.sdk.domains.voice.models.svaml.StartRecordingOptions;
import com.sinch.sdk.domains.voice.models.svaml.TranscriptionOptions;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionAnswerTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionPlayFilesTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionSayTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionSendDtmfDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionSetCookieTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionStartRecordingTest;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionStopRecordingTest;
import com.sinch.sdk.models.DualToneMultiFrequency;
+import java.util.ArrayList;
import java.util.Collections;
-import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
public class SVAMLInstructionDtoConverterTest {
@@ -58,67 +58,50 @@ public class SVAMLInstructionDtoConverterTest {
@Test
void convertInstructionAnswer() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionAnswer)))
- .usingRecursiveComparison()
- .isEqualTo(
- Collections.singletonList(new SvamlInstructionDto(InstructionAnswerDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionAnswer)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionAnswerTest.dto)));
}
@Test
void convertInstructionPlayFiles() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionPlayFiles)))
- .usingRecursiveComparison()
- .isEqualTo(
- Collections.singletonList(new SvamlInstructionDto(InstructionPlayFilesDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionPlayFiles)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionPlayFilesTest.dto)));
}
@Test
void convertInstructionSay() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionSay)))
- .usingRecursiveComparison()
- .isEqualTo(Collections.singletonList(new SvamlInstructionDto(InstructionSayDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionSay)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionSayTest.dto)));
}
@Test
void convertInstructionSendDtfm() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionDtfm)))
- .usingRecursiveComparison()
- .isEqualTo(
- Collections.singletonList(new SvamlInstructionDto(InstructionSendDtfmDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionDtfm)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionSendDtmfDtoTest.dto)));
}
@Test
void convertInstructionSetCookie() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionSetCookie)))
- .usingRecursiveComparison()
- .isEqualTo(
- Collections.singletonList(new SvamlInstructionDto(InstructionSetCookieDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionSetCookie)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionSetCookieTest.dto)));
}
@Test
void convertInstructionStartRecording() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(
- Collections.singletonList(instructionStartRecording)))
- .usingRecursiveComparison()
- .isEqualTo(
- Collections.singletonList(
- new SvamlInstructionDto(InstructionStartRecordingDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionStartRecording)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionStartRecordingTest.dto)));
}
@Test
void convertInstructionStopRecording() {
- Assertions.assertThat(
- SVAMLInstructionDtoConverter.convert(
- Collections.singletonList(instructionStopRecording)))
- .usingRecursiveComparison()
- .isEqualTo(
- Collections.singletonList(
- new SvamlInstructionDto(InstructionStopRecordingDtoTest.dto)));
+ TestHelpers.recursiveEquals(
+ SVAMLInstructionDtoConverter.convert(Collections.singletonList(instructionStopRecording)),
+ new ArrayList<>(Collections.singletonList(SvamlInstructionStopRecordingTest.dto)));
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/WebhooksEventDtoConverterTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/WebhooksEventDtoConverterTest.java
index e9bbac2d4..8cb1abf7f 100644
--- a/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/WebhooksEventDtoConverterTest.java
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/adapters/converters/WebhooksEventDtoConverterTest.java
@@ -2,13 +2,14 @@
import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.core.utils.Pair;
import com.sinch.sdk.domains.voice.models.CallReasonType;
import com.sinch.sdk.domains.voice.models.CallResultType;
import com.sinch.sdk.domains.voice.models.DestinationNumber;
import com.sinch.sdk.domains.voice.models.DomainType;
import com.sinch.sdk.domains.voice.models.Price;
-import com.sinch.sdk.domains.voice.models.dto.v1.WebhooksEventDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.VoiceWebhookEventTest;
import com.sinch.sdk.domains.voice.models.webhooks.AmdAnswer;
import com.sinch.sdk.domains.voice.models.webhooks.AmdAnswerReasonType;
import com.sinch.sdk.domains.voice.models.webhooks.AmdAnswerStatusType;
@@ -22,7 +23,6 @@
import com.sinch.sdk.domains.voice.models.webhooks.PromptInputEvent;
import java.time.Instant;
import java.util.Collections;
-import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
@TestWithResources
@@ -102,45 +102,40 @@ public class WebhooksEventDtoConverterTest extends BaseTest {
@Test
void convertIncomingCallRequest() {
- Assertions.assertThat(
- WebhooksEventDtoConverter.convert(WebhooksEventDtoTest.expectedIceRequestDto))
- .usingRecursiveComparison()
- .isEqualTo(expectedIncomingCallEvent);
+ TestHelpers.recursiveEquals(
+ WebhooksEventDtoConverter.convert(VoiceWebhookEventTest.expectedIceRequestDto),
+ expectedIncomingCallEvent);
}
@Test
void convertDisconnectCallRequest() {
- Assertions.assertThat(
- WebhooksEventDtoConverter.convert(WebhooksEventDtoTest.expectedDiceRequestDto))
- .usingRecursiveComparison()
- .isEqualTo(expectedDisconnectCallEvent);
+ TestHelpers.recursiveEquals(
+ WebhooksEventDtoConverter.convert(VoiceWebhookEventTest.expectedDiceRequestDto),
+ expectedDisconnectCallEvent);
}
@Test
void convertAnsweredCallEvent() {
- Assertions.assertThat(
- WebhooksEventDtoConverter.convert(WebhooksEventDtoTest.expectedAceRequestDto))
- .usingRecursiveComparison()
- .isEqualTo(expectedAnsweredCallEvent);
+ TestHelpers.recursiveEquals(
+ WebhooksEventDtoConverter.convert(VoiceWebhookEventTest.expectedAceRequestDto),
+ expectedAnsweredCallEvent);
}
@Test
void convertPieEvent() {
- Assertions.assertThat(
- WebhooksEventDtoConverter.convert(WebhooksEventDtoTest.expectedPieRequestDto))
- .usingRecursiveComparison()
- .isEqualTo(expectedPromptInputEvent);
+ TestHelpers.recursiveEquals(
+ WebhooksEventDtoConverter.convert(VoiceWebhookEventTest.expectedPieRequestDto),
+ expectedPromptInputEvent);
}
@Test
void convertNotifyEvent() {
- Assertions.assertThat(
- WebhooksEventDtoConverter.convert(WebhooksEventDtoTest.expectedNotifyRequestDto))
- .usingRecursiveComparison()
- .isEqualTo(expectedNotifyEvent);
+ TestHelpers.recursiveEquals(
+ WebhooksEventDtoConverter.convert(VoiceWebhookEventTest.expectedNotifyRequestDto),
+ expectedNotifyEvent);
}
}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/ApplicationsServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/ApplicationsServiceTest.java
new file mode 100644
index 000000000..86365d09d
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/ApplicationsServiceTest.java
@@ -0,0 +1,113 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import com.adelean.inject.resources.junit.jupiter.TestWithResources;
+import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.core.exceptions.ApiException;
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.domains.voice.api.v1.internal.ApplicationsApi;
+import com.sinch.sdk.domains.voice.models.v1.applications.Callbacks;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequestTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateCallbackUrlsRequestTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequestTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.GetCallbackUrlsResponseTest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponse;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponseTest;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+
+@TestWithResources
+public class ApplicationsServiceTest extends BaseTest {
+
+ @Mock ApplicationsApi api;
+ @Mock VoiceContext context;
+ @Mock HttpClient httpClient;
+ @Mock Map authManagers;
+
+ @Captor ArgumentCaptor applicationKeyCaptor;
+ @Captor ArgumentCaptor callbacksDtoCaptor;
+ @Captor ArgumentCaptor updateNumbersDtoCaptor;
+ @Captor ArgumentCaptor unassignNumbersDtoCaptor;
+
+ com.sinch.sdk.domains.voice.api.v1.adapters.ApplicationsService service;
+
+ @BeforeEach
+ public void initMocks() {
+ service = spy(new ApplicationsService(context, httpClient, authManagers));
+ doReturn(api).when(service).getApi();
+ }
+
+ @Test
+ void getNumbers() throws ApiException {
+
+ when(api.configurationGetNumbers()).thenReturn(OwnedNumbersResponseTest.expected);
+
+ OwnedNumbersResponse response = service.listNumbers();
+
+ TestHelpers.recursiveEquals(response, OwnedNumbersResponseTest.expected);
+ }
+
+ @Test
+ void getCallbackUrls() throws ApiException {
+
+ when(api.configurationGetCallbackURLs(eq("app id")))
+ .thenReturn(GetCallbackUrlsResponseTest.expected);
+
+ Callbacks response = service.getCallbackUrls("app id");
+
+ TestHelpers.recursiveEquals(response, GetCallbackUrlsResponseTest.expected);
+ }
+
+ @Test
+ void updateCallbackUrls() {
+
+ service.updateCallbackUrls("app key", UpdateCallbackUrlsRequestTest.expected);
+
+ verify(api)
+ .configurationUpdateCallbackURLs(
+ applicationKeyCaptor.capture(), callbacksDtoCaptor.capture());
+
+ String appKey = applicationKeyCaptor.getValue();
+ Assertions.assertThat(appKey).isEqualTo("app key");
+
+ Callbacks body = callbacksDtoCaptor.getValue();
+ TestHelpers.recursiveEquals(body, UpdateCallbackUrlsRequestTest.expected);
+ }
+
+ @Test
+ void updateNumbers() {
+
+ service.assignNumbers(UpdateNumbersRequestTest.updateNumbersDto);
+
+ verify(api).configurationUpdateNumbers(updateNumbersDtoCaptor.capture());
+
+ UpdateNumbersRequest body = updateNumbersDtoCaptor.getValue();
+ TestHelpers.recursiveEquals(body, UpdateNumbersRequestTest.updateNumbersDto);
+ }
+
+ @Test
+ void unassignNumber() {
+
+ service.unassignNumber(UnAssignNumberRequestTest.unAssignNumberDto);
+
+ verify(api).configurationUnassignNumber(unassignNumbersDtoCaptor.capture());
+
+ UnAssignNumberRequest body = unassignNumbersDtoCaptor.getValue();
+ TestHelpers.recursiveEquals(body, UnAssignNumberRequestTest.unAssignNumberDto);
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/CalloutsServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/CalloutsServiceTest.java
new file mode 100644
index 000000000..f94b3a37b
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/CalloutsServiceTest.java
@@ -0,0 +1,95 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import com.adelean.inject.resources.junit.jupiter.TestWithResources;
+import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.exceptions.ApiException;
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.domains.voice.api.v1.internal.CalloutsApi;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutRequestDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutResponseDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.internal.CalloutRequestInternalImpl;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mock;
+
+@TestWithResources
+public class CalloutsServiceTest extends BaseTest {
+
+ @Mock CalloutsApi api;
+ @Mock VoiceContext context;
+ @Mock HttpClient httpClient;
+ @Mock Map authManagers;
+
+ CalloutsService service;
+
+ @BeforeEach
+ public void initMocks() {
+ service = spy(new CalloutsService(context, httpClient, authManagers));
+ doReturn(api).when(service).getApi();
+ }
+
+ @Test
+ void conference() throws ApiException {
+
+ CalloutRequestInternalImpl request = new CalloutRequestInternalImpl();
+ request.setActualInstance(CalloutRequestDtoTest.conferenceRequestCalloutDto);
+
+ when(api.callouts(eq(request))).thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+
+ String response = service.conference(CalloutRequestDtoTest.conferenceRequestCalloutDto);
+
+ Assertions.assertThat(response)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ }
+
+ @Test
+ void textToSpeech() throws ApiException {
+
+ CalloutRequestInternalImpl request = new CalloutRequestInternalImpl();
+ request.setActualInstance(CalloutRequestDtoTest.ttsRequestDto);
+
+ when(api.callouts(eq(request))).thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+
+ String response = service.textToSpeech(CalloutRequestDtoTest.ttsRequestDto);
+
+ Assertions.assertThat(response)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ }
+
+ @Test
+ void custom() throws ApiException {
+
+ CalloutRequestInternalImpl request = new CalloutRequestInternalImpl();
+ request.setActualInstance(CalloutRequestDtoTest.customRequestDto);
+
+ when(api.callouts(eq(request))).thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+
+ String response = service.custom(CalloutRequestDtoTest.customRequestDto);
+
+ Assertions.assertThat(response)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ }
+
+ @Test
+ void call() throws ApiException {
+
+ CalloutRequestInternalImpl request = new CalloutRequestInternalImpl();
+ request.setActualInstance(CalloutRequestDtoTest.customRequestDto);
+
+ when(api.callouts(eq(request))).thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto);
+
+ String response = service.call(CalloutRequestDtoTest.customRequestDto);
+
+ Assertions.assertThat(response)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/CallsServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/CallsServiceTest.java
new file mode 100644
index 000000000..26789b984
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/CallsServiceTest.java
@@ -0,0 +1,93 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import com.adelean.inject.resources.junit.jupiter.TestWithResources;
+import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.core.exceptions.ApiException;
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.domains.voice.api.v1.internal.CallsApi;
+import com.sinch.sdk.domains.voice.models.v1.calls.CallInformationTest;
+import com.sinch.sdk.domains.voice.models.v1.calls.request.CallLeg;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControlTest;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+
+@TestWithResources
+public class CallsServiceTest extends BaseTest {
+
+ @Mock CallsApi api;
+ @Mock VoiceContext context;
+ @Mock HttpClient httpClient;
+ @Mock Map authManagers;
+
+ @Captor ArgumentCaptor callIdCaptor;
+ @Captor ArgumentCaptor callLegCaptor;
+ @Captor ArgumentCaptor updateParametersCaptor;
+ CallsService service;
+
+ @BeforeEach
+ public void initMocks() {
+ service = spy(new CallsService(context, httpClient, authManagers));
+ doReturn(api).when(service).getApi();
+ }
+
+ @Test
+ void get() throws ApiException {
+ when(api.callingGetCallResult(
+ eq(CallInformationTest.expectedCallsGetInformationResponseDto.getCallId())))
+ .thenReturn(CallInformationTest.expectedCallsGetInformationResponseDto);
+
+ CallInformation response =
+ service.get(CallInformationTest.expectedCallsGetInformationResponseDto.getCallId());
+
+ TestHelpers.recursiveEquals(
+ response, CallInformationTest.expectedCallsGetInformationResponseDto);
+ }
+
+ @Test
+ void update() throws ApiException {
+ service.update("call id", SvamlControlTest.expectedSvamlControl);
+
+ verify(api).callingUpdateCall(callIdCaptor.capture(), updateParametersCaptor.capture());
+
+ String callId = callIdCaptor.getValue();
+ Assertions.assertThat(callId).isEqualTo("call id");
+
+ SvamlControl body = updateParametersCaptor.getValue();
+ TestHelpers.recursiveEquals(body, SvamlControlTest.expectedSvamlControl);
+ }
+
+ @Test
+ void manageWithCallLeg() throws ApiException {
+
+ service.manageWithCallLeg("call id", CallLeg.BOTH, SvamlControlTest.expectedSvamlControl);
+
+ verify(api)
+ .callingManageCallWithCallLeg(
+ callIdCaptor.capture(), callLegCaptor.capture(), updateParametersCaptor.capture());
+
+ String callId = callIdCaptor.getValue();
+ Assertions.assertThat(callId).isEqualTo("call id");
+
+ String legType = callLegCaptor.getValue();
+ Assertions.assertThat(legType).isEqualTo("both");
+
+ SvamlControl body = updateParametersCaptor.getValue();
+ TestHelpers.recursiveEquals(body, SvamlControlTest.expectedSvamlControl);
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/ConferencesServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/ConferencesServiceTest.java
new file mode 100644
index 000000000..4196b3352
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/ConferencesServiceTest.java
@@ -0,0 +1,130 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import com.adelean.inject.resources.junit.jupiter.TestWithResources;
+import com.sinch.sdk.BaseTest;
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.core.exceptions.ApiException;
+import com.sinch.sdk.core.http.AuthManager;
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.domains.voice.api.v1.internal.ConferencesApi;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutRequestDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.callouts.CalloutResponseDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ConferencesRequestDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.ConferencesResponseDtoTest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.GetConferenceInfoResponse;
+import com.sinch.sdk.models.VoiceContext;
+import java.util.Map;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+
+@TestWithResources
+public class ConferencesServiceTest extends BaseTest {
+
+ @Mock ConferencesApi api;
+ @Mock VoiceContext context;
+ @Mock HttpClient httpClient;
+ @Mock Map authManagers;
+ @Mock CalloutsService calloutsService;
+ @Captor ArgumentCaptor conferenceIdCaptor;
+ @Captor ArgumentCaptor callIdCaptor;
+ @Captor ArgumentCaptor participantCaptor;
+ static ConferencesService service;
+
+ @BeforeEach
+ public void initMocks() {
+ service = spy(new ConferencesService(context, httpClient, authManagers, calloutsService));
+ }
+
+ @Test
+ void call() throws ApiException {
+
+ when(calloutsService.conference(eq(CalloutRequestDtoTest.conferenceRequestCalloutDto)))
+ .thenReturn(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+
+ String response = service.call(CalloutRequestDtoTest.conferenceRequestCalloutDto);
+
+ TestHelpers.recursiveEquals(
+ response, CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ }
+
+ @Test
+ void get() throws ApiException {
+ doReturn(api).when(service).getApi();
+
+ when(api.callingGetConferenceInfo(
+ eq(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId())))
+ .thenReturn(ConferencesResponseDtoTest.expectedGetConferenceInfoResponseDto);
+
+ GetConferenceInfoResponse response =
+ service.get(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
+
+ TestHelpers.recursiveEquals(
+ response, ConferencesResponseDtoTest.expectedGetConferenceInfoResponseDto);
+ }
+
+ @Test
+ void kickParticipant() throws ApiException {
+ doReturn(api).when(service).getApi();
+ service.kickParticipant(
+ CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId(),
+ CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ verify(api)
+ .callingKickConferenceParticipant(callIdCaptor.capture(), conferenceIdCaptor.capture());
+
+ String parameter = callIdCaptor.getValue();
+ Assertions.assertThat(parameter)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ parameter = conferenceIdCaptor.getValue();
+ Assertions.assertThat(parameter)
+ .isEqualTo(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
+ }
+
+ @Test
+ void kickAll() throws ApiException {
+ doReturn(api).when(service).getApi();
+
+ service.kickAll(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
+ verify(api).callingKickConferenceAll(conferenceIdCaptor.capture());
+
+ String parameter = conferenceIdCaptor.getValue();
+ Assertions.assertThat(parameter)
+ .isEqualTo(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
+ }
+
+ @Test
+ void manageParticipant() throws ApiException {
+
+ doReturn(api).when(service).getApi();
+
+ service.manageParticipant(
+ CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId(),
+ CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId(),
+ ConferencesRequestDtoTest.manageConferenceParticipantRequestDto);
+
+ verify(api)
+ .callingManageConferenceParticipant(
+ callIdCaptor.capture(), conferenceIdCaptor.capture(), participantCaptor.capture());
+
+ String parameter = callIdCaptor.getValue();
+ Assertions.assertThat(parameter)
+ .isEqualTo(CalloutResponseDtoTest.expectedCalloutResponseDto.getCallId());
+ parameter = conferenceIdCaptor.getValue();
+ Assertions.assertThat(parameter)
+ .isEqualTo(CalloutRequestDtoTest.conferenceRequestCalloutDto.getConferenceId());
+
+ ManageConferenceParticipantRequest participant = participantCaptor.getValue();
+ Assertions.assertThat(participant)
+ .isEqualTo(ConferencesRequestDtoTest.manageConferenceParticipantRequestDto);
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/VoiceServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/VoiceServiceTest.java
new file mode 100644
index 000000000..c1e7c4bac
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/api/v1/adapters/VoiceServiceTest.java
@@ -0,0 +1,69 @@
+package com.sinch.sdk.domains.voice.api.v1.adapters;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import com.sinch.sdk.core.http.HttpClient;
+import com.sinch.sdk.models.ApplicationCredentials;
+import com.sinch.sdk.models.VoiceContext;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mock;
+
+class VoiceServiceTest {
+
+ @Mock HttpClient httpClient;
+
+ @Test
+ void doNotAcceptNullApplicationCredentials() {
+ VoiceContext context = VoiceContext.builder().build();
+ Exception exception =
+ assertThrows(NullPointerException.class, () -> new VoiceService(null, context, httpClient));
+
+ assertTrue(exception.getMessage().contains("Credentials must be defined"));
+ }
+
+ @Test
+ void doNotAcceptNullContext() {
+ ApplicationCredentials credentials = ApplicationCredentials.builder().build();
+
+ Exception exception =
+ assertThrows(
+ NullPointerException.class, () -> new VoiceService(credentials, null, httpClient));
+
+ assertTrue(exception.getMessage().contains("Context must be defined"));
+ }
+
+ @Test
+ void doNotAcceptNullApplicationKey() {
+ ApplicationCredentials credentials =
+ ApplicationCredentials.builder()
+ .setApplicationKey(null)
+ .setApplicationSecret("foo secret")
+ .build();
+ VoiceContext context = VoiceContext.builder().build();
+
+ Exception exception =
+ assertThrows(
+ IllegalArgumentException.class,
+ () -> new VoiceService(credentials, context, httpClient));
+
+ assertTrue(exception.getMessage().contains("applicationKey"));
+ }
+
+ @Test
+ void doNotAcceptNullApplicationSecret() {
+ ApplicationCredentials credentials =
+ ApplicationCredentials.builder()
+ .setApplicationKey("foo key")
+ .setApplicationSecret(null)
+ .build();
+ VoiceContext context = VoiceContext.builder().build();
+
+ Exception exception =
+ assertThrows(
+ IllegalArgumentException.class,
+ () -> new VoiceService(credentials, context, httpClient));
+
+ assertTrue(exception.getMessage().contains("applicationSecret"));
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/domains/voice/models/v1/svaml/action/MenuOptionActionFactoryTest.java b/client/src/test/java/com/sinch/sdk/domains/voice/models/v1/svaml/action/MenuOptionActionFactoryTest.java
new file mode 100644
index 000000000..e257d8ebe
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/domains/voice/models/v1/svaml/action/MenuOptionActionFactoryTest.java
@@ -0,0 +1,46 @@
+package com.sinch.sdk.domains.voice.models.v1.svaml.action;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.MenuOptionActionFactory.MenuOptionActionType;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+class MenuOptionActionFactoryTest {
+
+ @Test
+ void buildMenu() {
+ String value = MenuOptionActionFactory.build(MenuOptionActionType.MENU, "my value");
+ Assertions.assertEquals(value, "menu(my value)");
+ }
+
+ @Test
+ void buildReturn() {
+ String value = MenuOptionActionFactory.build(MenuOptionActionType.RETURN, "my value");
+ Assertions.assertEquals(value, "return(my value)");
+ }
+
+ @Test
+ void menuAction() {
+ String value = MenuOptionActionFactory.menuAction("my value");
+ Assertions.assertEquals(value, "menu(my value)");
+ }
+
+ @Test
+ void returnAction() {
+ String value = MenuOptionActionFactory.returnAction("my value");
+ Assertions.assertEquals(value, "return(my value)");
+ }
+
+ @Test
+ void actionRequired() {
+
+ Exception thrown =
+ Assertions.assertThrows(
+ Exception.class,
+ () -> MenuOptionActionFactory.build(null, "my value"),
+ "Expected build() to throw, but it didn't");
+
+ Assertions.assertEquals(thrown.getMessage(), "Action type cannot be null");
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/conversation/ConversationIT.java b/client/src/test/java/com/sinch/sdk/e2e/domains/conversation/ConversationIT.java
index e801e5119..f865e2159 100644
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/conversation/ConversationIT.java
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/conversation/ConversationIT.java
@@ -1,10 +1,16 @@
package com.sinch.sdk.e2e.domains.conversation;
+import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
+
+import org.junit.platform.suite.api.ConfigurationParameter;
import org.junit.platform.suite.api.IncludeEngines;
import org.junit.platform.suite.api.SelectClasspathResource;
import org.junit.platform.suite.api.Suite;
+import org.junit.platform.suite.api.SuiteDisplayName;
@Suite
+@SuiteDisplayName("Conversation V1")
@IncludeEngines("cucumber")
@SelectClasspathResource("features/conversation")
+@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.sinch.sdk.e2e.domains.conversation")
public class ConversationIT {}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/VoiceIT.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/VoiceIT.java
deleted file mode 100644
index 176ca6816..000000000
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/VoiceIT.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.sinch.sdk.e2e.domains.voice;
-
-import org.junit.platform.suite.api.IncludeEngines;
-import org.junit.platform.suite.api.SelectClasspathResource;
-import org.junit.platform.suite.api.Suite;
-
-@Suite
-@IncludeEngines("cucumber")
-@SelectClasspathResource("features/voice")
-public class VoiceIT {}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/ApplicationsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/ApplicationsSteps.java
similarity index 99%
rename from client/src/test/java/com/sinch/sdk/e2e/domains/voice/ApplicationsSteps.java
rename to client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/ApplicationsSteps.java
index b7d3a2cd6..0995eaa21 100644
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/ApplicationsSteps.java
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/ApplicationsSteps.java
@@ -1,4 +1,4 @@
-package com.sinch.sdk.e2e.domains.voice;
+package com.sinch.sdk.e2e.domains.voice.v0;
import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.domains.voice.ApplicationsService;
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/CalloutsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/CalloutsSteps.java
similarity index 99%
rename from client/src/test/java/com/sinch/sdk/e2e/domains/voice/CalloutsSteps.java
rename to client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/CalloutsSteps.java
index 0d67b1cd0..31b6ce12d 100644
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/CalloutsSteps.java
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/CalloutsSteps.java
@@ -1,4 +1,4 @@
-package com.sinch.sdk.e2e.domains.voice;
+package com.sinch.sdk.e2e.domains.voice.v0;
import com.sinch.sdk.domains.voice.CalloutsService;
import com.sinch.sdk.domains.voice.models.DestinationNumber;
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/CallsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/CallsSteps.java
similarity index 99%
rename from client/src/test/java/com/sinch/sdk/e2e/domains/voice/CallsSteps.java
rename to client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/CallsSteps.java
index e8d3ef0e0..ecdeabbb1 100644
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/CallsSteps.java
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/CallsSteps.java
@@ -1,4 +1,4 @@
-package com.sinch.sdk.e2e.domains.voice;
+package com.sinch.sdk.e2e.domains.voice.v0;
import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.core.exceptions.ApiException;
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/ConferenceSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/ConferenceSteps.java
similarity index 99%
rename from client/src/test/java/com/sinch/sdk/e2e/domains/voice/ConferenceSteps.java
rename to client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/ConferenceSteps.java
index d77cf9677..20b77039c 100644
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/ConferenceSteps.java
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/ConferenceSteps.java
@@ -1,4 +1,4 @@
-package com.sinch.sdk.e2e.domains.voice;
+package com.sinch.sdk.e2e.domains.voice.v0;
import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.domains.voice.ConferencesService;
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/VoiceIT.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/VoiceIT.java
new file mode 100644
index 000000000..269765e95
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/VoiceIT.java
@@ -0,0 +1,16 @@
+package com.sinch.sdk.e2e.domains.voice.v0;
+
+import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
+
+import org.junit.platform.suite.api.ConfigurationParameter;
+import org.junit.platform.suite.api.IncludeEngines;
+import org.junit.platform.suite.api.SelectClasspathResource;
+import org.junit.platform.suite.api.Suite;
+import org.junit.platform.suite.api.SuiteDisplayName;
+
+@Suite
+@SuiteDisplayName("Voice V0")
+@IncludeEngines("cucumber")
+@SelectClasspathResource("features/voice")
+@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.sinch.sdk.e2e.domains.voice.v0")
+public class VoiceIT {}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/WebhooksEventsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/WebhooksEventsSteps.java
similarity index 82%
rename from client/src/test/java/com/sinch/sdk/e2e/domains/voice/WebhooksEventsSteps.java
rename to client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/WebhooksEventsSteps.java
index 60d7ae04a..0aeb6a8f8 100644
--- a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/WebhooksEventsSteps.java
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v0/WebhooksEventsSteps.java
@@ -1,13 +1,16 @@
-package com.sinch.sdk.e2e.domains.voice;
+package com.sinch.sdk.e2e.domains.voice.v0;
import com.sinch.sdk.core.TestHelpers;
import com.sinch.sdk.domains.voice.WebHooksService;
import com.sinch.sdk.domains.voice.models.CallReasonType;
import com.sinch.sdk.domains.voice.models.CallResultType;
import com.sinch.sdk.domains.voice.models.DestinationNumber;
+import com.sinch.sdk.domains.voice.models.DestinationNumberType;
+import com.sinch.sdk.domains.voice.models.DomainType;
import com.sinch.sdk.domains.voice.models.Price;
import com.sinch.sdk.domains.voice.models.webhooks.AnsweredCallEvent;
import com.sinch.sdk.domains.voice.models.webhooks.DisconnectCallEvent;
+import com.sinch.sdk.domains.voice.models.webhooks.IncomingCallEvent;
import com.sinch.sdk.domains.voice.models.webhooks.MenuInputType;
import com.sinch.sdk.domains.voice.models.webhooks.MenuResult;
import com.sinch.sdk.domains.voice.models.webhooks.MenuResultInputMethodType;
@@ -15,6 +18,7 @@
import com.sinch.sdk.domains.voice.models.webhooks.WebhooksEvent;
import com.sinch.sdk.e2e.Config;
import com.sinch.sdk.e2e.domains.WebhooksHelper;
+import com.sinch.sdk.models.E164PhoneNumber;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
@@ -34,6 +38,7 @@ public class WebhooksEventsSteps {
WebhooksHelper.Response pieSequence;
WebhooksHelper.Response diceEvent;
WebhooksHelper.Response aceEvent;
+ WebhooksHelper.Response iceEvent;
PromptInputEvent expectedPieReturnEvent =
PromptInputEvent.builder()
@@ -90,6 +95,24 @@ public class WebhooksEventsSteps {
.setCustom("Custom text")
.build();
+ IncomingCallEvent expectedIceEvent =
+ IncomingCallEvent.builder()
+ .setCallId("1ce0ffee-ca11-ca11-ca11-abcdef000053")
+ .setCallResourceUrl(
+ "https://calling-use1.api.sinch.com/calling/v1/calls/id/1ce0ffee-ca11-ca11-ca11-abcdef000053")
+ .setTimestamp(Instant.parse("2024-06-06T17:20:14Z"))
+ .setVersion(1)
+ .setUserRate(Price.builder().setCurrencyId("USD").setAmount(0.0F).build())
+ .setCli("12015555555")
+ .setTo(
+ new DestinationNumber(
+ E164PhoneNumber.valueOf("+12017777777"), DestinationNumberType.DID))
+ .setDomain(DomainType.PSTN)
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .setOriginationType(DomainType.PSTN)
+ .setRdnis("")
+ .build();
+
@Given("^the Voice Webhooks handler is available$")
public void serviceAvailable() {
service = Config.getSinchClient().voice().webhooks();
@@ -121,6 +144,12 @@ public void sendACEEvent() throws IOException {
WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/ace"), service::unserializeWebhooksEvent);
}
+ @When("^I send a request to trigger a \"ICE\" event$")
+ public void sendICEEvent() throws IOException {
+ iceEvent =
+ WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/ice"), service::unserializeWebhooksEvent);
+ }
+
@Then("the header of the {string} event with a {string} type contains a valid authorization")
public void validatePieHeader(String event, String type) {
@@ -146,6 +175,8 @@ public void validateHeader(String event) {
receivedEvent = diceEvent;
} else if (event.equals("ACE")) {
receivedEvent = aceEvent;
+ } else if (event.equals("ICE")) {
+ receivedEvent = iceEvent;
} else {
Assertions.fail();
}
@@ -184,6 +215,9 @@ public void validateEvent(String event) {
} else if (event.equals("ACE")) {
receivedEvent = aceEvent;
expectedEvent = expectedAceEvent;
+ } else if (event.equals("ICE")) {
+ receivedEvent = iceEvent;
+ expectedEvent = expectedIceEvent;
} else {
Assertions.fail();
}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/ApplicationsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/ApplicationsSteps.java
new file mode 100644
index 000000000..b5616b97b
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/ApplicationsSteps.java
@@ -0,0 +1,166 @@
+package com.sinch.sdk.e2e.domains.voice.v1;
+
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.domains.voice.api.v1.ApplicationsService;
+import com.sinch.sdk.domains.voice.models.v1.Price;
+import com.sinch.sdk.domains.voice.models.v1.applications.Callbacks;
+import com.sinch.sdk.domains.voice.models.v1.applications.CallbacksUrl;
+import com.sinch.sdk.domains.voice.models.v1.applications.Capability;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumberInformation;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponse;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberInformation;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberInformation.NumberTypeEnum;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberResponse;
+import com.sinch.sdk.e2e.Config;
+import io.cucumber.java.en.Given;
+import io.cucumber.java.en.Then;
+import io.cucumber.java.en.When;
+import java.util.Arrays;
+import java.util.Collections;
+import org.junit.jupiter.api.Assertions;
+
+public class ApplicationsSteps {
+
+ ApplicationsService service;
+
+ OwnedNumbersResponse listNumbersResponse;
+ Boolean assignNumbersPassed;
+ Boolean unassignNumberPassed;
+
+ QueryNumberResponse queryNumberResult;
+ Callbacks getCallbackUrlsResult;
+ Boolean updateCallbackUrlsPassed;
+
+ @Given("^the Voice service \"Applications\" is available")
+ public void serviceAvailable() {
+
+ service = Config.getSinchClient().voice().v1().applications();
+ }
+
+ @When("^I send a request to get information about my owned numbers$")
+ public void listNumbers() {
+
+ listNumbersResponse = service.listNumbers();
+ }
+
+ @When("^I send a request to assign some numbers to a Voice Application$")
+ public void assignNumbers() {
+
+ UpdateNumbersRequest request =
+ UpdateNumbersRequest.builder()
+ .setNumbers(Collections.singletonList("+12012222222"))
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .setCapability(Capability.VOICE)
+ .build();
+ service.assignNumbers(request);
+ assignNumbersPassed = true;
+ }
+
+ @When("^I send a request to unassign a number from a Voice Application$")
+ public void unassignNumber() {
+
+ UnAssignNumberRequest request =
+ UnAssignNumberRequest.builder().setNumber("+12012222222").build();
+ service.unassignNumber(request);
+ unassignNumberPassed = true;
+ }
+
+ @When("^I send a request to get information about a specific number$")
+ public void queryNumber() {
+
+ queryNumberResult = service.queryNumber("+12015555555");
+ }
+
+ @When("^I send a request to get the callback URLs associated to an application$")
+ public void getCallbackUrls() {
+
+ getCallbackUrlsResult = service.getCallbackUrls("f00dcafe-abba-c0de-1dea-dabb1ed4caf3");
+ }
+
+ @When("^I send a request to update the callback URLs associated to an application$")
+ public void updateCallbackUrls() {
+ Callbacks request =
+ Callbacks.builder()
+ .setUrl(
+ CallbacksUrl.builder()
+ .setPrimary("https://my-new.callback-server.com/voice")
+ .build())
+ .build();
+ service.updateCallbackUrls("f00dcafe-abba-c0de-1dea-dabb1ed4caf3", request);
+ updateCallbackUrlsPassed = true;
+ }
+
+ @Then("the response contains details about the numbers that I own")
+ public void listNumbersResult() {
+ OwnedNumbersResponse expected =
+ OwnedNumbersResponse.builder()
+ .setNumbers(
+ Arrays.asList(
+ OwnedNumberInformation.builder()
+ .setNumber("+12012222222")
+ .setCapability(Capability.VOICE)
+ .build(),
+ OwnedNumberInformation.builder()
+ .setNumber("+12013333333")
+ .setCapability(Capability.VOICE)
+ .setApplicationKey("ba5eba11-1dea-1337-babe-5a1ad00d1eaf")
+ .build(),
+ OwnedNumberInformation.builder()
+ .setNumber("+12014444444")
+ .setCapability(Capability.VOICE)
+ .build(),
+ OwnedNumberInformation.builder()
+ .setNumber("+12015555555")
+ .setCapability(Capability.VOICE)
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .build()))
+ .build();
+ TestHelpers.recursiveEquals(listNumbersResponse, expected);
+ }
+
+ @Then("the assign numbers response contains no data")
+ public void assignNumbersResult() {
+ Assertions.assertTrue(assignNumbersPassed);
+ }
+
+ @Then("the unassign number response contains no data")
+ public void unassignNumberResult() {
+ Assertions.assertTrue(unassignNumberPassed);
+ }
+
+ @Then("the response contains details about the specific number")
+ public void queryNumberResult() {
+ QueryNumberResponse expected =
+ QueryNumberResponse.builder()
+ .setNumber(
+ QueryNumberInformation.builder()
+ .setCountryId("US")
+ .setNumberType(NumberTypeEnum.FIXED)
+ .setNormalizedNumber("+12015555555")
+ .setRestricted(true)
+ .setRate(Price.builder().setCurrencyId("USD").setAmount(0.01F).build())
+ .build())
+ .build();
+ TestHelpers.recursiveEquals(queryNumberResult, expected);
+ }
+
+ @Then("the response contains callback URLs details")
+ public void getCallbackUrlsResult() {
+ Callbacks expected =
+ Callbacks.builder()
+ .setUrl(
+ CallbacksUrl.builder()
+ .setPrimary("https://my.callback-server.com/voice")
+ .setFallback("https://my.fallback-server.com/voice")
+ .build())
+ .build();
+ TestHelpers.recursiveEquals(getCallbackUrlsResult, expected);
+ }
+
+ @Then("the update callback URLs response contains no data")
+ public void updateCallbackUrlsResult() {
+ Assertions.assertTrue(updateCallbackUrlsPassed);
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/CalloutsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/CalloutsSteps.java
new file mode 100644
index 000000000..25d35b49d
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/CalloutsSteps.java
@@ -0,0 +1,157 @@
+package com.sinch.sdk.e2e.domains.voice.v1;
+
+import com.sinch.sdk.domains.voice.api.v1.CalloutsService;
+import com.sinch.sdk.domains.voice.models.v1.MusicOnHold;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestCustom;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestTTS;
+import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;
+import com.sinch.sdk.domains.voice.models.v1.svaml.ControlUrl;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.Menu;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.MenuOption;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.MenuOptionActionFactory;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionConnectPstn;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionRunMenu;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.StartRecordingOptions;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionSay;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionStartRecording;
+import com.sinch.sdk.e2e.Config;
+import com.sinch.sdk.models.DualToneMultiFrequency;
+import io.cucumber.java.en.Given;
+import io.cucumber.java.en.Then;
+import io.cucumber.java.en.When;
+import java.util.Arrays;
+import org.junit.jupiter.api.Assertions;
+
+public class CalloutsSteps {
+
+ CalloutsService service;
+ String ttsResponse;
+ String conferenceResponse;
+ String customResponse;
+
+ @Given("^the Voice service \"Callouts\" is available$")
+ public void serviceAvailable() {
+ service = Config.getSinchClient().voice().v1().callouts();
+ }
+
+ @When("^I send a request to make a TTS call$")
+ public void createTTS() {
+
+ CalloutRequestTTS request =
+ CalloutRequestTTS.builder()
+ .setLocale("en-US")
+ .setDestination(DestinationPstn.from("+12017777777"))
+ .setCli("+12015555555")
+ .setText("Hello, this is a call from Sinch.")
+ .build();
+
+ ttsResponse = service.textToSpeech(request);
+ }
+
+ @When("^I send a request to make a Conference call with the \"Callout\" service$")
+ public void createConference() {
+ CalloutRequestConference request =
+ CalloutRequestConference.builder()
+ .setLocale("en-US")
+ .setDestination(DestinationPstn.from("+12017777777"))
+ .setCli("+12015555555")
+ .setConferenceId("myConferenceId-E2E")
+ .setGreeting("Welcome to this conference call.")
+ .setMusicOnHold(MusicOnHold.MUSIC1)
+ .build();
+
+ conferenceResponse = service.conference(request);
+ }
+
+ @When("^I send a request to make a Custom call$")
+ public void createCustom() {
+ CalloutRequestCustom request =
+ CalloutRequestCustom.builder()
+ .setDestination(DestinationPstn.from("+12017777777"))
+ .setCli("+12015555555")
+ .setCustom("Custom text")
+ .setIce(
+ SvamlControl.builder()
+ .setAction(
+ SvamlActionConnectPstn.builder()
+ .setNumber("+12017777777")
+ .setCli("+12015555555")
+ .build())
+ .setInstructions(
+ Arrays.asList(
+ SvamlInstructionSay.builder()
+ .setText("Welcome to Sinch.")
+ .setLocale("en-US/male")
+ .build(),
+ SvamlInstructionStartRecording.builder()
+ .setOptions(
+ StartRecordingOptions.builder()
+ .setDestinationUrl("To specify")
+ .setCredentials("To specify")
+ .build())
+ .build()))
+ .build())
+ .setAce(
+ SvamlControl.builder()
+ .setAction(
+ SvamlActionRunMenu.builder()
+ .setLocale("Kimberly")
+ .setEnableVoice(true)
+ .setBarge(true)
+ .setMenus(
+ Arrays.asList(
+ Menu.builder()
+ .setId("main")
+ .setMainPrompt(
+ "#tts[Welcome to the main menu. Press 1 to confirm"
+ + " order or 2 to cancel]")
+ .setRepeatPrompt(
+ "#tts[We didn't get your input, please try again]")
+ .setTimeoutMills(5000)
+ .setOptions(
+ Arrays.asList(
+ MenuOption.builder()
+ .setDtmf(DualToneMultiFrequency.valueOf("1"))
+ .setAction(
+ MenuOptionActionFactory.menuAction(
+ "confirm"))
+ .build(),
+ MenuOption.builder()
+ .setDtmf(DualToneMultiFrequency.valueOf("2"))
+ .setAction(
+ MenuOptionActionFactory.returnAction(
+ "cancel"))
+ .build()))
+ .build(),
+ Menu.builder()
+ .setId("confirm")
+ .setMainPrompt(
+ "#tts[Thank you for confirming your order. Enter your"
+ + " 4-digit PIN.]")
+ .setMaxDigits(4)
+ .build()))
+ .build())
+ .build())
+ .setPie(ControlUrl.from("https://callback-server.com/voice"))
+ .build();
+
+ customResponse = service.custom(request);
+ }
+
+ @Then("the callout response contains the TTS call ID")
+ public void ttsResult() {
+ Assertions.assertEquals(ttsResponse, "1ce0ffee-ca11-ca11-ca11-abcdef000001");
+ }
+
+ @Then("the callout response contains the Conference call ID")
+ public void conferenceResult() {
+ Assertions.assertEquals(conferenceResponse, "1ce0ffee-ca11-ca11-ca11-abcdef000002");
+ }
+
+ @Then("the callout response contains the Custom call ID")
+ public void customResult() {
+ Assertions.assertEquals(customResponse, "1ce0ffee-ca11-ca11-ca11-abcdef000003");
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/CallsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/CallsSteps.java
new file mode 100644
index 000000000..26a5ef5e1
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/CallsSteps.java
@@ -0,0 +1,134 @@
+package com.sinch.sdk.e2e.domains.voice.v1;
+
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.core.exceptions.ApiException;
+import com.sinch.sdk.domains.voice.api.v1.CallsService;
+import com.sinch.sdk.domains.voice.models.v1.Price;
+import com.sinch.sdk.domains.voice.models.v1.calls.request.CallLeg;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation.DomainEnum;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation.ReasonEnum;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation.StatusEnum;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallResult;
+import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionContinue;
+import com.sinch.sdk.domains.voice.models.v1.svaml.action.SvamlActionHangup;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionPlayFiles;
+import com.sinch.sdk.domains.voice.models.v1.svaml.instruction.SvamlInstructionSay;
+import com.sinch.sdk.e2e.Config;
+import io.cucumber.java.en.Given;
+import io.cucumber.java.en.Then;
+import io.cucumber.java.en.When;
+import java.time.Instant;
+import java.util.Arrays;
+import org.junit.jupiter.api.Assertions;
+
+public class CallsSteps {
+
+ CallsService service;
+ CallInformation getResponse;
+ Boolean updatePassed;
+ ApiException updateNotFoundException;
+ Boolean manageWithCallLegPassed;
+
+ @Given("^the Voice service \"Calls\" is available$")
+ public void serviceAvailable() {
+ service = Config.getSinchClient().voice().v1().calls();
+ }
+
+ @When("^I send a request to get a call's information$")
+ public void getCall() {
+
+ getResponse = service.get("1ce0ffee-ca11-ca11-ca11-abcdef000003");
+ }
+
+ @When("^I send a request to update a call$")
+ public void updateCall() {
+
+ SvamlControl request =
+ SvamlControl.builder()
+ .setInstructions(
+ Arrays.asList(
+ SvamlInstructionSay.builder()
+ .setText("Sorry, the conference has been cancelled. The call will end now.")
+ .setLocale("en-US")
+ .build()))
+ .setAction(SvamlActionHangup.DEFAULT)
+ .build();
+ service.update("1ce0ffee-ca11-ca11-ca11-abcdef000022", request);
+ updatePassed = true;
+ }
+
+ @When("^I send a request to update a call that doesn't exist$")
+ public void updateCallNotExits() {
+
+ SvamlControl request =
+ SvamlControl.builder()
+ .setInstructions(
+ Arrays.asList(
+ SvamlInstructionSay.builder()
+ .setText("Sorry, the conference has been cancelled. The call will end now.")
+ .setLocale("en-US")
+ .build()))
+ .setAction(SvamlActionHangup.DEFAULT)
+ .build();
+ try {
+ service.update("not-existing-callId", request);
+ } catch (ApiException ae) {
+ updateNotFoundException = ae;
+ }
+ }
+
+ @When("^I send a request to manage a call with callLeg$")
+ public void manageCallWithCallLeg() {
+
+ SvamlControl request =
+ SvamlControl.builder()
+ .setInstructions(
+ Arrays.asList(
+ SvamlInstructionPlayFiles.builder()
+ .setIds(
+ Arrays.asList(
+ "https://samples-files.com/samples/Audio/mp3/sample-file-4.mp3"))
+ .build()))
+ .setAction(SvamlActionContinue.DEFAULT)
+ .build();
+ service.manageWithCallLeg("1ce0ffee-ca11-ca11-ca11-abcdef000022", CallLeg.CALLEE, request);
+ manageWithCallLegPassed = true;
+ }
+
+ @Then("the response contains the information about the call")
+ public void getCallResult() {
+ CallInformation information =
+ CallInformation.builder()
+ .setTo(DestinationPstn.from("+12017777777"))
+ .setDomain(DomainEnum.PSTN)
+ .setCallId("1ce0ffee-ca11-ca11-ca11-abcdef000003")
+ .setDuration(14)
+ .setStatus(StatusEnum.FINAL)
+ .setResult(CallResult.ANSWERED)
+ .setReason(ReasonEnum.MANAGERHANGUP)
+ .setTimestamp(Instant.parse("2024-06-06T17:36:00Z"))
+ .setCustom("Custom text")
+ .setUserRate(Price.builder().setCurrencyId("EUR").setAmount(0.1758F).build())
+ .setDebit(Price.builder().setCurrencyId("EUR").setAmount(0.1758F).build())
+ .build();
+ TestHelpers.recursiveEquals(getResponse, information);
+ }
+
+ @Then("the update call response contains no data")
+ public void updateCallResult() {
+ Assertions.assertEquals(true, updatePassed);
+ }
+
+ @Then("the update call response contains a \"not found\" error")
+ public void updateCallNotFoundResult() {
+ Assertions.assertTrue(updateNotFoundException.getMessage().contains("not found"));
+ }
+
+ @Then("the manage a call with callLeg response contains no data")
+ public void manageCallWithCallLegResult() {
+ Assertions.assertEquals(true, manageWithCallLegPassed);
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/ConferenceSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/ConferenceSteps.java
new file mode 100644
index 000000000..d4f0532f9
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/ConferenceSteps.java
@@ -0,0 +1,128 @@
+package com.sinch.sdk.e2e.domains.voice.v1;
+
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.domains.voice.api.v1.ConferencesService;
+import com.sinch.sdk.domains.voice.models.v1.MusicOnHold;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.CalloutRequestConference;
+import com.sinch.sdk.domains.voice.models.v1.conferences.ConferenceParticipant;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest.CommandEnum;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.GetConferenceInfoResponse;
+import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;
+import com.sinch.sdk.e2e.Config;
+import io.cucumber.java.en.Given;
+import io.cucumber.java.en.Then;
+import io.cucumber.java.en.When;
+import java.util.ArrayList;
+import java.util.Arrays;
+import org.junit.jupiter.api.Assertions;
+
+public class ConferenceSteps {
+
+ ConferencesService service;
+ String callResponse;
+ GetConferenceInfoResponse getResponse;
+ Boolean manageParticipantPassed;
+ Boolean kickParticipantPassed;
+ Boolean kickAllParticipantPassed;
+
+ @Given("^the Voice service \"Conferences\" is available$")
+ public void serviceAvailable() {
+ service = Config.getSinchClient().voice().v1().conferences();
+ }
+
+ @When("^I send a request to make a Conference call with the \"Conferences\" service$")
+ public void createCall() {
+
+ CalloutRequestConference request =
+ CalloutRequestConference.builder()
+ .setLocale("en-US")
+ .setDestination(DestinationPstn.from("+12017777777"))
+ .setCli("+12015555555")
+ .setConferenceId("myConferenceId-E2E")
+ .setGreeting("Welcome to this conference call.")
+ .setMusicOnHold(MusicOnHold.MUSIC1)
+ .build();
+
+ callResponse = service.call(request);
+ }
+
+ @When("^I send a request to get the conference information$")
+ public void getCall() {
+
+ getResponse = service.get("myConferenceId-E2E");
+ }
+
+ @When("^I send a request to put a participant on hold$")
+ public void manageParticipant() {
+
+ ManageConferenceParticipantRequest request =
+ ManageConferenceParticipantRequest.builder()
+ .setCommand(CommandEnum.ONHOLD)
+ .setMusicOnHold(MusicOnHold.MUSIC2)
+ .build();
+
+ service.manageParticipant(
+ "myConferenceId-E2E", "1ce0ffee-ca11-ca11-ca11-abcdef000012", request);
+ manageParticipantPassed = true;
+ }
+
+ @When("^I send a request to kick a participant from a conference$")
+ public void kickParticipant() {
+
+ service.kickParticipant("myConferenceId-E2E", "1ce0ffee-ca11-ca11-ca11-abcdef000012");
+ kickParticipantPassed = true;
+ }
+
+ @When("^I send a request to kick all the participants from a conference$")
+ public void kickAllParticipant() {
+
+ service.kickAll("myConferenceId-E2E");
+ kickAllParticipantPassed = true;
+ }
+
+ @Then("the callout response from the \"Conferences\" service contains the Conference call ID")
+ public void createCallResult() {
+ Assertions.assertEquals(callResponse, "1ce0ffee-ca11-ca11-ca11-abcdef000002");
+ }
+
+ @Then("the response contains the information about the conference participants")
+ public void getCallResult() {
+ GetConferenceInfoResponse reponse =
+ GetConferenceInfoResponse.builder()
+ .setParticipants(
+ new ArrayList<>(
+ Arrays.asList(
+ ConferenceParticipant.builder()
+ .setCli("+12015555555")
+ .setId("1ce0ffee-ca11-ca11-ca11-abcdef000012")
+ .setDuration(35)
+ .setMuted(true)
+ .setOnHold(true)
+ .build(),
+ ConferenceParticipant.builder()
+ .setCli("+12015555555")
+ .setId("1ce0ffee-ca11-ca11-ca11-abcdef000022")
+ .setDuration(6)
+ .setMuted(false)
+ .setOnHold(false)
+ .build())))
+ .build();
+ TestHelpers.recursiveEquals(getResponse, reponse);
+ }
+
+ @Then("the manage participant response contains no data")
+ public void manageParticipantResult() {
+ Assertions.assertTrue(manageParticipantPassed);
+ }
+
+ @Then("the kick participant response contains no data")
+ public void kickParticipantPassedResult() {
+ Assertions.assertTrue(kickParticipantPassed);
+ }
+
+ @Then("the kick all participants response contains no data")
+ public void kickAllParticipantPassedResult() {
+ Assertions.assertTrue(kickAllParticipantPassed);
+ }
+}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/VoiceIT.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/VoiceIT.java
new file mode 100644
index 000000000..421a7a053
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/VoiceIT.java
@@ -0,0 +1,16 @@
+package com.sinch.sdk.e2e.domains.voice.v1;
+
+import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
+
+import org.junit.platform.suite.api.ConfigurationParameter;
+import org.junit.platform.suite.api.IncludeEngines;
+import org.junit.platform.suite.api.SelectClasspathResource;
+import org.junit.platform.suite.api.Suite;
+import org.junit.platform.suite.api.SuiteDisplayName;
+
+@Suite
+@SuiteDisplayName("Voice V1")
+@IncludeEngines("cucumber")
+@SelectClasspathResource("features/voice")
+@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.sinch.sdk.e2e.domains.voice.v1")
+public class VoiceIT {}
diff --git a/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/WebhooksEventsSteps.java b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/WebhooksEventsSteps.java
new file mode 100644
index 000000000..369bea8c3
--- /dev/null
+++ b/client/src/test/java/com/sinch/sdk/e2e/domains/voice/v1/WebhooksEventsSteps.java
@@ -0,0 +1,219 @@
+package com.sinch.sdk.e2e.domains.voice.v1;
+
+import com.sinch.sdk.core.TestHelpers;
+import com.sinch.sdk.domains.voice.api.v1.WebHooksService;
+import com.sinch.sdk.domains.voice.models.v1.Domain;
+import com.sinch.sdk.domains.voice.models.v1.Price;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallResult;
+import com.sinch.sdk.domains.voice.models.v1.destination.DestinationDid;
+import com.sinch.sdk.domains.voice.models.v1.destination.DestinationPstn;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.AnsweredCallEvent;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.DisconnectedCallEvent;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.DisconnectedCallEvent.ReasonEnum;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.IncomingCallEvent;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.MenuResult;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.MenuResult.InputMethodEnum;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.MenuResult.TypeEnum;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.PromptInputEvent;
+import com.sinch.sdk.domains.voice.models.v1.webhooks.VoiceWebhookEvent;
+import com.sinch.sdk.e2e.Config;
+import com.sinch.sdk.e2e.domains.WebhooksHelper;
+import io.cucumber.java.en.Given;
+import io.cucumber.java.en.Then;
+import io.cucumber.java.en.When;
+import java.io.IOException;
+import java.net.URL;
+import java.time.Instant;
+import org.junit.jupiter.api.Assertions;
+
+public class WebhooksEventsSteps {
+
+ static final String WEBHOOKS_PATH_PREFIX = "/webhooks/voice";
+ static final String WEBHOOKS_URL = Config.VOICE_HOST_NAME + WEBHOOKS_PATH_PREFIX;
+
+ WebHooksService service;
+
+ WebhooksHelper.Response pieReturn;
+ WebhooksHelper.Response pieSequence;
+ WebhooksHelper.Response diceEvent;
+ WebhooksHelper.Response aceEvent;
+ WebhooksHelper.Response iceEvent;
+
+ PromptInputEvent expectedPieReturnEvent =
+ PromptInputEvent.builder()
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .setCallid("1ce0ffee-ca11-ca11-ca11-abcdef000013")
+ .setTimestamp(Instant.parse("2024-06-06T17:35:01Z"))
+ .setVersion(1)
+ .setCustom("Custom text")
+ .setMenuResult(
+ MenuResult.builder()
+ .setType(TypeEnum.RETURN)
+ .setValue("cancel")
+ .setMenuId("main")
+ .setInputMethod(InputMethodEnum.DTMF)
+ .build())
+ .build();
+
+ PromptInputEvent expectedPieSequenceEvent =
+ PromptInputEvent.builder()
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .setCallid("1ce0ffee-ca11-ca11-ca11-abcdef000023")
+ .setTimestamp(Instant.parse("2024-06-06T17:35:58Z"))
+ .setVersion(1)
+ .setCustom("Custom text")
+ .setMenuResult(
+ MenuResult.builder()
+ .setType(TypeEnum.SEQUENCE)
+ .setValue("1234")
+ .setMenuId("confirm")
+ .setInputMethod(InputMethodEnum.DTMF)
+ .build())
+ .build();
+
+ DisconnectedCallEvent expectedDiceEvent =
+ DisconnectedCallEvent.builder()
+ .setCallid("1ce0ffee-ca11-ca11-ca11-abcdef000033")
+ .setTimestamp(Instant.parse("2024-06-06T16:59:42Z"))
+ .setReason(ReasonEnum.MANAGERHANGUP)
+ .setResult(CallResult.ANSWERED)
+ .setVersion(1)
+ .setCustom("Custom text")
+ .setDebit(Price.builder().setCurrencyId("EUR").setAmount(0.0095F).build())
+ .setUserRate(Price.builder().setCurrencyId("EUR").setAmount(0.0095F).build())
+ .setTo(DestinationPstn.from("12017777777"))
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .setDuration(12)
+ .setFrom("12015555555")
+ .build();
+ AnsweredCallEvent expectedAceEvent =
+ AnsweredCallEvent.builder()
+ .setCallid("1ce0ffee-ca11-ca11-ca11-abcdef000043")
+ .setTimestamp(Instant.parse("2024-06-06T17:10:34Z"))
+ .setVersion(1)
+ .setCustom("Custom text")
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .build();
+
+ IncomingCallEvent expectedIceEvent =
+ IncomingCallEvent.builder()
+ .setCallid("1ce0ffee-ca11-ca11-ca11-abcdef000053")
+ .setCallResourceUrl(
+ "https://calling-use1.api.sinch.com/calling/v1/calls/id/1ce0ffee-ca11-ca11-ca11-abcdef000053")
+ .setTimestamp(Instant.parse("2024-06-06T17:20:14Z"))
+ .setVersion(1)
+ .setUserRate(Price.builder().setCurrencyId("USD").setAmount(0.0F).build())
+ .setCli("12015555555")
+ .setTo(DestinationDid.from("+12017777777"))
+ .setDomain(Domain.PSTN)
+ .setApplicationKey("f00dcafe-abba-c0de-1dea-dabb1ed4caf3")
+ .setOriginationType(Domain.PSTN2)
+ .setRdnis("")
+ .build();
+
+ @Given("^the Voice Webhooks handler is available$")
+ public void serviceAvailable() {
+ service = Config.getSinchClient().voice().v1().webhooks();
+ }
+
+ @When("^I send a request to trigger a \"PIE\" event with a \"return\" type$")
+ public void sendPieReturn() throws IOException {
+ pieReturn = WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/pie-return"), service::parseEvent);
+ }
+
+ @When("^I send a request to trigger a \"PIE\" event with a \"sequence\" type$")
+ public void sendPieSequence() throws IOException {
+ pieSequence =
+ WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/pie-sequence"), service::parseEvent);
+ }
+
+ @When("^I send a request to trigger a \"DICE\" event$")
+ public void sendDICEEvent() throws IOException {
+ diceEvent = WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/dice"), service::parseEvent);
+ }
+
+ @When("^I send a request to trigger a \"ACE\" event$")
+ public void sendACEEvent() throws IOException {
+ aceEvent = WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/ace"), service::parseEvent);
+ }
+
+ @When("^I send a request to trigger a \"ICE\" event$")
+ public void sendICEEvent() throws IOException {
+ iceEvent = WebhooksHelper.callURL(new URL(WEBHOOKS_URL + "/ice"), service::parseEvent);
+ }
+
+ @Then("the header of the {string} event with a {string} type contains a valid authorization")
+ public void validatePieHeader(String event, String type) {
+
+ WebhooksHelper.Response> receivedEvent = null;
+ if (event.equals("PIE") && type.equals("return")) {
+ receivedEvent = pieReturn;
+ } else if (event.equals("PIE") && type.equals("sequence")) {
+ receivedEvent = pieSequence;
+ } else {
+ Assertions.fail();
+ }
+ boolean validated =
+ service.validateAuthenticationHeader(
+ "POST", WEBHOOKS_PATH_PREFIX, receivedEvent.headers, receivedEvent.rawPayload);
+ Assertions.assertTrue(validated);
+ }
+
+ @Then("the header of the {string} event contains a valid authorization")
+ public void validateHeader(String event) {
+
+ WebhooksHelper.Response> receivedEvent = null;
+ if (event.equals("DICE")) {
+ receivedEvent = diceEvent;
+ } else if (event.equals("ACE")) {
+ receivedEvent = aceEvent;
+ } else if (event.equals("ICE")) {
+ receivedEvent = iceEvent;
+ } else {
+ Assertions.fail();
+ }
+ boolean validated =
+ service.validateAuthenticationHeader(
+ "POST", WEBHOOKS_PATH_PREFIX, receivedEvent.headers, receivedEvent.rawPayload);
+ Assertions.assertTrue(validated);
+ }
+
+ @Then("the Voice event describes a {string} event with a {string} type")
+ public void validatePieEvent(String event, String type) {
+
+ WebhooksHelper.Response> receivedEvent = null;
+ VoiceWebhookEvent expectedEvent = null;
+ if (event.equals("PIE") && type.equals("return")) {
+ receivedEvent = pieReturn;
+ expectedEvent = expectedPieReturnEvent;
+ } else if (event.equals("PIE") && type.equals("sequence")) {
+ receivedEvent = pieSequence;
+ expectedEvent = expectedPieSequenceEvent;
+ } else {
+ Assertions.fail();
+ }
+
+ TestHelpers.recursiveEquals(expectedEvent, receivedEvent.event);
+ }
+
+ @Then("the Voice event describes a {string} event")
+ public void validateEvent(String event) {
+
+ WebhooksHelper.Response> receivedEvent = null;
+ VoiceWebhookEvent expectedEvent = null;
+ if (event.equals("DICE")) {
+ receivedEvent = diceEvent;
+ expectedEvent = expectedDiceEvent;
+ } else if (event.equals("ACE")) {
+ receivedEvent = aceEvent;
+ expectedEvent = expectedAceEvent;
+ } else if (event.equals("ICE")) {
+ receivedEvent = iceEvent;
+ expectedEvent = expectedIceEvent;
+ } else {
+ Assertions.fail();
+ }
+
+ TestHelpers.recursiveEquals(expectedEvent, receivedEvent.event);
+ }
+}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/ApplicationsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/ApplicationsApi.java
similarity index 85%
rename from openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/ApplicationsApi.java
rename to openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/ApplicationsApi.java
index c9c047a41..c08aea04f 100644
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/ApplicationsApi.java
+++ b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/ApplicationsApi.java
@@ -1,16 +1,14 @@
/*
* Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
*
- * The version of the OpenAPI document: 1.0.1
+ * OpenAPI document version: 1.0.1
* Contact: support@sinch.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
* Do not edit the class manually.
*/
-package com.sinch.sdk.domains.voice.adapters.api.v1;
+package com.sinch.sdk.domains.voice.api.v1.internal;
import com.fasterxml.jackson.core.type.TypeReference;
import com.sinch.sdk.core.exceptions.ApiException;
@@ -25,11 +23,11 @@
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
-import com.sinch.sdk.domains.voice.models.dto.v1.CallbacksDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.GetNumbersResponseObjDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.GetQueryNumberDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.UnassignNumbersDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.UpdateNumbersDto;
+import com.sinch.sdk.domains.voice.models.v1.applications.Callbacks;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UnAssignNumberRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.request.UpdateNumbersRequest;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.OwnedNumbersResponse;
+import com.sinch.sdk.domains.voice.models.v1.applications.response.QueryNumberResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -61,10 +59,10 @@ public ApplicationsApi(
* Query number Returns information about the requested number.
*
* @param number The phone number you want to query. (required)
- * @return GetQueryNumberDto
+ * @return QueryNumberResponse
* @throws ApiException if fails to make API call
*/
- public GetQueryNumberDto callingQueryNumber(String number) throws ApiException {
+ public QueryNumberResponse callingQueryNumber(String number) throws ApiException {
LOGGER.finest("[callingQueryNumber]" + " " + "number: " + number);
@@ -74,8 +72,8 @@ public GetQueryNumberDto callingQueryNumber(String number) throws ApiException {
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType =
- new TypeReference() {};
+ TypeReference localVarReturnType =
+ new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -125,10 +123,10 @@ private HttpRequest callingQueryNumberRequestBuilder(String number) throws ApiEx
* Get Callback URLs Returns any callback URLs configured for the specified application.
*
* @param applicationkey The unique identifying key of the application. (required)
- * @return CallbacksDto
+ * @return Callbacks
* @throws ApiException if fails to make API call
*/
- public CallbacksDto configurationGetCallbackURLs(String applicationkey) throws ApiException {
+ public Callbacks configurationGetCallbackURLs(String applicationkey) throws ApiException {
LOGGER.finest("[configurationGetCallbackURLs]" + " " + "applicationkey: " + applicationkey);
@@ -138,7 +136,7 @@ public CallbacksDto configurationGetCallbackURLs(String applicationkey) throws A
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType = new TypeReference() {};
+ TypeReference localVarReturnType = new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -193,10 +191,10 @@ private HttpRequest configurationGetCallbackURLsRequestBuilder(String applicatio
* well as their capability (voice or SMS). For the ones that are assigned to an app, it returns
* the application key of the app.
*
- * @return GetNumbersResponseObjDto
+ * @return OwnedNumbersResponse
* @throws ApiException if fails to make API call
*/
- public GetNumbersResponseObjDto configurationGetNumbers() throws ApiException {
+ public OwnedNumbersResponse configurationGetNumbers() throws ApiException {
LOGGER.finest("[configurationGetNumbers]");
@@ -206,8 +204,8 @@ public GetNumbersResponseObjDto configurationGetNumbers() throws ApiException {
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType =
- new TypeReference() {};
+ TypeReference localVarReturnType =
+ new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -248,16 +246,16 @@ private HttpRequest configurationGetNumbersRequestBuilder() throws ApiException
/**
* Un-assign number Un-assign a number from an application.
*
- * @param unassignNumbersDto (optional)
+ * @param unAssignNumberRequest (optional)
* @throws ApiException if fails to make API call
*/
- public void configurationUnassignNumber(UnassignNumbersDto unassignNumbersDto)
+ public void configurationUnassignNumber(UnAssignNumberRequest unAssignNumberRequest)
throws ApiException {
LOGGER.finest(
- "[configurationUnassignNumber]" + " " + "unassignNumbersDto: " + unassignNumbersDto);
+ "[configurationUnassignNumber]" + " " + "unAssignNumberRequest: " + unAssignNumberRequest);
- HttpRequest httpRequest = configurationUnassignNumberRequestBuilder(unassignNumbersDto);
+ HttpRequest httpRequest = configurationUnassignNumberRequestBuilder(unAssignNumberRequest);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
@@ -275,7 +273,7 @@ public void configurationUnassignNumber(UnassignNumbersDto unassignNumbersDto)
}
private HttpRequest configurationUnassignNumberRequestBuilder(
- UnassignNumbersDto unassignNumbersDto) throws ApiException {
+ UnAssignNumberRequest unAssignNumberRequest) throws ApiException {
String localVarPath = "/v1/configuration/numbers";
@@ -288,7 +286,7 @@ private HttpRequest configurationUnassignNumberRequestBuilder(
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, unassignNumbersDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, unAssignNumberRequest);
return new HttpRequest(
localVarPath,
@@ -305,10 +303,10 @@ private HttpRequest configurationUnassignNumberRequestBuilder(
* Update Callbacks Update the configured callback URLs for the specified application.
*
* @param applicationkey The unique identifying key of the application. (required)
- * @param callbacksDto (optional)
+ * @param callbacks (optional)
* @throws ApiException if fails to make API call
*/
- public void configurationUpdateCallbackURLs(String applicationkey, CallbacksDto callbacksDto)
+ public void configurationUpdateCallbackURLs(String applicationkey, Callbacks callbacks)
throws ApiException {
LOGGER.finest(
@@ -317,11 +315,11 @@ public void configurationUpdateCallbackURLs(String applicationkey, CallbacksDto
+ "applicationkey: "
+ applicationkey
+ ", "
- + "callbacksDto: "
- + callbacksDto);
+ + "callbacks: "
+ + callbacks);
HttpRequest httpRequest =
- configurationUpdateCallbackURLsRequestBuilder(applicationkey, callbacksDto);
+ configurationUpdateCallbackURLsRequestBuilder(applicationkey, callbacks);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
@@ -339,7 +337,7 @@ public void configurationUpdateCallbackURLs(String applicationkey, CallbacksDto
}
private HttpRequest configurationUpdateCallbackURLsRequestBuilder(
- String applicationkey, CallbacksDto callbacksDto) throws ApiException {
+ String applicationkey, Callbacks callbacks) throws ApiException {
// verify the required parameter 'applicationkey' is set
if (applicationkey == null) {
throw new ApiException(
@@ -363,7 +361,7 @@ private HttpRequest configurationUpdateCallbackURLsRequestBuilder(
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, callbacksDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, callbacks);
return new HttpRequest(
localVarPath,
@@ -379,14 +377,16 @@ private HttpRequest configurationUpdateCallbackURLsRequestBuilder(
/**
* Update Numbers Assign a number or a list of numbers to an application.
*
- * @param updateNumbersDto (optional)
+ * @param updateNumbersRequest (optional)
* @throws ApiException if fails to make API call
*/
- public void configurationUpdateNumbers(UpdateNumbersDto updateNumbersDto) throws ApiException {
+ public void configurationUpdateNumbers(UpdateNumbersRequest updateNumbersRequest)
+ throws ApiException {
- LOGGER.finest("[configurationUpdateNumbers]" + " " + "updateNumbersDto: " + updateNumbersDto);
+ LOGGER.finest(
+ "[configurationUpdateNumbers]" + " " + "updateNumbersRequest: " + updateNumbersRequest);
- HttpRequest httpRequest = configurationUpdateNumbersRequestBuilder(updateNumbersDto);
+ HttpRequest httpRequest = configurationUpdateNumbersRequestBuilder(updateNumbersRequest);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
@@ -403,8 +403,8 @@ public void configurationUpdateNumbers(UpdateNumbersDto updateNumbersDto) throws
mapper.deserialize(response, new TypeReference>() {}));
}
- private HttpRequest configurationUpdateNumbersRequestBuilder(UpdateNumbersDto updateNumbersDto)
- throws ApiException {
+ private HttpRequest configurationUpdateNumbersRequestBuilder(
+ UpdateNumbersRequest updateNumbersRequest) throws ApiException {
String localVarPath = "/v1/configuration/numbers";
@@ -417,7 +417,7 @@ private HttpRequest configurationUpdateNumbersRequestBuilder(UpdateNumbersDto up
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, updateNumbersDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, updateNumbersRequest);
return new HttpRequest(
localVarPath,
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/CalloutsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/CalloutsApi.java
similarity index 80%
rename from openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/CalloutsApi.java
rename to openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/CalloutsApi.java
index bea71e7fb..768f2ca53 100644
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/CalloutsApi.java
+++ b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/CalloutsApi.java
@@ -1,16 +1,14 @@
/*
* Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
*
- * The version of the OpenAPI document: 1.0.1
+ * OpenAPI document version: 1.0.1
* Contact: support@sinch.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
* Do not edit the class manually.
*/
-package com.sinch.sdk.domains.voice.adapters.api.v1;
+package com.sinch.sdk.domains.voice.api.v1.internal;
import com.fasterxml.jackson.core.type.TypeReference;
import com.sinch.sdk.core.exceptions.ApiException;
@@ -24,8 +22,8 @@
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.models.ServerConfiguration;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutRequestDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.GetCalloutResponseObjDto;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.internal.CalloutRequestInternal;
+import com.sinch.sdk.domains.voice.models.v1.callouts.response.CalloutResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -58,23 +56,22 @@ public CalloutsApi(
* are conference callouts, text-to-speech callouts, and custom callouts. The custom callout is
* the most flexible, but text-to-speech and conference callouts are more convenient.
*
- * @param calloutRequestDto (optional)
- * @return GetCalloutResponseObjDto
+ * @param calloutRequestInternal (optional)
+ * @return CalloutResponse
* @throws ApiException if fails to make API call
*/
- public GetCalloutResponseObjDto callouts(CalloutRequestDto calloutRequestDto)
+ public CalloutResponse callouts(CalloutRequestInternal calloutRequestInternal)
throws ApiException {
- LOGGER.finest("[callouts]" + " " + "calloutRequestDto: " + calloutRequestDto);
+ LOGGER.finest("[callouts]" + " " + "calloutRequestInternal: " + calloutRequestInternal);
- HttpRequest httpRequest = calloutsRequestBuilder(calloutRequestDto);
+ HttpRequest httpRequest = calloutsRequestBuilder(calloutRequestInternal);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType =
- new TypeReference() {};
+ TypeReference localVarReturnType = new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -86,7 +83,7 @@ public GetCalloutResponseObjDto callouts(CalloutRequestDto calloutRequestDto)
mapper.deserialize(response, new TypeReference>() {}));
}
- private HttpRequest calloutsRequestBuilder(CalloutRequestDto calloutRequestDto)
+ private HttpRequest calloutsRequestBuilder(CalloutRequestInternal calloutRequestInternal)
throws ApiException {
String localVarPath = "/calling/v1/callouts";
@@ -100,7 +97,7 @@ private HttpRequest calloutsRequestBuilder(CalloutRequestDto calloutRequestDto)
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, calloutRequestDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, calloutRequestInternal);
return new HttpRequest(
localVarPath,
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/CallsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/CallsApi.java
similarity index 82%
rename from openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/CallsApi.java
rename to openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/CallsApi.java
index d373e5b64..3c80670a0 100644
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/CallsApi.java
+++ b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/CallsApi.java
@@ -1,16 +1,14 @@
/*
* Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
*
- * The version of the OpenAPI document: 1.0.1
+ * OpenAPI document version: 1.0.1
* Contact: support@sinch.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
* Do not edit the class manually.
*/
-package com.sinch.sdk.domains.voice.adapters.api.v1;
+package com.sinch.sdk.domains.voice.api.v1.internal;
import com.fasterxml.jackson.core.type.TypeReference;
import com.sinch.sdk.core.exceptions.ApiException;
@@ -25,8 +23,8 @@
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
-import com.sinch.sdk.domains.voice.models.dto.v1.GetCallResponseObjDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.SVAMLRequestBodyDto;
+import com.sinch.sdk.domains.voice.models.v1.calls.response.CallInformation;
+import com.sinch.sdk.domains.voice.models.v1.svaml.SvamlControl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -63,10 +61,10 @@ public CallsApi(
*
* @param callId The unique identifier of the call. This value is generated by the system.
* (required)
- * @return GetCallResponseObjDto
+ * @return CallInformation
* @throws ApiException if fails to make API call
*/
- public GetCallResponseObjDto callingGetCallResult(String callId) throws ApiException {
+ public CallInformation callingGetCallResult(String callId) throws ApiException {
LOGGER.finest("[callingGetCallResult]" + " " + "callId: " + callId);
@@ -76,8 +74,7 @@ public GetCallResponseObjDto callingGetCallResult(String callId) throws ApiExcep
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType =
- new TypeReference() {};
+ TypeReference localVarReturnType = new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -128,8 +125,8 @@ private HttpRequest callingGetCallResultRequestBuilder(String callId) throws Api
* This method is only used when using the `PlayFiles` and `Say` instructions
* in the request body. This method uses SVAML in the request body to perform various tasks
* related to the call. For more information about SVAML, see the [Callback
- * API](/docs/voice/api-reference/svaml/) documentation. Note: You can only use this method for
- * calls that originate from or terminate to PSTN or SIP networks.
+ * API](https://developers.sinch.com/docs/voice/api-reference/svaml/) documentation. Note: You can
+ * only use this method for calls that originate from or terminate to PSTN or SIP networks.
*
* @param callId The unique identifier of the call. This value is generated by the system.
* (required)
@@ -137,14 +134,14 @@ private HttpRequest callingGetCallResultRequestBuilder(String callId) throws Api
* the `PlayFiles` and `Say` instructions to indicate which channel the
* sound will be played on. Valid options are `caller`, `callee` or
* `both`. If not specified, the default value is
- * `caller`.</br><Warning>The `callLeg` identifier is ignored
+ * `caller`.<br><Warning>The `callLeg` identifier is ignored
* for calls that are part of a conference and calls initiated using the Callout
* API.</Warning> (required)
- * @param svAMLRequestBodyDto (optional)
+ * @param svamlControl (optional)
* @throws ApiException if fails to make API call
*/
- public void callingManageCallWithCallLeg(
- String callId, String callLeg, SVAMLRequestBodyDto svAMLRequestBodyDto) throws ApiException {
+ public void callingManageCallWithCallLeg(String callId, String callLeg, SvamlControl svamlControl)
+ throws ApiException {
LOGGER.finest(
"[callingManageCallWithCallLeg]"
@@ -155,11 +152,11 @@ public void callingManageCallWithCallLeg(
+ "callLeg: "
+ callLeg
+ ", "
- + "svAMLRequestBodyDto: "
- + svAMLRequestBodyDto);
+ + "svamlControl: "
+ + svamlControl);
HttpRequest httpRequest =
- callingManageCallWithCallLegRequestBuilder(callId, callLeg, svAMLRequestBodyDto);
+ callingManageCallWithCallLegRequestBuilder(callId, callLeg, svamlControl);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
@@ -177,7 +174,7 @@ public void callingManageCallWithCallLeg(
}
private HttpRequest callingManageCallWithCallLegRequestBuilder(
- String callId, String callLeg, SVAMLRequestBodyDto svAMLRequestBodyDto) throws ApiException {
+ String callId, String callLeg, SvamlControl svamlControl) throws ApiException {
// verify the required parameter 'callId' is set
if (callId == null) {
throw new ApiException(
@@ -205,7 +202,7 @@ private HttpRequest callingManageCallWithCallLegRequestBuilder(
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, svAMLRequestBodyDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, svamlControl);
return new HttpRequest(
localVarPath,
@@ -221,28 +218,21 @@ private HttpRequest callingManageCallWithCallLegRequestBuilder(
/**
* Update a call in progress This method is used to manage ongoing, connected calls. This method
* uses SVAML in the request body to perform various tasks related to the call. For more
- * information about SVAML, see the [Callback API](/docs/voice/api-reference/svaml/)
- * documentation. This method can only be used for calls that originate from or terminate to PSTN
- * or SIP networks.
+ * information about SVAML, see the [Callback
+ * API](https://developers.sinch.com/docs/voice/api-reference/svaml/) documentation. This method
+ * can only be used for calls that originate from or terminate to PSTN or SIP networks.
*
* @param callId The unique identifier of the call. This value is generated by the system.
* (required)
- * @param svAMLRequestBodyDto (optional)
+ * @param svamlControl (optional)
* @throws ApiException if fails to make API call
*/
- public void callingUpdateCall(String callId, SVAMLRequestBodyDto svAMLRequestBodyDto)
- throws ApiException {
+ public void callingUpdateCall(String callId, SvamlControl svamlControl) throws ApiException {
LOGGER.finest(
- "[callingUpdateCall]"
- + " "
- + "callId: "
- + callId
- + ", "
- + "svAMLRequestBodyDto: "
- + svAMLRequestBodyDto);
+ "[callingUpdateCall]" + " " + "callId: " + callId + ", " + "svamlControl: " + svamlControl);
- HttpRequest httpRequest = callingUpdateCallRequestBuilder(callId, svAMLRequestBodyDto);
+ HttpRequest httpRequest = callingUpdateCallRequestBuilder(callId, svamlControl);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
@@ -259,8 +249,8 @@ public void callingUpdateCall(String callId, SVAMLRequestBodyDto svAMLRequestBod
mapper.deserialize(response, new TypeReference>() {}));
}
- private HttpRequest callingUpdateCallRequestBuilder(
- String callId, SVAMLRequestBodyDto svAMLRequestBodyDto) throws ApiException {
+ private HttpRequest callingUpdateCallRequestBuilder(String callId, SvamlControl svamlControl)
+ throws ApiException {
// verify the required parameter 'callId' is set
if (callId == null) {
throw new ApiException(
@@ -281,7 +271,7 @@ private HttpRequest callingUpdateCallRequestBuilder(
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, svAMLRequestBodyDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, svamlControl);
return new HttpRequest(
localVarPath,
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/ConferencesApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/ConferencesApi.java
similarity index 89%
rename from openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/ConferencesApi.java
rename to openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/ConferencesApi.java
index 7c5293dd0..e07596322 100644
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/adapters/api/v1/ConferencesApi.java
+++ b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/api/v1/internal/ConferencesApi.java
@@ -1,16 +1,14 @@
/*
* Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
*
- * The version of the OpenAPI document: 1.0.1
+ * OpenAPI document version: 1.0.1
* Contact: support@sinch.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
* Do not edit the class manually.
*/
-package com.sinch.sdk.domains.voice.adapters.api.v1;
+package com.sinch.sdk.domains.voice.api.v1.internal;
import com.fasterxml.jackson.core.type.TypeReference;
import com.sinch.sdk.core.exceptions.ApiException;
@@ -25,10 +23,10 @@
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
-import com.sinch.sdk.domains.voice.models.dto.v1.CalloutRequestDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.GetCalloutResponseObjDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.GetConferenceInfoResponseDto;
-import com.sinch.sdk.domains.voice.models.dto.v1.ManageConferenceParticipantRequestDto;
+import com.sinch.sdk.domains.voice.models.v1.callouts.request.internal.CalloutRequestInternal;
+import com.sinch.sdk.domains.voice.models.v1.callouts.response.CalloutResponse;
+import com.sinch.sdk.domains.voice.models.v1.conferences.request.ManageConferenceParticipantRequest;
+import com.sinch.sdk.domains.voice.models.v1.conferences.response.GetConferenceInfoResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -62,10 +60,10 @@ public ConferencesApi(
*
* @param conferenceId The unique identifier of the conference. The user sets this value.
* (required)
- * @return GetConferenceInfoResponseDto
+ * @return GetConferenceInfoResponse
* @throws ApiException if fails to make API call
*/
- public GetConferenceInfoResponseDto callingGetConferenceInfo(String conferenceId)
+ public GetConferenceInfoResponse callingGetConferenceInfo(String conferenceId)
throws ApiException {
LOGGER.finest("[callingGetConferenceInfo]" + " " + "conferenceId: " + conferenceId);
@@ -76,8 +74,8 @@ public GetConferenceInfoResponseDto callingGetConferenceInfo(String conferenceId
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType =
- new TypeReference() {};
+ TypeReference localVarReturnType =
+ new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -283,13 +281,13 @@ private HttpRequest callingKickConferenceParticipantRequestBuilder(
* (required)
* @param conferenceId The unique identifier of the conference. The user sets this value.
* (required)
- * @param manageConferenceParticipantRequestDto (optional)
+ * @param manageConferenceParticipantRequest (optional)
* @throws ApiException if fails to make API call
*/
public void callingManageConferenceParticipant(
String callId,
String conferenceId,
- ManageConferenceParticipantRequestDto manageConferenceParticipantRequestDto)
+ ManageConferenceParticipantRequest manageConferenceParticipantRequest)
throws ApiException {
LOGGER.finest(
@@ -301,12 +299,12 @@ public void callingManageConferenceParticipant(
+ "conferenceId: "
+ conferenceId
+ ", "
- + "manageConferenceParticipantRequestDto: "
- + manageConferenceParticipantRequestDto);
+ + "manageConferenceParticipantRequest: "
+ + manageConferenceParticipantRequest);
HttpRequest httpRequest =
callingManageConferenceParticipantRequestBuilder(
- callId, conferenceId, manageConferenceParticipantRequestDto);
+ callId, conferenceId, manageConferenceParticipantRequest);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
@@ -326,7 +324,7 @@ public void callingManageConferenceParticipant(
private HttpRequest callingManageConferenceParticipantRequestBuilder(
String callId,
String conferenceId,
- ManageConferenceParticipantRequestDto manageConferenceParticipantRequestDto)
+ ManageConferenceParticipantRequest manageConferenceParticipantRequest)
throws ApiException {
// verify the required parameter 'callId' is set
if (callId == null) {
@@ -360,7 +358,7 @@ private HttpRequest callingManageConferenceParticipantRequestBuilder(
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
final String serializedBody =
- mapper.serialize(localVarContentTypes, manageConferenceParticipantRequestDto);
+ mapper.serialize(localVarContentTypes, manageConferenceParticipantRequest);
return new HttpRequest(
localVarPath,
@@ -378,23 +376,22 @@ private HttpRequest callingManageConferenceParticipantRequestBuilder(
* are conference callouts, text-to-speech callouts, and custom callouts. The custom callout is
* the most flexible, but text-to-speech and conference callouts are more convenient.
*
- * @param calloutRequestDto (optional)
- * @return GetCalloutResponseObjDto
+ * @param calloutRequestInternal (optional)
+ * @return CalloutResponse
* @throws ApiException if fails to make API call
*/
- public GetCalloutResponseObjDto callouts(CalloutRequestDto calloutRequestDto)
+ public CalloutResponse callouts(CalloutRequestInternal calloutRequestInternal)
throws ApiException {
- LOGGER.finest("[callouts]" + " " + "calloutRequestDto: " + calloutRequestDto);
+ LOGGER.finest("[callouts]" + " " + "calloutRequestInternal: " + calloutRequestInternal);
- HttpRequest httpRequest = calloutsRequestBuilder(calloutRequestDto);
+ HttpRequest httpRequest = calloutsRequestBuilder(calloutRequestInternal);
HttpResponse response =
httpClient.invokeAPI(
this.serverConfiguration, this.authManagersByOasSecuritySchemes, httpRequest);
if (HttpStatus.isSuccessfulStatus(response.getCode())) {
- TypeReference localVarReturnType =
- new TypeReference() {};
+ TypeReference localVarReturnType = new TypeReference() {};
return mapper.deserialize(response, localVarReturnType);
}
// fallback to default errors handling:
@@ -406,7 +403,7 @@ public GetCalloutResponseObjDto callouts(CalloutRequestDto calloutRequestDto)
mapper.deserialize(response, new TypeReference>() {}));
}
- private HttpRequest calloutsRequestBuilder(CalloutRequestDto calloutRequestDto)
+ private HttpRequest calloutsRequestBuilder(CalloutRequestInternal calloutRequestInternal)
throws ApiException {
String localVarPath = "/calling/v1/callouts";
@@ -420,7 +417,7 @@ private HttpRequest calloutsRequestBuilder(CalloutRequestDto calloutRequestDto)
final Collection localVarContentTypes = Arrays.asList("application/json");
final Collection localVarAuthNames = Arrays.asList("Basic", "Signed");
- final String serializedBody = mapper.serialize(localVarContentTypes, calloutRequestDto);
+ final String serializedBody = mapper.serialize(localVarContentTypes, calloutRequestInternal);
return new HttpRequest(
localVarPath,
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/AceRequestAllOfAmdDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/AceRequestAllOfAmdDto.java
deleted file mode 100644
index 4f41afbe4..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/AceRequestAllOfAmdDto.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * If [Answering Machine Detection](/docs/voice/api-reference/amd_v2) (AMD) is enabled, this object
- * contains information about whether the call was answered by a machine.
- */
-@JsonPropertyOrder({
- AceRequestAllOfAmdDto.JSON_PROPERTY_STATUS,
- AceRequestAllOfAmdDto.JSON_PROPERTY_REASON,
- AceRequestAllOfAmdDto.JSON_PROPERTY_DURATION
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class AceRequestAllOfAmdDto {
- private static final long serialVersionUID = 1L;
-
- /** The determination by the system of who answered the call. */
- public enum StatusEnum {
- MACHINE("machine"),
-
- HUMAN("human"),
-
- NOTSURE("notsure"),
-
- HANGUP("hangup"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- StatusEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static StatusEnum fromValue(String value) {
- for (StatusEnum b : StatusEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_STATUS = "status";
- private String status;
- private boolean statusDefined = false;
-
- /** The reason that the system used to determine who answered the call. */
- public enum ReasonEnum {
- LONGGREETING("longgreeting"),
-
- INITIALSILENCE("initialsilence"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- ReasonEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static ReasonEnum fromValue(String value) {
- for (ReasonEnum b : ReasonEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_REASON = "reason";
- private String reason;
- private boolean reasonDefined = false;
-
- public static final String JSON_PROPERTY_DURATION = "duration";
- private Integer duration;
- private boolean durationDefined = false;
-
- public AceRequestAllOfAmdDto() {}
-
- public AceRequestAllOfAmdDto status(String status) {
- this.status = status;
- this.statusDefined = true;
- return this;
- }
-
- /**
- * The determination by the system of who answered the call.
- *
- * @return status
- */
- @JsonProperty(JSON_PROPERTY_STATUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getStatus() {
- return status;
- }
-
- @JsonIgnore
- public boolean getStatusDefined() {
- return statusDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_STATUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setStatus(String status) {
- this.status = status;
- this.statusDefined = true;
- }
-
- public AceRequestAllOfAmdDto reason(String reason) {
- this.reason = reason;
- this.reasonDefined = true;
- return this;
- }
-
- /**
- * The reason that the system used to determine who answered the call.
- *
- * @return reason
- */
- @JsonProperty(JSON_PROPERTY_REASON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getReason() {
- return reason;
- }
-
- @JsonIgnore
- public boolean getReasonDefined() {
- return reasonDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_REASON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setReason(String reason) {
- this.reason = reason;
- this.reasonDefined = true;
- }
-
- public AceRequestAllOfAmdDto duration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- return this;
- }
-
- /**
- * The length of the call.
- *
- * @return duration
- */
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getDuration() {
- return duration;
- }
-
- @JsonIgnore
- public boolean getDurationDefined() {
- return durationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDuration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- }
-
- /** Return true if this aceRequest_allOf_amd object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- AceRequestAllOfAmdDto aceRequestAllOfAmd = (AceRequestAllOfAmdDto) o;
- return Objects.equals(this.status, aceRequestAllOfAmd.status)
- && Objects.equals(this.reason, aceRequestAllOfAmd.reason)
- && Objects.equals(this.duration, aceRequestAllOfAmd.duration);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(status, reason, duration);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class AceRequestAllOfAmdDto {\n");
- sb.append(" status: ").append(toIndentedString(status)).append("\n");
- sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
- sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/AceRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/AceRequestDto.java
deleted file mode 100644
index 4cf017719..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/AceRequestDto.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonValue;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/** The request body of an Answered Call Event. */
-@JsonPropertyOrder({
- AceRequestDto.JSON_PROPERTY_EVENT,
- AceRequestDto.JSON_PROPERTY_TIMESTAMP,
- AceRequestDto.JSON_PROPERTY_CUSTOM,
- AceRequestDto.JSON_PROPERTY_APPLICATION_KEY,
- AceRequestDto.JSON_PROPERTY_AMD
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-
-/*@JsonIgnoreProperties(
- value = "event", // ignore manually set event, it will be automatically generated by Jackson during serialization
- allowSetters = true // allows the event to be set during deserialization
-)*/
-@JsonTypeInfo(
- use = JsonTypeInfo.Id.NONE,
- include = JsonTypeInfo.As.EXISTING_PROPERTY,
- property = "event",
- visible = true)
-public class AceRequestDto extends WebhooksEventRequestDto {
- private static final long serialVersionUID = 1L;
-
- /** Must have the value `ace`. */
- public enum EventEnum {
- ACE("ace"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- EventEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static EventEnum fromValue(String value) {
- for (EventEnum b : EventEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_EVENT = "event";
- private String event;
- private boolean eventDefined = false;
-
- public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
- private OffsetDateTime timestamp;
- private boolean timestampDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATION_KEY = "applicationKey";
- private String applicationKey;
- private boolean applicationKeyDefined = false;
-
- public static final String JSON_PROPERTY_AMD = "amd";
- private AceRequestAllOfAmdDto amd;
- private boolean amdDefined = false;
-
- public AceRequestDto() {}
-
- public AceRequestDto event(String event) {
- this.event = event;
- this.eventDefined = true;
- return this;
- }
-
- /**
- * Must have the value `ace`.
- *
- * @return event
- */
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getEvent() {
- return event;
- }
-
- @JsonIgnore
- public boolean getEventDefined() {
- return eventDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setEvent(String event) {
- this.event = event;
- this.eventDefined = true;
- }
-
- public AceRequestDto timestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- return this;
- }
-
- /**
- * The timestamp in UTC format.
- *
- * @return timestamp
- */
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public OffsetDateTime getTimestamp() {
- return timestamp;
- }
-
- @JsonIgnore
- public boolean getTimestampDefined() {
- return timestampDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- }
-
- public AceRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * A string that can be used to pass custom information related to the call.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public AceRequestDto applicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- return this;
- }
-
- /**
- * The unique application key. You can find it in the Sinch
- * [dashboard](https://dashboard.sinch.com/voice/apps).
- *
- * @return applicationKey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationKey() {
- return applicationKey;
- }
-
- @JsonIgnore
- public boolean getApplicationKeyDefined() {
- return applicationKeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- }
-
- public AceRequestDto amd(AceRequestAllOfAmdDto amd) {
- this.amd = amd;
- this.amdDefined = true;
- return this;
- }
-
- /**
- * Get amd
- *
- * @return amd
- */
- @JsonProperty(JSON_PROPERTY_AMD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public AceRequestAllOfAmdDto getAmd() {
- return amd;
- }
-
- @JsonIgnore
- public boolean getAmdDefined() {
- return amdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_AMD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setAmd(AceRequestAllOfAmdDto amd) {
- this.amd = amd;
- this.amdDefined = true;
- }
-
- @Override
- public AceRequestDto callid(String callid) {
- this.setCallid(callid);
- return this;
- }
-
- @Override
- public AceRequestDto version(Integer version) {
- this.setVersion(version);
- return this;
- }
-
- /** Return true if this aceRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- AceRequestDto aceRequest = (AceRequestDto) o;
- return Objects.equals(this.event, aceRequest.event)
- && Objects.equals(this.timestamp, aceRequest.timestamp)
- && Objects.equals(this.custom, aceRequest.custom)
- && Objects.equals(this.applicationKey, aceRequest.applicationKey)
- && Objects.equals(this.amd, aceRequest.amd)
- && super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(event, timestamp, custom, applicationKey, amd, super.hashCode());
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class AceRequestDto {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" event: ").append(toIndentedString(event)).append("\n");
- sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n");
- sb.append(" amd: ").append(toIndentedString(amd)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
- static {
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("aceRequest", AceRequestDto.class);
- JSONNavigator.registerDiscriminator(AceRequestDto.class, "event", mappings);
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CallResultDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CallResultDto.java
deleted file mode 100644
index 39068c706..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CallResultDto.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/** Contains the result of a call. */
-public enum CallResultDto {
- N_A("N/A"),
-
- ANSWERED("ANSWERED"),
-
- BUSY("BUSY"),
-
- NOANSWER("NOANSWER"),
-
- FAILED("FAILED"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- CallResultDto(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static CallResultDto fromValue(String value) {
- for (CallResultDto b : CallResultDto.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CalloutRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CalloutRequestDto.java
deleted file mode 100644
index 01163c1a8..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CalloutRequestDto.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Currently three types of callouts are supported: conference callouts, text-to-speech callouts and
- * custom callouts. The custom callout is the most flexible, but text-to-speech and conference
- * callouts are more convenient.
- */
-@JsonPropertyOrder({
- CalloutRequestDto.JSON_PROPERTY_METHOD,
- CalloutRequestDto.JSON_PROPERTY_CONFERENCE_CALLOUT,
- CalloutRequestDto.JSON_PROPERTY_TTS_CALLOUT,
- CalloutRequestDto.JSON_PROPERTY_CUSTOM_CALLOUT
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class CalloutRequestDto {
- private static final long serialVersionUID = 1L;
-
- /** Sets the type of callout. */
- public enum MethodEnum {
- CONFERENCECALLOUT("conferenceCallout"),
-
- TTSCALLOUT("ttsCallout"),
-
- CUSTOMCALLOUT("customCallout"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- MethodEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static MethodEnum fromValue(String value) {
- for (MethodEnum b : MethodEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_METHOD = "method";
- private String method;
- private boolean methodDefined = false;
-
- public static final String JSON_PROPERTY_CONFERENCE_CALLOUT = "conferenceCallout";
- private ConferenceCalloutRequestDto conferenceCallout;
- private boolean conferenceCalloutDefined = false;
-
- public static final String JSON_PROPERTY_TTS_CALLOUT = "ttsCallout";
- private TtsCalloutRequestDto ttsCallout;
- private boolean ttsCalloutDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM_CALLOUT = "customCallout";
- private CustomCalloutRequestDto customCallout;
- private boolean customCalloutDefined = false;
-
- public CalloutRequestDto() {}
-
- public CalloutRequestDto method(String method) {
- this.method = method;
- this.methodDefined = true;
- return this;
- }
-
- /**
- * Sets the type of callout.
- *
- * @return method
- */
- @JsonProperty(JSON_PROPERTY_METHOD)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getMethod() {
- return method;
- }
-
- @JsonIgnore
- public boolean getMethodDefined() {
- return methodDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_METHOD)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setMethod(String method) {
- this.method = method;
- this.methodDefined = true;
- }
-
- public CalloutRequestDto conferenceCallout(ConferenceCalloutRequestDto conferenceCallout) {
- this.conferenceCallout = conferenceCallout;
- this.conferenceCalloutDefined = true;
- return this;
- }
-
- /**
- * Get conferenceCallout
- *
- * @return conferenceCallout
- */
- @JsonProperty(JSON_PROPERTY_CONFERENCE_CALLOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public ConferenceCalloutRequestDto getConferenceCallout() {
- return conferenceCallout;
- }
-
- @JsonIgnore
- public boolean getConferenceCalloutDefined() {
- return conferenceCalloutDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CONFERENCE_CALLOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setConferenceCallout(ConferenceCalloutRequestDto conferenceCallout) {
- this.conferenceCallout = conferenceCallout;
- this.conferenceCalloutDefined = true;
- }
-
- public CalloutRequestDto ttsCallout(TtsCalloutRequestDto ttsCallout) {
- this.ttsCallout = ttsCallout;
- this.ttsCalloutDefined = true;
- return this;
- }
-
- /**
- * Get ttsCallout
- *
- * @return ttsCallout
- */
- @JsonProperty(JSON_PROPERTY_TTS_CALLOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public TtsCalloutRequestDto getTtsCallout() {
- return ttsCallout;
- }
-
- @JsonIgnore
- public boolean getTtsCalloutDefined() {
- return ttsCalloutDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TTS_CALLOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTtsCallout(TtsCalloutRequestDto ttsCallout) {
- this.ttsCallout = ttsCallout;
- this.ttsCalloutDefined = true;
- }
-
- public CalloutRequestDto customCallout(CustomCalloutRequestDto customCallout) {
- this.customCallout = customCallout;
- this.customCalloutDefined = true;
- return this;
- }
-
- /**
- * Get customCallout
- *
- * @return customCallout
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM_CALLOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public CustomCalloutRequestDto getCustomCallout() {
- return customCallout;
- }
-
- @JsonIgnore
- public boolean getCustomCalloutDefined() {
- return customCalloutDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM_CALLOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustomCallout(CustomCalloutRequestDto customCallout) {
- this.customCallout = customCallout;
- this.customCalloutDefined = true;
- }
-
- /** Return true if this CalloutRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CalloutRequestDto calloutRequest = (CalloutRequestDto) o;
- return Objects.equals(this.method, calloutRequest.method)
- && Objects.equals(this.conferenceCallout, calloutRequest.conferenceCallout)
- && Objects.equals(this.ttsCallout, calloutRequest.ttsCallout)
- && Objects.equals(this.customCallout, calloutRequest.customCallout);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(method, conferenceCallout, ttsCallout, customCallout);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class CalloutRequestDto {\n");
- sb.append(" method: ").append(toIndentedString(method)).append("\n");
- sb.append(" conferenceCallout: ").append(toIndentedString(conferenceCallout)).append("\n");
- sb.append(" ttsCallout: ").append(toIndentedString(ttsCallout)).append("\n");
- sb.append(" customCallout: ").append(toIndentedString(customCallout)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ConferenceCalloutRequestConferenceDtmfOptionsDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ConferenceCalloutRequestConferenceDtmfOptionsDto.java
deleted file mode 100644
index fb2341269..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ConferenceCalloutRequestConferenceDtmfOptionsDto.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/**
- * Options to control how DTMF signals are used by the participant in the conference. For
- * information on how to use this feature, read more [here](../../../conference-dtmf).
- */
-@JsonPropertyOrder({
- ConferenceCalloutRequestConferenceDtmfOptionsDto.JSON_PROPERTY_MODE,
- ConferenceCalloutRequestConferenceDtmfOptionsDto.JSON_PROPERTY_MAX_DIGITS,
- ConferenceCalloutRequestConferenceDtmfOptionsDto.JSON_PROPERTY_TIMEOUT_MILLS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class ConferenceCalloutRequestConferenceDtmfOptionsDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_MODE = "mode";
- private String mode;
- private boolean modeDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DIGITS = "maxDigits";
- private Integer maxDigits;
- private boolean maxDigitsDefined = false;
-
- public static final String JSON_PROPERTY_TIMEOUT_MILLS = "timeoutMills";
- private Integer timeoutMills;
- private boolean timeoutMillsDefined = false;
-
- public ConferenceCalloutRequestConferenceDtmfOptionsDto() {}
-
- public ConferenceCalloutRequestConferenceDtmfOptionsDto mode(String mode) {
- this.mode = mode;
- this.modeDefined = true;
- return this;
- }
-
- /**
- * Determines what DTMF mode the participant will use in the call.
- *
- * @return mode
- */
- @JsonProperty(JSON_PROPERTY_MODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMode() {
- return mode;
- }
-
- @JsonIgnore
- public boolean getModeDefined() {
- return modeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMode(String mode) {
- this.mode = mode;
- this.modeDefined = true;
- }
-
- public ConferenceCalloutRequestConferenceDtmfOptionsDto maxDigits(Integer maxDigits) {
- this.maxDigits = maxDigits;
- this.maxDigitsDefined = true;
- return this;
- }
-
- /**
- * The maximum number of accepted digits before sending the collected input via a PIE callback.
- * The default value is `1`. If the value is greater than `1`, the PIE
- * callback is triggered by one of the three following events: - No additional digit is entered
- * before the `timeoutMills` timeout period has elapsed. - The `#` character
- * is entered. - The maximum number of digits has been entered.
- *
- * @return maxDigits
- */
- @JsonProperty(JSON_PROPERTY_MAX_DIGITS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDigits() {
- return maxDigits;
- }
-
- @JsonIgnore
- public boolean getMaxDigitsDefined() {
- return maxDigitsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DIGITS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDigits(Integer maxDigits) {
- this.maxDigits = maxDigits;
- this.maxDigitsDefined = true;
- }
-
- public ConferenceCalloutRequestConferenceDtmfOptionsDto timeoutMills(Integer timeoutMills) {
- this.timeoutMills = timeoutMills;
- this.timeoutMillsDefined = true;
- return this;
- }
-
- /**
- * The number of milliseconds that the system will wait between entered digits before triggering
- * the PIE callback. The default value is `3000`.
- *
- * @return timeoutMills
- */
- @JsonProperty(JSON_PROPERTY_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getTimeoutMills() {
- return timeoutMills;
- }
-
- @JsonIgnore
- public boolean getTimeoutMillsDefined() {
- return timeoutMillsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimeoutMills(Integer timeoutMills) {
- this.timeoutMills = timeoutMills;
- this.timeoutMillsDefined = true;
- }
-
- /** Return true if this conferenceCalloutRequest_conferenceDtmfOptions object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- ConferenceCalloutRequestConferenceDtmfOptionsDto conferenceCalloutRequestConferenceDtmfOptions =
- (ConferenceCalloutRequestConferenceDtmfOptionsDto) o;
- return Objects.equals(this.mode, conferenceCalloutRequestConferenceDtmfOptions.mode)
- && Objects.equals(this.maxDigits, conferenceCalloutRequestConferenceDtmfOptions.maxDigits)
- && Objects.equals(
- this.timeoutMills, conferenceCalloutRequestConferenceDtmfOptions.timeoutMills);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(mode, maxDigits, timeoutMills);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class ConferenceCalloutRequestConferenceDtmfOptionsDto {\n");
- sb.append(" mode: ").append(toIndentedString(mode)).append("\n");
- sb.append(" maxDigits: ").append(toIndentedString(maxDigits)).append("\n");
- sb.append(" timeoutMills: ").append(toIndentedString(timeoutMills)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ConferenceCalloutRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ConferenceCalloutRequestDto.java
deleted file mode 100644
index 944222169..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ConferenceCalloutRequestDto.java
+++ /dev/null
@@ -1,622 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/**
- * The conference callout calls a phone number or a user. When the call is answered, it's
- * connected to a conference room.
- */
-@JsonPropertyOrder({
- ConferenceCalloutRequestDto.JSON_PROPERTY_DESTINATION,
- ConferenceCalloutRequestDto.JSON_PROPERTY_CONFERENCE_ID,
- ConferenceCalloutRequestDto.JSON_PROPERTY_CLI,
- ConferenceCalloutRequestDto.JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS,
- ConferenceCalloutRequestDto.JSON_PROPERTY_DTMF,
- ConferenceCalloutRequestDto.JSON_PROPERTY_MAX_DURATION,
- ConferenceCalloutRequestDto.JSON_PROPERTY_ENABLE_ACE,
- ConferenceCalloutRequestDto.JSON_PROPERTY_ENABLE_DICE,
- ConferenceCalloutRequestDto.JSON_PROPERTY_ENABLE_PIE,
- ConferenceCalloutRequestDto.JSON_PROPERTY_LOCALE,
- ConferenceCalloutRequestDto.JSON_PROPERTY_GREETING,
- ConferenceCalloutRequestDto.JSON_PROPERTY_MOH_CLASS,
- ConferenceCalloutRequestDto.JSON_PROPERTY_CUSTOM,
- ConferenceCalloutRequestDto.JSON_PROPERTY_DOMAIN
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class ConferenceCalloutRequestDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_DESTINATION = "destination";
- private DestinationDto destination;
- private boolean destinationDefined = false;
-
- public static final String JSON_PROPERTY_CONFERENCE_ID = "conferenceId";
- private String conferenceId;
- private boolean conferenceIdDefined = false;
-
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS = "conferenceDtmfOptions";
- private ConferenceCalloutRequestConferenceDtmfOptionsDto conferenceDtmfOptions;
- private boolean conferenceDtmfOptionsDefined = false;
-
- public static final String JSON_PROPERTY_DTMF = "dtmf";
- private String dtmf;
- private boolean dtmfDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DURATION = "maxDuration";
- private Integer maxDuration;
- private boolean maxDurationDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_ACE = "enableAce";
- private Boolean enableAce;
- private boolean enableAceDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_DICE = "enableDice";
- private Boolean enableDice;
- private boolean enableDiceDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_PIE = "enablePie";
- private Boolean enablePie;
- private boolean enablePieDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public static final String JSON_PROPERTY_GREETING = "greeting";
- private String greeting;
- private boolean greetingDefined = false;
-
- public static final String JSON_PROPERTY_MOH_CLASS = "mohClass";
- private String mohClass;
- private boolean mohClassDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_DOMAIN = "domain";
- private String domain;
- private boolean domainDefined = false;
-
- public ConferenceCalloutRequestDto() {}
-
- public ConferenceCalloutRequestDto destination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- return this;
- }
-
- /**
- * Get destination
- *
- * @return destination
- */
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public DestinationDto getDestination() {
- return destination;
- }
-
- @JsonIgnore
- public boolean getDestinationDefined() {
- return destinationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setDestination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- }
-
- public ConferenceCalloutRequestDto conferenceId(String conferenceId) {
- this.conferenceId = conferenceId;
- this.conferenceIdDefined = true;
- return this;
- }
-
- /**
- * The conferenceId of the conference to which you want the callee to join. If the conferenceId
- * doesn't exist a conference room will be created.
- *
- * @return conferenceId
- */
- @JsonProperty(JSON_PROPERTY_CONFERENCE_ID)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getConferenceId() {
- return conferenceId;
- }
-
- @JsonIgnore
- public boolean getConferenceIdDefined() {
- return conferenceIdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CONFERENCE_ID)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setConferenceId(String conferenceId) {
- this.conferenceId = conferenceId;
- this.conferenceIdDefined = true;
- }
-
- public ConferenceCalloutRequestDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * The number that will be displayed as the incoming caller. To set your own CLI, you may use your
- * verified number or your Dashboard number. The number must be in
- * [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public ConferenceCalloutRequestDto conferenceDtmfOptions(
- ConferenceCalloutRequestConferenceDtmfOptionsDto conferenceDtmfOptions) {
- this.conferenceDtmfOptions = conferenceDtmfOptions;
- this.conferenceDtmfOptionsDefined = true;
- return this;
- }
-
- /**
- * Get conferenceDtmfOptions
- *
- * @return conferenceDtmfOptions
- */
- @JsonProperty(JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public ConferenceCalloutRequestConferenceDtmfOptionsDto getConferenceDtmfOptions() {
- return conferenceDtmfOptions;
- }
-
- @JsonIgnore
- public boolean getConferenceDtmfOptionsDefined() {
- return conferenceDtmfOptionsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setConferenceDtmfOptions(
- ConferenceCalloutRequestConferenceDtmfOptionsDto conferenceDtmfOptions) {
- this.conferenceDtmfOptions = conferenceDtmfOptions;
- this.conferenceDtmfOptionsDefined = true;
- }
-
- public ConferenceCalloutRequestDto dtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- return this;
- }
-
- /**
- * When the destination picks up, this DTMF tones will be played to the callee. Valid characters
- * in the string are \"0\"-\"9\", \"#\" and \"w\". A
- * \"w\" will render a 500 ms pause. Example: \"ww1234#w#\" will render a 1s
- * pause, the DTMF tones \"1\", \"2\", \"3\", \"4\" and
- * \"#\" followed by a 0.5s pause and finally the DTMF tone for \"#\". This
- * can be used if the callout destination for instance require a conference PIN code or an
- * extension to be entered.
- *
- * @return dtmf
- */
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDtmf() {
- return dtmf;
- }
-
- @JsonIgnore
- public boolean getDtmfDefined() {
- return dtmfDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- }
-
- public ConferenceCalloutRequestDto maxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- return this;
- }
-
- /**
- * Get maxDuration
- *
- * @return maxDuration
- */
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDuration() {
- return maxDuration;
- }
-
- @JsonIgnore
- public boolean getMaxDurationDefined() {
- return maxDurationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- }
-
- public ConferenceCalloutRequestDto enableAce(Boolean enableAce) {
- this.enableAce = enableAce;
- this.enableAceDefined = true;
- return this;
- }
-
- /**
- * If `enableAce` is set to true and the application has a callback URL specified, you
- * will receive an ACE callback when the call is answered. When the callback is received, your
- * platform must respond with a svamlet containing the `connectConf` action in order to
- * add the call to a conference or create the conference if it's the first call. If it's
- * set to false, no ACE event will be sent to your backend.<br><b>Note </b> if
- * the call is towards an InApp destination `type:` `username`, then no ACE
- * will be issued when the call is connected, even if `enableAce` is present in the
- * callout request.
- *
- * @return enableAce
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_ACE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnableAce() {
- return enableAce;
- }
-
- @JsonIgnore
- public boolean getEnableAceDefined() {
- return enableAceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_ACE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnableAce(Boolean enableAce) {
- this.enableAce = enableAce;
- this.enableAceDefined = true;
- }
-
- public ConferenceCalloutRequestDto enableDice(Boolean enableDice) {
- this.enableDice = enableDice;
- this.enableDiceDefined = true;
- return this;
- }
-
- /**
- * If `enableDice` is set to true and the application has a callback URL specified, you
- * will receive a DiCE callback when the call is disconnected. If it's set to false, no DiCE
- * event will be sent to your backend.<br><b>Note</b> if the call is towards an
- * InApp destination `type:` `username`, then no DICE will be issued at the
- * end of the call, even if `enableDice` is present in the callout request.
- *
- * @return enableDice
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_DICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnableDice() {
- return enableDice;
- }
-
- @JsonIgnore
- public boolean getEnableDiceDefined() {
- return enableDiceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_DICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnableDice(Boolean enableDice) {
- this.enableDice = enableDice;
- this.enableDiceDefined = true;
- }
-
- public ConferenceCalloutRequestDto enablePie(Boolean enablePie) {
- this.enablePie = enablePie;
- this.enablePieDefined = true;
- return this;
- }
-
- /**
- * If `enablePie` is set to true and the application has a callback URL specified, you
- * will receive a PIE callback after a `runMenu` action, with the information of the
- * action that the user took. If it's set to false, no PIE event will be sent to your backend.
- *
- * @return enablePie
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_PIE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnablePie() {
- return enablePie;
- }
-
- @JsonIgnore
- public boolean getEnablePieDefined() {
- return enablePieDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_PIE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnablePie(Boolean enablePie) {
- this.enablePie = enablePie;
- this.enablePieDefined = true;
- }
-
- public ConferenceCalloutRequestDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * The voice and language you want to use for the prompts. This can either be defined by the ISO
- * 639 locale and language code or by specifying a particular voice. Supported languages and
- * voices are detailed [here](../../../voice-locales/)
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- public ConferenceCalloutRequestDto greeting(String greeting) {
- this.greeting = greeting;
- this.greetingDefined = true;
- return this;
- }
-
- /**
- * The text that will be spoken as a greeting.
- *
- * @return greeting
- */
- @JsonProperty(JSON_PROPERTY_GREETING)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getGreeting() {
- return greeting;
- }
-
- @JsonIgnore
- public boolean getGreetingDefined() {
- return greetingDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_GREETING)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setGreeting(String greeting) {
- this.greeting = greeting;
- this.greetingDefined = true;
- }
-
- public ConferenceCalloutRequestDto mohClass(String mohClass) {
- this.mohClass = mohClass;
- this.mohClassDefined = true;
- return this;
- }
-
- /**
- * Means \"music-on-hold.\" It's an optional parameter that specifies what the first
- * participant should listen to while they're alone in the conference, waiting for other
- * participants to join. It can take one of these pre-defined
- * values:<ul><li>`ring` (progress
- * tone)</li><li>`music1` (music
- * file)</li><li>`music2` (music
- * file)</li><li>`music3` (music file)</li></ul></br>If no
- * “music-on-hold” is specified, the user will only hear silence.
- *
- * @return mohClass
- */
- @JsonProperty(JSON_PROPERTY_MOH_CLASS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMohClass() {
- return mohClass;
- }
-
- @JsonIgnore
- public boolean getMohClassDefined() {
- return mohClassDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MOH_CLASS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMohClass(String mohClass) {
- this.mohClass = mohClass;
- this.mohClassDefined = true;
- }
-
- public ConferenceCalloutRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * Used to input custom data.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public ConferenceCalloutRequestDto domain(String domain) {
- this.domain = domain;
- this.domainDefined = true;
- return this;
- }
-
- /**
- * can be either “pstn” for PSTN endpoint or “mxp” for data (app or web) clients.
- *
- * @return domain
- */
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDomain() {
- return domain;
- }
-
- @JsonIgnore
- public boolean getDomainDefined() {
- return domainDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDomain(String domain) {
- this.domain = domain;
- this.domainDefined = true;
- }
-
- /** Return true if this conferenceCalloutRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- ConferenceCalloutRequestDto conferenceCalloutRequest = (ConferenceCalloutRequestDto) o;
- return Objects.equals(this.destination, conferenceCalloutRequest.destination)
- && Objects.equals(this.conferenceId, conferenceCalloutRequest.conferenceId)
- && Objects.equals(this.cli, conferenceCalloutRequest.cli)
- && Objects.equals(
- this.conferenceDtmfOptions, conferenceCalloutRequest.conferenceDtmfOptions)
- && Objects.equals(this.dtmf, conferenceCalloutRequest.dtmf)
- && Objects.equals(this.maxDuration, conferenceCalloutRequest.maxDuration)
- && Objects.equals(this.enableAce, conferenceCalloutRequest.enableAce)
- && Objects.equals(this.enableDice, conferenceCalloutRequest.enableDice)
- && Objects.equals(this.enablePie, conferenceCalloutRequest.enablePie)
- && Objects.equals(this.locale, conferenceCalloutRequest.locale)
- && Objects.equals(this.greeting, conferenceCalloutRequest.greeting)
- && Objects.equals(this.mohClass, conferenceCalloutRequest.mohClass)
- && Objects.equals(this.custom, conferenceCalloutRequest.custom)
- && Objects.equals(this.domain, conferenceCalloutRequest.domain);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- destination,
- conferenceId,
- cli,
- conferenceDtmfOptions,
- dtmf,
- maxDuration,
- enableAce,
- enableDice,
- enablePie,
- locale,
- greeting,
- mohClass,
- custom,
- domain);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class ConferenceCalloutRequestDto {\n");
- sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
- sb.append(" conferenceId: ").append(toIndentedString(conferenceId)).append("\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" conferenceDtmfOptions: ")
- .append(toIndentedString(conferenceDtmfOptions))
- .append("\n");
- sb.append(" dtmf: ").append(toIndentedString(dtmf)).append("\n");
- sb.append(" maxDuration: ").append(toIndentedString(maxDuration)).append("\n");
- sb.append(" enableAce: ").append(toIndentedString(enableAce)).append("\n");
- sb.append(" enableDice: ").append(toIndentedString(enableDice)).append("\n");
- sb.append(" enablePie: ").append(toIndentedString(enablePie)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append(" greeting: ").append(toIndentedString(greeting)).append("\n");
- sb.append(" mohClass: ").append(toIndentedString(mohClass)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CustomCalloutRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CustomCalloutRequestDto.java
deleted file mode 100644
index 3ada2a828..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/CustomCalloutRequestDto.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/**
- * The custom callout, the server initiates a call from the servers that can be controlled by
- * specifying how the call should progress at each call event.
- */
-@JsonPropertyOrder({
- CustomCalloutRequestDto.JSON_PROPERTY_CLI,
- CustomCalloutRequestDto.JSON_PROPERTY_DESTINATION,
- CustomCalloutRequestDto.JSON_PROPERTY_DTMF,
- CustomCalloutRequestDto.JSON_PROPERTY_CUSTOM,
- CustomCalloutRequestDto.JSON_PROPERTY_MAX_DURATION,
- CustomCalloutRequestDto.JSON_PROPERTY_ICE,
- CustomCalloutRequestDto.JSON_PROPERTY_ACE,
- CustomCalloutRequestDto.JSON_PROPERTY_PIE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class CustomCalloutRequestDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_DESTINATION = "destination";
- private DestinationDto destination;
- private boolean destinationDefined = false;
-
- public static final String JSON_PROPERTY_DTMF = "dtmf";
- private String dtmf;
- private boolean dtmfDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DURATION = "maxDuration";
- private Integer maxDuration;
- private boolean maxDurationDefined = false;
-
- public static final String JSON_PROPERTY_ICE = "ice";
- private String ice;
- private boolean iceDefined = false;
-
- public static final String JSON_PROPERTY_ACE = "ace";
- private String ace;
- private boolean aceDefined = false;
-
- public static final String JSON_PROPERTY_PIE = "pie";
- private String pie;
- private boolean pieDefined = false;
-
- public CustomCalloutRequestDto() {}
-
- public CustomCalloutRequestDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * The number that will be displayed as the incoming caller, to set your own CLI, you may use your
- * verified number or your Dashboard virtual number, it must be in
- * [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public CustomCalloutRequestDto destination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- return this;
- }
-
- /**
- * Get destination
- *
- * @return destination
- */
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DestinationDto getDestination() {
- return destination;
- }
-
- @JsonIgnore
- public boolean getDestinationDefined() {
- return destinationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDestination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- }
-
- public CustomCalloutRequestDto dtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- return this;
- }
-
- /**
- * When the destination picks up, this DTMF tones will be played to the callee. Valid characters
- * in the string are \"0\"-\"9\", \"#\", and \"w\". A
- * \"w\" will render a 500 ms pause. For example, \"ww1234#w#\" will render a
- * 1s pause, the DTMF tones \"1\", \"2\", \"3\", \"4\" and
- * \"#\" followed by a 0.5s pause and finally the DTMF tone for \"#\". This
- * can be used if the callout destination for instance require a conference PIN code or an
- * extension to be entered.
- *
- * @return dtmf
- */
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDtmf() {
- return dtmf;
- }
-
- @JsonIgnore
- public boolean getDtmfDefined() {
- return dtmfDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- }
-
- public CustomCalloutRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * Can be used to input custom data.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public CustomCalloutRequestDto maxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- return this;
- }
-
- /**
- * The maximum amount of time in seconds that the call will last.
- *
- * @return maxDuration
- */
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDuration() {
- return maxDuration;
- }
-
- @JsonIgnore
- public boolean getMaxDurationDefined() {
- return maxDurationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- }
-
- public CustomCalloutRequestDto ice(String ice) {
- this.ice = ice;
- this.iceDefined = true;
- return this;
- }
-
- /**
- * You can use inline [SVAML](../../../svaml/) to replace a callback URL when using custom
- * callouts. Ensure that the JSON object is escaped correctly. If inline ICE SVAML is passed,
- * exclude *cli* and *destination* properties from the *customCallout* request body. Example:
- * ```\"{\\\"action\\\":{\\\"name\\\":\\\"connectPstn\\\",\\\"number\\\":\\\"46000000001\\\",\\\"maxDuration\\\":90}}\"```
- *
- * @return ice
- */
- @JsonProperty(JSON_PROPERTY_ICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getIce() {
- return ice;
- }
-
- @JsonIgnore
- public boolean getIceDefined() {
- return iceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setIce(String ice) {
- this.ice = ice;
- this.iceDefined = true;
- }
-
- public CustomCalloutRequestDto ace(String ace) {
- this.ace = ace;
- this.aceDefined = true;
- return this;
- }
-
- /**
- * You can use inline [SVAML](../../../svaml/) to replace a callback URL when using custom
- * callouts. Ensure that the JSON object is escaped correctly. Example:
- * ```\"{\\\"action\\\": {\\\"name\\\":
- * \\\"RunMenu\\\",\\\"locale\\\":
- * \\\"en-US\\\",\\\"menus\\\": [{\\\"id\\\":
- * \\\"main\\\",\\\"mainPrompt\\\": \\\"#tts[ Welcome to the main menu.
- * Press 1 for a callback or 2 for a
- * cancel</speak>]\\\",\\\"timeoutMills\\\": 5000,\\\"options\\\":
- * [ {\\\"dtmf\\\": \\\"1\\\",\\\"action\\\":
- * \\\"return(callback)\\\"}, {\\\"dtmf\\\":
- * \\\"2\\\",\\\"action\\\":
- * \\\"return(cancel)\\\"}]}]}}\"```
- *
- * @return ace
- */
- @JsonProperty(JSON_PROPERTY_ACE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getAce() {
- return ace;
- }
-
- @JsonIgnore
- public boolean getAceDefined() {
- return aceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ACE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setAce(String ace) {
- this.ace = ace;
- this.aceDefined = true;
- }
-
- public CustomCalloutRequestDto pie(String pie) {
- this.pie = pie;
- this.pieDefined = true;
- return this;
- }
-
- /**
- * <b>Note:</b> PIE callbacks are not available for DATA Calls; only PSTN and SIP
- * calls. You can use inline [SVAML](../../../svaml/) to replace a callback URL when using custom
- * callouts. Ensure that the JSON object is escaped correctly. A PIE event will contain a value
- * chosen from an IVR choice. Usually a PIE event wil contain a URL to a callback sever that will
- * receive the choice and be able to parse it. This could result in further SVAML or some other
- * application logic function. Example:
- * ```\"https://your-application-server-host/application\"```
- *
- * @return pie
- */
- @JsonProperty(JSON_PROPERTY_PIE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getPie() {
- return pie;
- }
-
- @JsonIgnore
- public boolean getPieDefined() {
- return pieDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_PIE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPie(String pie) {
- this.pie = pie;
- this.pieDefined = true;
- }
-
- /** Return true if this customCalloutRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CustomCalloutRequestDto customCalloutRequest = (CustomCalloutRequestDto) o;
- return Objects.equals(this.cli, customCalloutRequest.cli)
- && Objects.equals(this.destination, customCalloutRequest.destination)
- && Objects.equals(this.dtmf, customCalloutRequest.dtmf)
- && Objects.equals(this.custom, customCalloutRequest.custom)
- && Objects.equals(this.maxDuration, customCalloutRequest.maxDuration)
- && Objects.equals(this.ice, customCalloutRequest.ice)
- && Objects.equals(this.ace, customCalloutRequest.ace)
- && Objects.equals(this.pie, customCalloutRequest.pie);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(cli, destination, dtmf, custom, maxDuration, ice, ace, pie);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class CustomCalloutRequestDto {\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
- sb.append(" dtmf: ").append(toIndentedString(dtmf)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" maxDuration: ").append(toIndentedString(maxDuration)).append("\n");
- sb.append(" ice: ").append(toIndentedString(ice)).append("\n");
- sb.append(" ace: ").append(toIndentedString(ace)).append("\n");
- sb.append(" pie: ").append(toIndentedString(pie)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DestinationDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DestinationDto.java
deleted file mode 100644
index 081792114..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DestinationDto.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** The type of device and number or endpoint to call. */
-@JsonPropertyOrder({DestinationDto.JSON_PROPERTY_TYPE, DestinationDto.JSON_PROPERTY_ENDPOINT})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class DestinationDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_TYPE = "type";
- private DestinationTypeDto type;
- private boolean typeDefined = false;
-
- public static final String JSON_PROPERTY_ENDPOINT = "endpoint";
- private String endpoint;
- private boolean endpointDefined = false;
-
- public DestinationDto() {}
-
- public DestinationDto type(DestinationTypeDto type) {
- this.type = type;
- this.typeDefined = true;
- return this;
- }
-
- /**
- * Get type
- *
- * @return type
- */
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public DestinationTypeDto getType() {
- return type;
- }
-
- @JsonIgnore
- public boolean getTypeDefined() {
- return typeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setType(DestinationTypeDto type) {
- this.type = type;
- this.typeDefined = true;
- }
-
- public DestinationDto endpoint(String endpoint) {
- this.endpoint = endpoint;
- this.endpointDefined = true;
- return this;
- }
-
- /**
- * If the type is `number` the value of the endpoint is a phone number. If the type is
- * `username` the value is the username for a data endpoint.
- *
- * @return endpoint
- */
- @JsonProperty(JSON_PROPERTY_ENDPOINT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getEndpoint() {
- return endpoint;
- }
-
- @JsonIgnore
- public boolean getEndpointDefined() {
- return endpointDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENDPOINT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setEndpoint(String endpoint) {
- this.endpoint = endpoint;
- this.endpointDefined = true;
- }
-
- /** Return true if this destination object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- DestinationDto destination = (DestinationDto) o;
- return Objects.equals(this.type, destination.type)
- && Objects.equals(this.endpoint, destination.endpoint);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(type, endpoint);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class DestinationDto {\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
- sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DestinationTypeDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DestinationTypeDto.java
deleted file mode 100644
index 1978317cd..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DestinationTypeDto.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Can be of type `number` for PSTN endpoints or of type `username` for data
- * endpoints.
- */
-public enum DestinationTypeDto {
- NUMBER("number"),
-
- NUMBER2("Number"),
-
- USERNAME("username"),
-
- USERNAME2("Username"),
-
- SIP("sip"),
-
- DID("did"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- DestinationTypeDto(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static DestinationTypeDto fromValue(String value) {
- for (DestinationTypeDto b : DestinationTypeDto.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DiceRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DiceRequestDto.java
deleted file mode 100644
index 0c987c1a2..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DiceRequestDto.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonValue;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.time.OffsetDateTime;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/** The request body of a Disconnected Call Event. */
-@JsonPropertyOrder({
- DiceRequestDto.JSON_PROPERTY_EVENT,
- DiceRequestDto.JSON_PROPERTY_TIMESTAMP,
- DiceRequestDto.JSON_PROPERTY_CUSTOM,
- DiceRequestDto.JSON_PROPERTY_APPLICATION_KEY,
- DiceRequestDto.JSON_PROPERTY_REASON,
- DiceRequestDto.JSON_PROPERTY_RESULT,
- DiceRequestDto.JSON_PROPERTY_DEBIT,
- DiceRequestDto.JSON_PROPERTY_USER_RATE,
- DiceRequestDto.JSON_PROPERTY_TO,
- DiceRequestDto.JSON_PROPERTY_DURATION,
- DiceRequestDto.JSON_PROPERTY_FROM,
- DiceRequestDto.JSON_PROPERTY_CALL_HEADERS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-
-/*@JsonIgnoreProperties(
- value = "event", // ignore manually set event, it will be automatically generated by Jackson during serialization
- allowSetters = true // allows the event to be set during deserialization
-)*/
-@JsonTypeInfo(
- use = JsonTypeInfo.Id.NONE,
- include = JsonTypeInfo.As.EXISTING_PROPERTY,
- property = "event",
- visible = true)
-public class DiceRequestDto extends WebhooksEventRequestDto {
- private static final long serialVersionUID = 1L;
-
- /** Must have the value `dice`. */
- public enum EventEnum {
- DICE("dice"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- EventEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static EventEnum fromValue(String value) {
- for (EventEnum b : EventEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_EVENT = "event";
- private String event;
- private boolean eventDefined = false;
-
- public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
- private OffsetDateTime timestamp;
- private boolean timestampDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATION_KEY = "applicationKey";
- private String applicationKey;
- private boolean applicationKeyDefined = false;
-
- /** The reason the call was disconnected. */
- public enum ReasonEnum {
- N_A("N/A"),
-
- TIMEOUT("TIMEOUT"),
-
- CALLERHANGUP("CALLERHANGUP"),
-
- CALLEEHANGUP("CALLEEHANGUP"),
-
- BLOCKED("BLOCKED"),
-
- MANAGERHANGUP("MANAGERHANGUP"),
-
- NOCREDITPARTNER("NOCREDITPARTNER"),
-
- GENERALERROR("GENERALERROR"),
-
- CANCEL("CANCEL"),
-
- USERNOTFOUND("USERNOTFOUND"),
-
- CALLBACKERROR("CALLBACKERROR"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- ReasonEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static ReasonEnum fromValue(String value) {
- for (ReasonEnum b : ReasonEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_REASON = "reason";
- private String reason;
- private boolean reasonDefined = false;
-
- public static final String JSON_PROPERTY_RESULT = "result";
- private CallResultDto result;
- private boolean resultDefined = false;
-
- public static final String JSON_PROPERTY_DEBIT = "debit";
- private PriceDto debit;
- private boolean debitDefined = false;
-
- public static final String JSON_PROPERTY_USER_RATE = "userRate";
- private PriceDto userRate;
- private boolean userRateDefined = false;
-
- public static final String JSON_PROPERTY_TO = "to";
- private DestinationDto to;
- private boolean toDefined = false;
-
- public static final String JSON_PROPERTY_DURATION = "duration";
- private Integer duration;
- private boolean durationDefined = false;
-
- public static final String JSON_PROPERTY_FROM = "from";
- private String from;
- private boolean fromDefined = false;
-
- public static final String JSON_PROPERTY_CALL_HEADERS = "callHeaders";
- private List callHeaders;
- private boolean callHeadersDefined = false;
-
- public DiceRequestDto() {}
-
- public DiceRequestDto event(String event) {
- this.event = event;
- this.eventDefined = true;
- return this;
- }
-
- /**
- * Must have the value `dice`.
- *
- * @return event
- */
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getEvent() {
- return event;
- }
-
- @JsonIgnore
- public boolean getEventDefined() {
- return eventDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setEvent(String event) {
- this.event = event;
- this.eventDefined = true;
- }
-
- public DiceRequestDto timestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- return this;
- }
-
- /**
- * The timestamp in UTC format.
- *
- * @return timestamp
- */
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public OffsetDateTime getTimestamp() {
- return timestamp;
- }
-
- @JsonIgnore
- public boolean getTimestampDefined() {
- return timestampDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- }
-
- public DiceRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * A string that can be used to pass custom information related to the call.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public DiceRequestDto applicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- return this;
- }
-
- /**
- * The unique application key. You can find it in the Sinch
- * [dashboard](https://dashboard.sinch.com/voice/apps).
- *
- * @return applicationKey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationKey() {
- return applicationKey;
- }
-
- @JsonIgnore
- public boolean getApplicationKeyDefined() {
- return applicationKeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- }
-
- public DiceRequestDto reason(String reason) {
- this.reason = reason;
- this.reasonDefined = true;
- return this;
- }
-
- /**
- * The reason the call was disconnected.
- *
- * @return reason
- */
- @JsonProperty(JSON_PROPERTY_REASON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getReason() {
- return reason;
- }
-
- @JsonIgnore
- public boolean getReasonDefined() {
- return reasonDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_REASON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setReason(String reason) {
- this.reason = reason;
- this.reasonDefined = true;
- }
-
- public DiceRequestDto result(CallResultDto result) {
- this.result = result;
- this.resultDefined = true;
- return this;
- }
-
- /**
- * Get result
- *
- * @return result
- */
- @JsonProperty(JSON_PROPERTY_RESULT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public CallResultDto getResult() {
- return result;
- }
-
- @JsonIgnore
- public boolean getResultDefined() {
- return resultDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_RESULT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setResult(CallResultDto result) {
- this.result = result;
- this.resultDefined = true;
- }
-
- public DiceRequestDto debit(PriceDto debit) {
- this.debit = debit;
- this.debitDefined = true;
- return this;
- }
-
- /**
- * Get debit
- *
- * @return debit
- */
- @JsonProperty(JSON_PROPERTY_DEBIT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PriceDto getDebit() {
- return debit;
- }
-
- @JsonIgnore
- public boolean getDebitDefined() {
- return debitDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DEBIT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDebit(PriceDto debit) {
- this.debit = debit;
- this.debitDefined = true;
- }
-
- public DiceRequestDto userRate(PriceDto userRate) {
- this.userRate = userRate;
- this.userRateDefined = true;
- return this;
- }
-
- /**
- * Get userRate
- *
- * @return userRate
- */
- @JsonProperty(JSON_PROPERTY_USER_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PriceDto getUserRate() {
- return userRate;
- }
-
- @JsonIgnore
- public boolean getUserRateDefined() {
- return userRateDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_USER_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUserRate(PriceDto userRate) {
- this.userRate = userRate;
- this.userRateDefined = true;
- }
-
- public DiceRequestDto to(DestinationDto to) {
- this.to = to;
- this.toDefined = true;
- return this;
- }
-
- /**
- * Get to
- *
- * @return to
- */
- @JsonProperty(JSON_PROPERTY_TO)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DestinationDto getTo() {
- return to;
- }
-
- @JsonIgnore
- public boolean getToDefined() {
- return toDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TO)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTo(DestinationDto to) {
- this.to = to;
- this.toDefined = true;
- }
-
- public DiceRequestDto duration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- return this;
- }
-
- /**
- * The duration of the call in seconds.
- *
- * @return duration
- */
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getDuration() {
- return duration;
- }
-
- @JsonIgnore
- public boolean getDurationDefined() {
- return durationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDuration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- }
-
- public DiceRequestDto from(String from) {
- this.from = from;
- this.fromDefined = true;
- return this;
- }
-
- /**
- * Information about the initiator of the call.
- *
- * @return from
- */
- @JsonProperty(JSON_PROPERTY_FROM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getFrom() {
- return from;
- }
-
- @JsonIgnore
- public boolean getFromDefined() {
- return fromDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_FROM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setFrom(String from) {
- this.from = from;
- this.fromDefined = true;
- }
-
- public DiceRequestDto callHeaders(List callHeaders) {
- this.callHeaders = callHeaders;
- this.callHeadersDefined = true;
- return this;
- }
-
- public DiceRequestDto addCallHeadersItem(CallHeaderDto callHeadersItem) {
- if (this.callHeaders == null) {
- this.callHeaders = new ArrayList<>();
- }
- this.callHeadersDefined = true;
- this.callHeaders.add(callHeadersItem);
- return this;
- }
-
- /**
- * If the call was initiated by a Sinch SDK client, call headers are the headers specified by the
- * *caller* client. Read more about call headers [here](../../../call-headers/).
- *
- * @return callHeaders
- */
- @JsonProperty(JSON_PROPERTY_CALL_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getCallHeaders() {
- return callHeaders;
- }
-
- @JsonIgnore
- public boolean getCallHeadersDefined() {
- return callHeadersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALL_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallHeaders(List callHeaders) {
- this.callHeaders = callHeaders;
- this.callHeadersDefined = true;
- }
-
- @Override
- public DiceRequestDto callid(String callid) {
- this.setCallid(callid);
- return this;
- }
-
- @Override
- public DiceRequestDto version(Integer version) {
- this.setVersion(version);
- return this;
- }
-
- /** Return true if this diceRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- DiceRequestDto diceRequest = (DiceRequestDto) o;
- return Objects.equals(this.event, diceRequest.event)
- && Objects.equals(this.timestamp, diceRequest.timestamp)
- && Objects.equals(this.custom, diceRequest.custom)
- && Objects.equals(this.applicationKey, diceRequest.applicationKey)
- && Objects.equals(this.reason, diceRequest.reason)
- && Objects.equals(this.result, diceRequest.result)
- && Objects.equals(this.debit, diceRequest.debit)
- && Objects.equals(this.userRate, diceRequest.userRate)
- && Objects.equals(this.to, diceRequest.to)
- && Objects.equals(this.duration, diceRequest.duration)
- && Objects.equals(this.from, diceRequest.from)
- && Objects.equals(this.callHeaders, diceRequest.callHeaders)
- && super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- event,
- timestamp,
- custom,
- applicationKey,
- reason,
- result,
- debit,
- userRate,
- to,
- duration,
- from,
- callHeaders,
- super.hashCode());
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class DiceRequestDto {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" event: ").append(toIndentedString(event)).append("\n");
- sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n");
- sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
- sb.append(" result: ").append(toIndentedString(result)).append("\n");
- sb.append(" debit: ").append(toIndentedString(debit)).append("\n");
- sb.append(" userRate: ").append(toIndentedString(userRate)).append("\n");
- sb.append(" to: ").append(toIndentedString(to)).append("\n");
- sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
- sb.append(" from: ").append(toIndentedString(from)).append("\n");
- sb.append(" callHeaders: ").append(toIndentedString(callHeaders)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
- static {
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("diceRequest", DiceRequestDto.class);
- JSONNavigator.registerDiscriminator(DiceRequestDto.class, "event", mappings);
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DomainDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DomainDto.java
deleted file mode 100644
index 6c0453efb..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/DomainDto.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Can be either `pstn` for PSTN endpoint or `mxp` for data (app or web)
- * clients.
- */
-public enum DomainDto {
- PSTN("pstn"),
-
- MXP("mxp"),
-
- PSTN2("PSTN"),
-
- MXP2("MXP"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- DomainDto(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static DomainDto fromValue(String value) {
- for (DomainDto b : DomainDto.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ErrorDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ErrorDto.java
deleted file mode 100644
index 36f7a28e8..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ErrorDto.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** ErrorDto */
-@JsonPropertyOrder({
- ErrorDto.JSON_PROPERTY_STATUS,
- ErrorDto.JSON_PROPERTY_ERROR_CODE,
- ErrorDto.JSON_PROPERTY_MESSAGE,
- ErrorDto.JSON_PROPERTY_REFERENCE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class ErrorDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_STATUS = "status";
- private String status;
- private boolean statusDefined = false;
-
- public static final String JSON_PROPERTY_ERROR_CODE = "errorCode";
- private String errorCode;
- private boolean errorCodeDefined = false;
-
- public static final String JSON_PROPERTY_MESSAGE = "message";
- private String message;
- private boolean messageDefined = false;
-
- public static final String JSON_PROPERTY_REFERENCE = "reference";
- private String reference;
- private boolean referenceDefined = false;
-
- public ErrorDto() {}
-
- public ErrorDto status(String status) {
- this.status = status;
- this.statusDefined = true;
- return this;
- }
-
- /**
- * A summary of the HTTP error code and error type.
- *
- * @return status
- */
- @JsonProperty(JSON_PROPERTY_STATUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getStatus() {
- return status;
- }
-
- @JsonIgnore
- public boolean getStatusDefined() {
- return statusDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_STATUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setStatus(String status) {
- this.status = status;
- this.statusDefined = true;
- }
-
- public ErrorDto errorCode(String errorCode) {
- this.errorCode = errorCode;
- this.errorCodeDefined = true;
- return this;
- }
-
- /**
- * The HTTP error code.
- *
- * @return errorCode
- */
- @JsonProperty(JSON_PROPERTY_ERROR_CODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getErrorCode() {
- return errorCode;
- }
-
- @JsonIgnore
- public boolean getErrorCodeDefined() {
- return errorCodeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ERROR_CODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setErrorCode(String errorCode) {
- this.errorCode = errorCode;
- this.errorCodeDefined = true;
- }
-
- public ErrorDto message(String message) {
- this.message = message;
- this.messageDefined = true;
- return this;
- }
-
- /**
- * A simple description of the cause of the error.
- *
- * @return message
- */
- @JsonProperty(JSON_PROPERTY_MESSAGE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMessage() {
- return message;
- }
-
- @JsonIgnore
- public boolean getMessageDefined() {
- return messageDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MESSAGE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMessage(String message) {
- this.message = message;
- this.messageDefined = true;
- }
-
- public ErrorDto reference(String reference) {
- this.reference = reference;
- this.referenceDefined = true;
- return this;
- }
-
- /**
- * If applicable, a reference ID for support to use with diagnosing the error.
- *
- * @return reference
- */
- @JsonProperty(JSON_PROPERTY_REFERENCE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getReference() {
- return reference;
- }
-
- @JsonIgnore
- public boolean getReferenceDefined() {
- return referenceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_REFERENCE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setReference(String reference) {
- this.reference = reference;
- this.referenceDefined = true;
- }
-
- /** Return true if this Error object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- ErrorDto error = (ErrorDto) o;
- return Objects.equals(this.status, error.status)
- && Objects.equals(this.errorCode, error.errorCode)
- && Objects.equals(this.message, error.message)
- && Objects.equals(this.reference, error.reference);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(status, errorCode, message, reference);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class ErrorDto {\n");
- sb.append(" status: ").append(toIndentedString(status)).append("\n");
- sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
- sb.append(" message: ").append(toIndentedString(message)).append("\n");
- sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetCallResponseObjDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetCallResponseObjDto.java
deleted file mode 100644
index bd4a057b8..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetCallResponseObjDto.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.time.OffsetDateTime;
-import java.util.Objects;
-
-/** GetCallResponseObjDto */
-@JsonPropertyOrder({
- GetCallResponseObjDto.JSON_PROPERTY_FROM,
- GetCallResponseObjDto.JSON_PROPERTY_TO,
- GetCallResponseObjDto.JSON_PROPERTY_DOMAIN,
- GetCallResponseObjDto.JSON_PROPERTY_CALL_ID,
- GetCallResponseObjDto.JSON_PROPERTY_DURATION,
- GetCallResponseObjDto.JSON_PROPERTY_STATUS,
- GetCallResponseObjDto.JSON_PROPERTY_RESULT,
- GetCallResponseObjDto.JSON_PROPERTY_REASON,
- GetCallResponseObjDto.JSON_PROPERTY_TIMESTAMP,
- GetCallResponseObjDto.JSON_PROPERTY_CUSTOM,
- GetCallResponseObjDto.JSON_PROPERTY_USER_RATE,
- GetCallResponseObjDto.JSON_PROPERTY_DEBIT
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetCallResponseObjDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_FROM = "from";
- private DestinationDto from;
- private boolean fromDefined = false;
-
- public static final String JSON_PROPERTY_TO = "to";
- private DestinationDto to;
- private boolean toDefined = false;
-
- /** Must be `pstn` for PSTN. */
- public enum DomainEnum {
- PSTN("pstn"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- DomainEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static DomainEnum fromValue(String value) {
- for (DomainEnum b : DomainEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_DOMAIN = "domain";
- private String domain;
- private boolean domainDefined = false;
-
- public static final String JSON_PROPERTY_CALL_ID = "callId";
- private String callId;
- private boolean callIdDefined = false;
-
- public static final String JSON_PROPERTY_DURATION = "duration";
- private Integer duration;
- private boolean durationDefined = false;
-
- /** The status of the call. Either `ONGOING` or `FINAL` */
- public enum StatusEnum {
- ONGOING("ONGOING"),
-
- FINAL("FINAL"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- StatusEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static StatusEnum fromValue(String value) {
- for (StatusEnum b : StatusEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_STATUS = "status";
- private String status;
- private boolean statusDefined = false;
-
- public static final String JSON_PROPERTY_RESULT = "result";
- private CallResultDto result;
- private boolean resultDefined = false;
-
- /** Contains the reason why a call ended. */
- public enum ReasonEnum {
- N_A("N/A"),
-
- TIMEOUT("TIMEOUT"),
-
- CALLERHANGUP("CALLERHANGUP"),
-
- CALLEEHANGUP("CALLEEHANGUP"),
-
- BLOCKED("BLOCKED"),
-
- NOCREDITPARTNER("NOCREDITPARTNER"),
-
- MANAGERHANGUP("MANAGERHANGUP"),
-
- CANCEL("CANCEL"),
-
- GENERALERROR("GENERALERROR"),
-
- INVALIDSVAMLACTION("INVALIDSVAMLACTION"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- ReasonEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static ReasonEnum fromValue(String value) {
- for (ReasonEnum b : ReasonEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_REASON = "reason";
- private String reason;
- private boolean reasonDefined = false;
-
- public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
- private OffsetDateTime timestamp;
- private boolean timestampDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_USER_RATE = "userRate";
- private PriceDto userRate;
- private boolean userRateDefined = false;
-
- public static final String JSON_PROPERTY_DEBIT = "debit";
- private PriceDto debit;
- private boolean debitDefined = false;
-
- public GetCallResponseObjDto() {}
-
- public GetCallResponseObjDto from(DestinationDto from) {
- this.from = from;
- this.fromDefined = true;
- return this;
- }
-
- /**
- * Get from
- *
- * @return from
- */
- @JsonProperty(JSON_PROPERTY_FROM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DestinationDto getFrom() {
- return from;
- }
-
- @JsonIgnore
- public boolean getFromDefined() {
- return fromDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_FROM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setFrom(DestinationDto from) {
- this.from = from;
- this.fromDefined = true;
- }
-
- public GetCallResponseObjDto to(DestinationDto to) {
- this.to = to;
- this.toDefined = true;
- return this;
- }
-
- /**
- * Get to
- *
- * @return to
- */
- @JsonProperty(JSON_PROPERTY_TO)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DestinationDto getTo() {
- return to;
- }
-
- @JsonIgnore
- public boolean getToDefined() {
- return toDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TO)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTo(DestinationDto to) {
- this.to = to;
- this.toDefined = true;
- }
-
- public GetCallResponseObjDto domain(String domain) {
- this.domain = domain;
- this.domainDefined = true;
- return this;
- }
-
- /**
- * Must be `pstn` for PSTN.
- *
- * @return domain
- */
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDomain() {
- return domain;
- }
-
- @JsonIgnore
- public boolean getDomainDefined() {
- return domainDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDomain(String domain) {
- this.domain = domain;
- this.domainDefined = true;
- }
-
- public GetCallResponseObjDto callId(String callId) {
- this.callId = callId;
- this.callIdDefined = true;
- return this;
- }
-
- /**
- * The unique identifier of the call.
- *
- * @return callId
- */
- @JsonProperty(JSON_PROPERTY_CALL_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCallId() {
- return callId;
- }
-
- @JsonIgnore
- public boolean getCallIdDefined() {
- return callIdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALL_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallId(String callId) {
- this.callId = callId;
- this.callIdDefined = true;
- }
-
- public GetCallResponseObjDto duration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- return this;
- }
-
- /**
- * The duration of the call in seconds.
- *
- * @return duration
- */
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getDuration() {
- return duration;
- }
-
- @JsonIgnore
- public boolean getDurationDefined() {
- return durationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDuration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- }
-
- public GetCallResponseObjDto status(String status) {
- this.status = status;
- this.statusDefined = true;
- return this;
- }
-
- /**
- * The status of the call. Either `ONGOING` or `FINAL`
- *
- * @return status
- */
- @JsonProperty(JSON_PROPERTY_STATUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getStatus() {
- return status;
- }
-
- @JsonIgnore
- public boolean getStatusDefined() {
- return statusDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_STATUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setStatus(String status) {
- this.status = status;
- this.statusDefined = true;
- }
-
- public GetCallResponseObjDto result(CallResultDto result) {
- this.result = result;
- this.resultDefined = true;
- return this;
- }
-
- /**
- * Get result
- *
- * @return result
- */
- @JsonProperty(JSON_PROPERTY_RESULT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public CallResultDto getResult() {
- return result;
- }
-
- @JsonIgnore
- public boolean getResultDefined() {
- return resultDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_RESULT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setResult(CallResultDto result) {
- this.result = result;
- this.resultDefined = true;
- }
-
- public GetCallResponseObjDto reason(String reason) {
- this.reason = reason;
- this.reasonDefined = true;
- return this;
- }
-
- /**
- * Contains the reason why a call ended.
- *
- * @return reason
- */
- @JsonProperty(JSON_PROPERTY_REASON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getReason() {
- return reason;
- }
-
- @JsonIgnore
- public boolean getReasonDefined() {
- return reasonDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_REASON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setReason(String reason) {
- this.reason = reason;
- this.reasonDefined = true;
- }
-
- public GetCallResponseObjDto timestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- return this;
- }
-
- /**
- * The date and time of the call.
- *
- * @return timestamp
- */
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public OffsetDateTime getTimestamp() {
- return timestamp;
- }
-
- @JsonIgnore
- public boolean getTimestampDefined() {
- return timestampDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- }
-
- public GetCallResponseObjDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * An object that can be used to pass custom information related to the call.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public GetCallResponseObjDto userRate(PriceDto userRate) {
- this.userRate = userRate;
- this.userRateDefined = true;
- return this;
- }
-
- /**
- * Get userRate
- *
- * @return userRate
- */
- @JsonProperty(JSON_PROPERTY_USER_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PriceDto getUserRate() {
- return userRate;
- }
-
- @JsonIgnore
- public boolean getUserRateDefined() {
- return userRateDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_USER_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUserRate(PriceDto userRate) {
- this.userRate = userRate;
- this.userRateDefined = true;
- }
-
- public GetCallResponseObjDto debit(PriceDto debit) {
- this.debit = debit;
- this.debitDefined = true;
- return this;
- }
-
- /**
- * Get debit
- *
- * @return debit
- */
- @JsonProperty(JSON_PROPERTY_DEBIT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PriceDto getDebit() {
- return debit;
- }
-
- @JsonIgnore
- public boolean getDebitDefined() {
- return debitDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DEBIT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDebit(PriceDto debit) {
- this.debit = debit;
- this.debitDefined = true;
- }
-
- /** Return true if this getCallResponseObj object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetCallResponseObjDto getCallResponseObj = (GetCallResponseObjDto) o;
- return Objects.equals(this.from, getCallResponseObj.from)
- && Objects.equals(this.to, getCallResponseObj.to)
- && Objects.equals(this.domain, getCallResponseObj.domain)
- && Objects.equals(this.callId, getCallResponseObj.callId)
- && Objects.equals(this.duration, getCallResponseObj.duration)
- && Objects.equals(this.status, getCallResponseObj.status)
- && Objects.equals(this.result, getCallResponseObj.result)
- && Objects.equals(this.reason, getCallResponseObj.reason)
- && Objects.equals(this.timestamp, getCallResponseObj.timestamp)
- && Objects.equals(this.custom, getCallResponseObj.custom)
- && Objects.equals(this.userRate, getCallResponseObj.userRate)
- && Objects.equals(this.debit, getCallResponseObj.debit);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- from, to, domain, callId, duration, status, result, reason, timestamp, custom, userRate,
- debit);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetCallResponseObjDto {\n");
- sb.append(" from: ").append(toIndentedString(from)).append("\n");
- sb.append(" to: ").append(toIndentedString(to)).append("\n");
- sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
- sb.append(" callId: ").append(toIndentedString(callId)).append("\n");
- sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
- sb.append(" status: ").append(toIndentedString(status)).append("\n");
- sb.append(" result: ").append(toIndentedString(result)).append("\n");
- sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
- sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" userRate: ").append(toIndentedString(userRate)).append("\n");
- sb.append(" debit: ").append(toIndentedString(debit)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetConferenceInfoResponseDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetConferenceInfoResponseDto.java
deleted file mode 100644
index df68afc05..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetConferenceInfoResponseDto.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/** The response returns information about the participants in the conference. */
-@JsonPropertyOrder({GetConferenceInfoResponseDto.JSON_PROPERTY_PARTICIPANTS})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetConferenceInfoResponseDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_PARTICIPANTS = "participants";
- private List participants;
- private boolean participantsDefined = false;
-
- public GetConferenceInfoResponseDto() {}
-
- public GetConferenceInfoResponseDto participants(
- List participants) {
- this.participants = participants;
- this.participantsDefined = true;
- return this;
- }
-
- public GetConferenceInfoResponseDto addParticipantsItem(
- GetConferenceInfoResponseParticipantsInnerDto participantsItem) {
- if (this.participants == null) {
- this.participants = new ArrayList<>();
- }
- this.participantsDefined = true;
- this.participants.add(participantsItem);
- return this;
- }
-
- /**
- * Get participants
- *
- * @return participants
- */
- @JsonProperty(JSON_PROPERTY_PARTICIPANTS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getParticipants() {
- return participants;
- }
-
- @JsonIgnore
- public boolean getParticipantsDefined() {
- return participantsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_PARTICIPANTS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setParticipants(List participants) {
- this.participants = participants;
- this.participantsDefined = true;
- }
-
- /** Return true if this getConferenceInfoResponse object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetConferenceInfoResponseDto getConferenceInfoResponse = (GetConferenceInfoResponseDto) o;
- return Objects.equals(this.participants, getConferenceInfoResponse.participants);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(participants);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetConferenceInfoResponseDto {\n");
- sb.append(" participants: ").append(toIndentedString(participants)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetConferenceInfoResponseParticipantsInnerDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetConferenceInfoResponseParticipantsInnerDto.java
deleted file mode 100644
index ff2e1ac9f..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetConferenceInfoResponseParticipantsInnerDto.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** GetConferenceInfoResponseParticipantsInnerDto */
-@JsonPropertyOrder({
- GetConferenceInfoResponseParticipantsInnerDto.JSON_PROPERTY_CLI,
- GetConferenceInfoResponseParticipantsInnerDto.JSON_PROPERTY_ID,
- GetConferenceInfoResponseParticipantsInnerDto.JSON_PROPERTY_DURATION,
- GetConferenceInfoResponseParticipantsInnerDto.JSON_PROPERTY_MUTED,
- GetConferenceInfoResponseParticipantsInnerDto.JSON_PROPERTY_ONHOLD
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetConferenceInfoResponseParticipantsInnerDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_ID = "id";
- private String id;
- private boolean idDefined = false;
-
- public static final String JSON_PROPERTY_DURATION = "duration";
- private Integer duration;
- private boolean durationDefined = false;
-
- public static final String JSON_PROPERTY_MUTED = "muted";
- private Boolean muted;
- private boolean mutedDefined = false;
-
- public static final String JSON_PROPERTY_ONHOLD = "onhold";
- private Boolean onhold;
- private boolean onholdDefined = false;
-
- public GetConferenceInfoResponseParticipantsInnerDto() {}
-
- public GetConferenceInfoResponseParticipantsInnerDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * The phone number of the PSTN participant that was connected in the conference, or whatever was
- * passed as CLI for data originated/terminated calls.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public GetConferenceInfoResponseParticipantsInnerDto id(String id) {
- this.id = id;
- this.idDefined = true;
- return this;
- }
-
- /**
- * The callId of the call leg that the participant joined the conference.
- *
- * @return id
- */
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getId() {
- return id;
- }
-
- @JsonIgnore
- public boolean getIdDefined() {
- return idDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setId(String id) {
- this.id = id;
- this.idDefined = true;
- }
-
- public GetConferenceInfoResponseParticipantsInnerDto duration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- return this;
- }
-
- /**
- * The number of seconds that the participant has been connected to the conference.
- *
- * @return duration
- */
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getDuration() {
- return duration;
- }
-
- @JsonIgnore
- public boolean getDurationDefined() {
- return durationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDuration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- }
-
- public GetConferenceInfoResponseParticipantsInnerDto muted(Boolean muted) {
- this.muted = muted;
- this.mutedDefined = true;
- return this;
- }
-
- /**
- * Get muted
- *
- * @return muted
- */
- @JsonProperty(JSON_PROPERTY_MUTED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getMuted() {
- return muted;
- }
-
- @JsonIgnore
- public boolean getMutedDefined() {
- return mutedDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MUTED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMuted(Boolean muted) {
- this.muted = muted;
- this.mutedDefined = true;
- }
-
- public GetConferenceInfoResponseParticipantsInnerDto onhold(Boolean onhold) {
- this.onhold = onhold;
- this.onholdDefined = true;
- return this;
- }
-
- /**
- * Get onhold
- *
- * @return onhold
- */
- @JsonProperty(JSON_PROPERTY_ONHOLD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getOnhold() {
- return onhold;
- }
-
- @JsonIgnore
- public boolean getOnholdDefined() {
- return onholdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ONHOLD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setOnhold(Boolean onhold) {
- this.onhold = onhold;
- this.onholdDefined = true;
- }
-
- /** Return true if this getConferenceInfoResponse_participants_inner object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetConferenceInfoResponseParticipantsInnerDto getConferenceInfoResponseParticipantsInner =
- (GetConferenceInfoResponseParticipantsInnerDto) o;
- return Objects.equals(this.cli, getConferenceInfoResponseParticipantsInner.cli)
- && Objects.equals(this.id, getConferenceInfoResponseParticipantsInner.id)
- && Objects.equals(this.duration, getConferenceInfoResponseParticipantsInner.duration)
- && Objects.equals(this.muted, getConferenceInfoResponseParticipantsInner.muted)
- && Objects.equals(this.onhold, getConferenceInfoResponseParticipantsInner.onhold);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(cli, id, duration, muted, onhold);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetConferenceInfoResponseParticipantsInnerDto {\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
- sb.append(" muted: ").append(toIndentedString(muted)).append("\n");
- sb.append(" onhold: ").append(toIndentedString(onhold)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetNumbersResponseObjDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetNumbersResponseObjDto.java
deleted file mode 100644
index 3a31bfe52..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetNumbersResponseObjDto.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/** GetNumbersResponseObjDto */
-@JsonPropertyOrder({GetNumbersResponseObjDto.JSON_PROPERTY_NUMBERS})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetNumbersResponseObjDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_NUMBERS = "numbers";
- private List numbers;
- private boolean numbersDefined = false;
-
- public GetNumbersResponseObjDto() {}
-
- public GetNumbersResponseObjDto numbers(List numbers) {
- this.numbers = numbers;
- this.numbersDefined = true;
- return this;
- }
-
- public GetNumbersResponseObjDto addNumbersItem(GetNumbersResponseObjNumbersInnerDto numbersItem) {
- if (this.numbers == null) {
- this.numbers = new ArrayList<>();
- }
- this.numbersDefined = true;
- this.numbers.add(numbersItem);
- return this;
- }
-
- /**
- * The object type. Will always be list of numbers, associated application keys and capabilities
- *
- * @return numbers
- */
- @JsonProperty(JSON_PROPERTY_NUMBERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getNumbers() {
- return numbers;
- }
-
- @JsonIgnore
- public boolean getNumbersDefined() {
- return numbersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NUMBERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNumbers(List numbers) {
- this.numbers = numbers;
- this.numbersDefined = true;
- }
-
- /** Return true if this getNumbersResponseObj object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetNumbersResponseObjDto getNumbersResponseObj = (GetNumbersResponseObjDto) o;
- return Objects.equals(this.numbers, getNumbersResponseObj.numbers);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(numbers);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetNumbersResponseObjDto {\n");
- sb.append(" numbers: ").append(toIndentedString(numbers)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetNumbersResponseObjNumbersInnerDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetNumbersResponseObjNumbersInnerDto.java
deleted file mode 100644
index e8f0a393a..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetNumbersResponseObjNumbersInnerDto.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** GetNumbersResponseObjNumbersInnerDto */
-@JsonPropertyOrder({
- GetNumbersResponseObjNumbersInnerDto.JSON_PROPERTY_NUMBER,
- GetNumbersResponseObjNumbersInnerDto.JSON_PROPERTY_APPLICATIONKEY,
- GetNumbersResponseObjNumbersInnerDto.JSON_PROPERTY_CAPABILITY
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetNumbersResponseObjNumbersInnerDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_NUMBER = "number";
- private String number;
- private boolean numberDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATIONKEY = "applicationkey";
- private String applicationkey;
- private boolean applicationkeyDefined = false;
-
- /**
- * indicates the DID capability that needs to be assigned to the chosen application. Valid values
- * are 'voice' and 'sms'. Please note that the DID needs to support the selected
- * capability.
- */
- public enum CapabilityEnum {
- VOICE("voice"),
-
- SMS("sms"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- CapabilityEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static CapabilityEnum fromValue(String value) {
- for (CapabilityEnum b : CapabilityEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_CAPABILITY = "capability";
- private String capability;
- private boolean capabilityDefined = false;
-
- public GetNumbersResponseObjNumbersInnerDto() {}
-
- public GetNumbersResponseObjNumbersInnerDto number(String number) {
- this.number = number;
- this.numberDefined = true;
- return this;
- }
-
- /**
- * Numbers that you own in E.164 format.
- *
- * @return number
- */
- @JsonProperty(JSON_PROPERTY_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getNumber() {
- return number;
- }
-
- @JsonIgnore
- public boolean getNumberDefined() {
- return numberDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNumber(String number) {
- this.number = number;
- this.numberDefined = true;
- }
-
- public GetNumbersResponseObjNumbersInnerDto applicationkey(String applicationkey) {
- this.applicationkey = applicationkey;
- this.applicationkeyDefined = true;
- return this;
- }
-
- /**
- * Indicates the application where the number(s) will be assigned. If no number is assigned the
- * applicationkey will not be returned.
- *
- * @return applicationkey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationkey() {
- return applicationkey;
- }
-
- @JsonIgnore
- public boolean getApplicationkeyDefined() {
- return applicationkeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationkey(String applicationkey) {
- this.applicationkey = applicationkey;
- this.applicationkeyDefined = true;
- }
-
- public GetNumbersResponseObjNumbersInnerDto capability(String capability) {
- this.capability = capability;
- this.capabilityDefined = true;
- return this;
- }
-
- /**
- * indicates the DID capability that needs to be assigned to the chosen application. Valid values
- * are 'voice' and 'sms'. Please note that the DID needs to support the selected
- * capability.
- *
- * @return capability
- */
- @JsonProperty(JSON_PROPERTY_CAPABILITY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCapability() {
- return capability;
- }
-
- @JsonIgnore
- public boolean getCapabilityDefined() {
- return capabilityDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CAPABILITY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCapability(String capability) {
- this.capability = capability;
- this.capabilityDefined = true;
- }
-
- /** Return true if this getNumbersResponseObj_numbers_inner object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetNumbersResponseObjNumbersInnerDto getNumbersResponseObjNumbersInner =
- (GetNumbersResponseObjNumbersInnerDto) o;
- return Objects.equals(this.number, getNumbersResponseObjNumbersInner.number)
- && Objects.equals(this.applicationkey, getNumbersResponseObjNumbersInner.applicationkey)
- && Objects.equals(this.capability, getNumbersResponseObjNumbersInner.capability);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(number, applicationkey, capability);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetNumbersResponseObjNumbersInnerDto {\n");
- sb.append(" number: ").append(toIndentedString(number)).append("\n");
- sb.append(" applicationkey: ").append(toIndentedString(applicationkey)).append("\n");
- sb.append(" capability: ").append(toIndentedString(capability)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetQueryNumberNumberDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetQueryNumberNumberDto.java
deleted file mode 100644
index a80ef63b6..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetQueryNumberNumberDto.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** The number item object. */
-@JsonPropertyOrder({
- GetQueryNumberNumberDto.JSON_PROPERTY_COUNTRY_ID,
- GetQueryNumberNumberDto.JSON_PROPERTY_NUMBER_TYPE,
- GetQueryNumberNumberDto.JSON_PROPERTY_NORMALIZED_NUMBER,
- GetQueryNumberNumberDto.JSON_PROPERTY_RESTRICTED,
- GetQueryNumberNumberDto.JSON_PROPERTY_RATE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetQueryNumberNumberDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_COUNTRY_ID = "countryId";
- private String countryId;
- private boolean countryIdDefined = false;
-
- /** The type of the number. */
- public enum NumberTypeEnum {
- UNKNOWN("Unknown"),
-
- FIXED("Fixed"),
-
- MOBILE("Mobile"),
-
- OTHER("Other"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NumberTypeEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NumberTypeEnum fromValue(String value) {
- for (NumberTypeEnum b : NumberTypeEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NUMBER_TYPE = "numberType";
- private String numberType;
- private boolean numberTypeDefined = false;
-
- public static final String JSON_PROPERTY_NORMALIZED_NUMBER = "normalizedNumber";
- private String normalizedNumber;
- private boolean normalizedNumberDefined = false;
-
- public static final String JSON_PROPERTY_RESTRICTED = "restricted";
- private Boolean restricted;
- private boolean restrictedDefined = false;
-
- public static final String JSON_PROPERTY_RATE = "rate";
- private PriceDto rate;
- private boolean rateDefined = false;
-
- public GetQueryNumberNumberDto() {}
-
- public GetQueryNumberNumberDto countryId(String countryId) {
- this.countryId = countryId;
- this.countryIdDefined = true;
- return this;
- }
-
- /**
- * The ISO 3166-1 formatted country code.
- *
- * @return countryId
- */
- @JsonProperty(JSON_PROPERTY_COUNTRY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCountryId() {
- return countryId;
- }
-
- @JsonIgnore
- public boolean getCountryIdDefined() {
- return countryIdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_COUNTRY_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCountryId(String countryId) {
- this.countryId = countryId;
- this.countryIdDefined = true;
- }
-
- public GetQueryNumberNumberDto numberType(String numberType) {
- this.numberType = numberType;
- this.numberTypeDefined = true;
- return this;
- }
-
- /**
- * The type of the number.
- *
- * @return numberType
- */
- @JsonProperty(JSON_PROPERTY_NUMBER_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getNumberType() {
- return numberType;
- }
-
- @JsonIgnore
- public boolean getNumberTypeDefined() {
- return numberTypeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NUMBER_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNumberType(String numberType) {
- this.numberType = numberType;
- this.numberTypeDefined = true;
- }
-
- public GetQueryNumberNumberDto normalizedNumber(String normalizedNumber) {
- this.normalizedNumber = normalizedNumber;
- this.normalizedNumberDefined = true;
- return this;
- }
-
- /**
- * The number in E.164 format.
- *
- * @return normalizedNumber
- */
- @JsonProperty(JSON_PROPERTY_NORMALIZED_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getNormalizedNumber() {
- return normalizedNumber;
- }
-
- @JsonIgnore
- public boolean getNormalizedNumberDefined() {
- return normalizedNumberDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NORMALIZED_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNormalizedNumber(String normalizedNumber) {
- this.normalizedNumber = normalizedNumber;
- this.normalizedNumberDefined = true;
- }
-
- public GetQueryNumberNumberDto restricted(Boolean restricted) {
- this.restricted = restricted;
- this.restrictedDefined = true;
- return this;
- }
-
- /**
- * Concerns whether the call is restricted or not.
- *
- * @return restricted
- */
- @JsonProperty(JSON_PROPERTY_RESTRICTED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getRestricted() {
- return restricted;
- }
-
- @JsonIgnore
- public boolean getRestrictedDefined() {
- return restrictedDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_RESTRICTED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setRestricted(Boolean restricted) {
- this.restricted = restricted;
- this.restrictedDefined = true;
- }
-
- public GetQueryNumberNumberDto rate(PriceDto rate) {
- this.rate = rate;
- this.rateDefined = true;
- return this;
- }
-
- /**
- * Get rate
- *
- * @return rate
- */
- @JsonProperty(JSON_PROPERTY_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PriceDto getRate() {
- return rate;
- }
-
- @JsonIgnore
- public boolean getRateDefined() {
- return rateDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setRate(PriceDto rate) {
- this.rate = rate;
- this.rateDefined = true;
- }
-
- /** Return true if this getQueryNumber_number object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetQueryNumberNumberDto getQueryNumberNumber = (GetQueryNumberNumberDto) o;
- return Objects.equals(this.countryId, getQueryNumberNumber.countryId)
- && Objects.equals(this.numberType, getQueryNumberNumber.numberType)
- && Objects.equals(this.normalizedNumber, getQueryNumberNumber.normalizedNumber)
- && Objects.equals(this.restricted, getQueryNumberNumber.restricted)
- && Objects.equals(this.rate, getQueryNumberNumber.rate);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(countryId, numberType, normalizedNumber, restricted, rate);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetQueryNumberNumberDto {\n");
- sb.append(" countryId: ").append(toIndentedString(countryId)).append("\n");
- sb.append(" numberType: ").append(toIndentedString(numberType)).append("\n");
- sb.append(" normalizedNumber: ").append(toIndentedString(normalizedNumber)).append("\n");
- sb.append(" restricted: ").append(toIndentedString(restricted)).append("\n");
- sb.append(" rate: ").append(toIndentedString(rate)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetRecordingFileInfoDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetRecordingFileInfoDto.java
deleted file mode 100644
index b7cdd776f..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/GetRecordingFileInfoDto.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** GetRecordingFileInfoDto */
-@JsonPropertyOrder({
- GetRecordingFileInfoDto.JSON_PROPERTY_KEY,
- GetRecordingFileInfoDto.JSON_PROPERTY_URL,
- GetRecordingFileInfoDto.JSON_PROPERTY_CREATED_ON,
- GetRecordingFileInfoDto.JSON_PROPERTY_EXPIRES_ON,
- GetRecordingFileInfoDto.JSON_PROPERTY_HEADERS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class GetRecordingFileInfoDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_KEY = "key";
- private String key;
- private boolean keyDefined = false;
-
- public static final String JSON_PROPERTY_URL = "url";
- private String url;
- private boolean urlDefined = false;
-
- public static final String JSON_PROPERTY_CREATED_ON = "createdOn";
- private String createdOn;
- private boolean createdOnDefined = false;
-
- public static final String JSON_PROPERTY_EXPIRES_ON = "expiresOn";
- private String expiresOn;
- private boolean expiresOnDefined = false;
-
- public static final String JSON_PROPERTY_HEADERS = "headers";
- private Object headers;
- private boolean headersDefined = false;
-
- public GetRecordingFileInfoDto() {}
-
- public GetRecordingFileInfoDto key(String key) {
- this.key = key;
- this.keyDefined = true;
- return this;
- }
-
- /**
- * Get key
- *
- * @return key
- */
- @JsonProperty(JSON_PROPERTY_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getKey() {
- return key;
- }
-
- @JsonIgnore
- public boolean getKeyDefined() {
- return keyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setKey(String key) {
- this.key = key;
- this.keyDefined = true;
- }
-
- public GetRecordingFileInfoDto url(String url) {
- this.url = url;
- this.urlDefined = true;
- return this;
- }
-
- /**
- * Get url
- *
- * @return url
- */
- @JsonProperty(JSON_PROPERTY_URL)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getUrl() {
- return url;
- }
-
- @JsonIgnore
- public boolean getUrlDefined() {
- return urlDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_URL)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUrl(String url) {
- this.url = url;
- this.urlDefined = true;
- }
-
- public GetRecordingFileInfoDto createdOn(String createdOn) {
- this.createdOn = createdOn;
- this.createdOnDefined = true;
- return this;
- }
-
- /**
- * Get createdOn
- *
- * @return createdOn
- */
- @JsonProperty(JSON_PROPERTY_CREATED_ON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCreatedOn() {
- return createdOn;
- }
-
- @JsonIgnore
- public boolean getCreatedOnDefined() {
- return createdOnDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CREATED_ON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCreatedOn(String createdOn) {
- this.createdOn = createdOn;
- this.createdOnDefined = true;
- }
-
- public GetRecordingFileInfoDto expiresOn(String expiresOn) {
- this.expiresOn = expiresOn;
- this.expiresOnDefined = true;
- return this;
- }
-
- /**
- * Get expiresOn
- *
- * @return expiresOn
- */
- @JsonProperty(JSON_PROPERTY_EXPIRES_ON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getExpiresOn() {
- return expiresOn;
- }
-
- @JsonIgnore
- public boolean getExpiresOnDefined() {
- return expiresOnDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EXPIRES_ON)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setExpiresOn(String expiresOn) {
- this.expiresOn = expiresOn;
- this.expiresOnDefined = true;
- }
-
- public GetRecordingFileInfoDto headers(Object headers) {
- this.headers = headers;
- this.headersDefined = true;
- return this;
- }
-
- /**
- * Get headers
- *
- * @return headers
- */
- @JsonProperty(JSON_PROPERTY_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Object getHeaders() {
- return headers;
- }
-
- @JsonIgnore
- public boolean getHeadersDefined() {
- return headersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setHeaders(Object headers) {
- this.headers = headers;
- this.headersDefined = true;
- }
-
- /** Return true if this getRecordingFileInfo object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- GetRecordingFileInfoDto getRecordingFileInfo = (GetRecordingFileInfoDto) o;
- return Objects.equals(this.key, getRecordingFileInfo.key)
- && Objects.equals(this.url, getRecordingFileInfo.url)
- && Objects.equals(this.createdOn, getRecordingFileInfo.createdOn)
- && Objects.equals(this.expiresOn, getRecordingFileInfo.expiresOn)
- && Objects.equals(this.headers, getRecordingFileInfo.headers);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(key, url, createdOn, expiresOn, headers);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class GetRecordingFileInfoDto {\n");
- sb.append(" key: ").append(toIndentedString(key)).append("\n");
- sb.append(" url: ").append(toIndentedString(url)).append("\n");
- sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n");
- sb.append(" expiresOn: ").append(toIndentedString(expiresOn)).append("\n");
- sb.append(" headers: ").append(toIndentedString(headers)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/IceRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/IceRequestDto.java
deleted file mode 100644
index 256220d78..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/IceRequestDto.java
+++ /dev/null
@@ -1,635 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonValue;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.time.OffsetDateTime;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/** The request body of an Incoming Call Event. */
-@JsonPropertyOrder({
- IceRequestDto.JSON_PROPERTY_EVENT,
- IceRequestDto.JSON_PROPERTY_TIMESTAMP,
- IceRequestDto.JSON_PROPERTY_CUSTOM,
- IceRequestDto.JSON_PROPERTY_APPLICATION_KEY,
- IceRequestDto.JSON_PROPERTY_CALL_RESOURCE_URL,
- IceRequestDto.JSON_PROPERTY_USER_RATE,
- IceRequestDto.JSON_PROPERTY_CLI,
- IceRequestDto.JSON_PROPERTY_TO,
- IceRequestDto.JSON_PROPERTY_DOMAIN,
- IceRequestDto.JSON_PROPERTY_ORIGINATION_TYPE,
- IceRequestDto.JSON_PROPERTY_DURATION,
- IceRequestDto.JSON_PROPERTY_RDNIS,
- IceRequestDto.JSON_PROPERTY_CALL_HEADERS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-
-/*@JsonIgnoreProperties(
- value = "event", // ignore manually set event, it will be automatically generated by Jackson during serialization
- allowSetters = true // allows the event to be set during deserialization
-)*/
-@JsonTypeInfo(
- use = JsonTypeInfo.Id.NONE,
- include = JsonTypeInfo.As.EXISTING_PROPERTY,
- property = "event",
- visible = true)
-public class IceRequestDto extends WebhooksEventRequestDto {
- private static final long serialVersionUID = 1L;
-
- /** Must have the value `ice`. */
- public enum EventEnum {
- ICE("ice"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- EventEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static EventEnum fromValue(String value) {
- for (EventEnum b : EventEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_EVENT = "event";
- private String event;
- private boolean eventDefined = false;
-
- public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
- private OffsetDateTime timestamp;
- private boolean timestampDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATION_KEY = "applicationKey";
- private String applicationKey;
- private boolean applicationKeyDefined = false;
-
- public static final String JSON_PROPERTY_CALL_RESOURCE_URL = "callResourceUrl";
- private String callResourceUrl;
- private boolean callResourceUrlDefined = false;
-
- public static final String JSON_PROPERTY_USER_RATE = "userRate";
- private PriceDto userRate;
- private boolean userRateDefined = false;
-
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_TO = "to";
- private DestinationDto to;
- private boolean toDefined = false;
-
- public static final String JSON_PROPERTY_DOMAIN = "domain";
- private DomainDto domain;
- private boolean domainDefined = false;
-
- public static final String JSON_PROPERTY_ORIGINATION_TYPE = "originationType";
- private DomainDto originationType;
- private boolean originationTypeDefined = false;
-
- public static final String JSON_PROPERTY_DURATION = "duration";
- private Integer duration;
- private boolean durationDefined = false;
-
- public static final String JSON_PROPERTY_RDNIS = "rdnis";
- private String rdnis;
- private boolean rdnisDefined = false;
-
- public static final String JSON_PROPERTY_CALL_HEADERS = "callHeaders";
- private List callHeaders;
- private boolean callHeadersDefined = false;
-
- public IceRequestDto() {}
-
- public IceRequestDto event(String event) {
- this.event = event;
- this.eventDefined = true;
- return this;
- }
-
- /**
- * Must have the value `ice`.
- *
- * @return event
- */
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getEvent() {
- return event;
- }
-
- @JsonIgnore
- public boolean getEventDefined() {
- return eventDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setEvent(String event) {
- this.event = event;
- this.eventDefined = true;
- }
-
- public IceRequestDto timestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- return this;
- }
-
- /**
- * The timestamp in UTC format.
- *
- * @return timestamp
- */
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public OffsetDateTime getTimestamp() {
- return timestamp;
- }
-
- @JsonIgnore
- public boolean getTimestampDefined() {
- return timestampDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- }
-
- public IceRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * A string that can be used to pass custom information related to the call.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public IceRequestDto applicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- return this;
- }
-
- /**
- * The unique application key. You can find it in the Sinch
- * [dashboard](https://dashboard.sinch.com/voice/apps).
- *
- * @return applicationKey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationKey() {
- return applicationKey;
- }
-
- @JsonIgnore
- public boolean getApplicationKeyDefined() {
- return applicationKeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- }
-
- public IceRequestDto callResourceUrl(String callResourceUrl) {
- this.callResourceUrl = callResourceUrl;
- this.callResourceUrlDefined = true;
- return this;
- }
-
- /**
- * The path of the API resource.
- *
- * @return callResourceUrl
- */
- @JsonProperty(JSON_PROPERTY_CALL_RESOURCE_URL)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCallResourceUrl() {
- return callResourceUrl;
- }
-
- @JsonIgnore
- public boolean getCallResourceUrlDefined() {
- return callResourceUrlDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALL_RESOURCE_URL)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallResourceUrl(String callResourceUrl) {
- this.callResourceUrl = callResourceUrl;
- this.callResourceUrlDefined = true;
- }
-
- public IceRequestDto userRate(PriceDto userRate) {
- this.userRate = userRate;
- this.userRateDefined = true;
- return this;
- }
-
- /**
- * Get userRate
- *
- * @return userRate
- */
- @JsonProperty(JSON_PROPERTY_USER_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PriceDto getUserRate() {
- return userRate;
- }
-
- @JsonIgnore
- public boolean getUserRateDefined() {
- return userRateDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_USER_RATE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUserRate(PriceDto userRate) {
- this.userRate = userRate;
- this.userRateDefined = true;
- }
-
- public IceRequestDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * The number that will be displayed to the recipient of the call. To set your own CLI, you may
- * use your verified number or your Dashboard virtual number and add it to the
- * `connectPSTN` SVAML response to the Incoming Call Event request. It must be in
- * [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public IceRequestDto to(DestinationDto to) {
- this.to = to;
- this.toDefined = true;
- return this;
- }
-
- /**
- * Get to
- *
- * @return to
- */
- @JsonProperty(JSON_PROPERTY_TO)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DestinationDto getTo() {
- return to;
- }
-
- @JsonIgnore
- public boolean getToDefined() {
- return toDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TO)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTo(DestinationDto to) {
- this.to = to;
- this.toDefined = true;
- }
-
- public IceRequestDto domain(DomainDto domain) {
- this.domain = domain;
- this.domainDefined = true;
- return this;
- }
-
- /**
- * Get domain
- *
- * @return domain
- */
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DomainDto getDomain() {
- return domain;
- }
-
- @JsonIgnore
- public boolean getDomainDefined() {
- return domainDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDomain(DomainDto domain) {
- this.domain = domain;
- this.domainDefined = true;
- }
-
- public IceRequestDto originationType(DomainDto originationType) {
- this.originationType = originationType;
- this.originationTypeDefined = true;
- return this;
- }
-
- /**
- * Get originationType
- *
- * @return originationType
- */
- @JsonProperty(JSON_PROPERTY_ORIGINATION_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DomainDto getOriginationType() {
- return originationType;
- }
-
- @JsonIgnore
- public boolean getOriginationTypeDefined() {
- return originationTypeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ORIGINATION_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setOriginationType(DomainDto originationType) {
- this.originationType = originationType;
- this.originationTypeDefined = true;
- }
-
- public IceRequestDto duration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- return this;
- }
-
- /**
- * The duration of the call in seconds.
- *
- * @return duration
- */
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getDuration() {
- return duration;
- }
-
- @JsonIgnore
- public boolean getDurationDefined() {
- return durationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDuration(Integer duration) {
- this.duration = duration;
- this.durationDefined = true;
- }
-
- public IceRequestDto rdnis(String rdnis) {
- this.rdnis = rdnis;
- this.rdnisDefined = true;
- return this;
- }
-
- /**
- * The redirected dialled number identification service.
- *
- * @return rdnis
- */
- @JsonProperty(JSON_PROPERTY_RDNIS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getRdnis() {
- return rdnis;
- }
-
- @JsonIgnore
- public boolean getRdnisDefined() {
- return rdnisDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_RDNIS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setRdnis(String rdnis) {
- this.rdnis = rdnis;
- this.rdnisDefined = true;
- }
-
- public IceRequestDto callHeaders(List callHeaders) {
- this.callHeaders = callHeaders;
- this.callHeadersDefined = true;
- return this;
- }
-
- public IceRequestDto addCallHeadersItem(CallHeaderDto callHeadersItem) {
- if (this.callHeaders == null) {
- this.callHeaders = new ArrayList<>();
- }
- this.callHeadersDefined = true;
- this.callHeaders.add(callHeadersItem);
- return this;
- }
-
- /**
- * If the call is initiated by a Sinch SDK client, call headers are the headers specified by the
- * *caller* client. Read more about call headers [here](../../../call-headers).
- *
- * @return callHeaders
- */
- @JsonProperty(JSON_PROPERTY_CALL_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getCallHeaders() {
- return callHeaders;
- }
-
- @JsonIgnore
- public boolean getCallHeadersDefined() {
- return callHeadersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALL_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallHeaders(List callHeaders) {
- this.callHeaders = callHeaders;
- this.callHeadersDefined = true;
- }
-
- @Override
- public IceRequestDto callid(String callid) {
- this.setCallid(callid);
- return this;
- }
-
- @Override
- public IceRequestDto version(Integer version) {
- this.setVersion(version);
- return this;
- }
-
- /** Return true if this iceRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- IceRequestDto iceRequest = (IceRequestDto) o;
- return Objects.equals(this.event, iceRequest.event)
- && Objects.equals(this.timestamp, iceRequest.timestamp)
- && Objects.equals(this.custom, iceRequest.custom)
- && Objects.equals(this.applicationKey, iceRequest.applicationKey)
- && Objects.equals(this.callResourceUrl, iceRequest.callResourceUrl)
- && Objects.equals(this.userRate, iceRequest.userRate)
- && Objects.equals(this.cli, iceRequest.cli)
- && Objects.equals(this.to, iceRequest.to)
- && Objects.equals(this.domain, iceRequest.domain)
- && Objects.equals(this.originationType, iceRequest.originationType)
- && Objects.equals(this.duration, iceRequest.duration)
- && Objects.equals(this.rdnis, iceRequest.rdnis)
- && Objects.equals(this.callHeaders, iceRequest.callHeaders)
- && super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- event,
- timestamp,
- custom,
- applicationKey,
- callResourceUrl,
- userRate,
- cli,
- to,
- domain,
- originationType,
- duration,
- rdnis,
- callHeaders,
- super.hashCode());
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class IceRequestDto {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" event: ").append(toIndentedString(event)).append("\n");
- sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n");
- sb.append(" callResourceUrl: ").append(toIndentedString(callResourceUrl)).append("\n");
- sb.append(" userRate: ").append(toIndentedString(userRate)).append("\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" to: ").append(toIndentedString(to)).append("\n");
- sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
- sb.append(" originationType: ").append(toIndentedString(originationType)).append("\n");
- sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
- sb.append(" rdnis: ").append(toIndentedString(rdnis)).append("\n");
- sb.append(" callHeaders: ").append(toIndentedString(callHeaders)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
- static {
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("iceRequest", IceRequestDto.class);
- JSONNavigator.registerDiscriminator(IceRequestDto.class, "event", mappings);
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ManageConferenceParticipantRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ManageConferenceParticipantRequestDto.java
deleted file mode 100644
index dc6144191..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/ManageConferenceParticipantRequestDto.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** */
-@JsonPropertyOrder({
- ManageConferenceParticipantRequestDto.JSON_PROPERTY_COMMAND,
- ManageConferenceParticipantRequestDto.JSON_PROPERTY_MOH
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class ManageConferenceParticipantRequestDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_COMMAND = "command";
- private String command;
- private boolean commandDefined = false;
-
- public static final String JSON_PROPERTY_MOH = "moh";
- private String moh;
- private boolean mohDefined = false;
-
- public ManageConferenceParticipantRequestDto() {}
-
- public ManageConferenceParticipantRequestDto command(String command) {
- this.command = command;
- this.commandDefined = true;
- return this;
- }
-
- /**
- * Action to apply on conference participant.
- *
- * @return command
- */
- @JsonProperty(JSON_PROPERTY_COMMAND)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getCommand() {
- return command;
- }
-
- @JsonIgnore
- public boolean getCommandDefined() {
- return commandDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_COMMAND)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setCommand(String command) {
- this.command = command;
- this.commandDefined = true;
- }
-
- public ManageConferenceParticipantRequestDto moh(String moh) {
- this.moh = moh;
- this.mohDefined = true;
- return this;
- }
-
- /**
- * Means \"music on hold\". If this optional parameter is included, plays music to the
- * first participant in a conference while they're alone and waiting for other participants to
- * join. If `moh` isn't specified, the user will only hear silence while alone in
- * the conference. This property is only available to use with the `onhold` command.
- *
- * @return moh
- */
- @JsonProperty(JSON_PROPERTY_MOH)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMoh() {
- return moh;
- }
-
- @JsonIgnore
- public boolean getMohDefined() {
- return mohDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MOH)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMoh(String moh) {
- this.moh = moh;
- this.mohDefined = true;
- }
-
- /** Return true if this manageConferenceParticipantRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- ManageConferenceParticipantRequestDto manageConferenceParticipantRequest =
- (ManageConferenceParticipantRequestDto) o;
- return Objects.equals(this.command, manageConferenceParticipantRequest.command)
- && Objects.equals(this.moh, manageConferenceParticipantRequest.moh);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(command, moh);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class ManageConferenceParticipantRequestDto {\n");
- sb.append(" command: ").append(toIndentedString(command)).append("\n");
- sb.append(" moh: ").append(toIndentedString(moh)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/MenuDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/MenuDto.java
deleted file mode 100644
index 137c70a5e..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/MenuDto.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/** An IVR menu that contains an audio prompt as well as configured options. */
-@JsonPropertyOrder({
- MenuDto.JSON_PROPERTY_ID,
- MenuDto.JSON_PROPERTY_MAIN_PROMPT,
- MenuDto.JSON_PROPERTY_REPEAT_PROMPT,
- MenuDto.JSON_PROPERTY_REPEATS,
- MenuDto.JSON_PROPERTY_MAX_DIGITS,
- MenuDto.JSON_PROPERTY_TIMEOUT_MILLS,
- MenuDto.JSON_PROPERTY_MAX_TIMEOUT_MILLS,
- MenuDto.JSON_PROPERTY_OPTIONS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class MenuDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_ID = "id";
- private String id;
- private boolean idDefined = false;
-
- public static final String JSON_PROPERTY_MAIN_PROMPT = "mainPrompt";
- private String mainPrompt;
- private boolean mainPromptDefined = false;
-
- public static final String JSON_PROPERTY_REPEAT_PROMPT = "repeatPrompt";
- private String repeatPrompt;
- private boolean repeatPromptDefined = false;
-
- public static final String JSON_PROPERTY_REPEATS = "repeats";
- private Integer repeats;
- private boolean repeatsDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DIGITS = "maxDigits";
- private Integer maxDigits;
- private boolean maxDigitsDefined = false;
-
- public static final String JSON_PROPERTY_TIMEOUT_MILLS = "timeoutMills";
- private Integer timeoutMills;
- private boolean timeoutMillsDefined = false;
-
- public static final String JSON_PROPERTY_MAX_TIMEOUT_MILLS = "maxTimeoutMills";
- private Integer maxTimeoutMills;
- private boolean maxTimeoutMillsDefined = false;
-
- public static final String JSON_PROPERTY_OPTIONS = "options";
- private List options;
- private boolean optionsDefined = false;
-
- public MenuDto() {}
-
- public MenuDto id(String id) {
- this.id = id;
- this.idDefined = true;
- return this;
- }
-
- /**
- * The identifier of a menu. One menu must have the ID value of `main`.
- *
- * @return id
- */
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getId() {
- return id;
- }
-
- @JsonIgnore
- public boolean getIdDefined() {
- return idDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setId(String id) {
- this.id = id;
- this.idDefined = true;
- }
-
- public MenuDto mainPrompt(String mainPrompt) {
- this.mainPrompt = mainPrompt;
- this.mainPromptDefined = true;
- return this;
- }
-
- /**
- * The main voice prompt that the user hears when the menu starts the first time. You can use
- * text-to-speech using the `#tts[]` element, SSML commands using the
- * `#ssml[]` element, pre-recorded messages, or URL references to external media
- * resources. You can use multiple prompts by separating each prompt with a semi-colon
- * (`;`). If multiple prompts are used, they will be played in the order they are
- * specified, without any pauses between playback. For external media resources, you can use an
- * `#href[...]` or directly specify the full URL. Check the [Supported audio
- * formats](/docs/voice/api-reference/supported-audio-formats) section for more information.
- *
- * @return mainPrompt
- */
- @JsonProperty(JSON_PROPERTY_MAIN_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMainPrompt() {
- return mainPrompt;
- }
-
- @JsonIgnore
- public boolean getMainPromptDefined() {
- return mainPromptDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAIN_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMainPrompt(String mainPrompt) {
- this.mainPrompt = mainPrompt;
- this.mainPromptDefined = true;
- }
-
- public MenuDto repeatPrompt(String repeatPrompt) {
- this.repeatPrompt = repeatPrompt;
- this.repeatPromptDefined = true;
- return this;
- }
-
- /**
- * The prompt that will be played if valid or expected DTMF digits are not entered. You can use
- * text-to-speech using the `#tts[]` element, SSML commands using the
- * `#ssml[]` element, pre-recorded messages, or URL references to external media
- * resources. You can use multiple prompts by separating each prompt with a semi-colon
- * (`;`). If multiple prompts are used, they will be played in the order they are
- * specified, without any pauses between playback. For external media resources, you can use an
- * `#href[...]` or directly specify the full URL. Check the [Supported audio
- * formats](/docs/voice/api-reference/supported-audio-formats) section for more information.
- *
- * @return repeatPrompt
- */
- @JsonProperty(JSON_PROPERTY_REPEAT_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getRepeatPrompt() {
- return repeatPrompt;
- }
-
- @JsonIgnore
- public boolean getRepeatPromptDefined() {
- return repeatPromptDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_REPEAT_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setRepeatPrompt(String repeatPrompt) {
- this.repeatPrompt = repeatPrompt;
- this.repeatPromptDefined = true;
- }
-
- public MenuDto repeats(Integer repeats) {
- this.repeats = repeats;
- this.repeatsDefined = true;
- return this;
- }
-
- /**
- * The number of times that the `repeatPrompt` is played.
- *
- * @return repeats
- */
- @JsonProperty(JSON_PROPERTY_REPEATS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getRepeats() {
- return repeats;
- }
-
- @JsonIgnore
- public boolean getRepeatsDefined() {
- return repeatsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_REPEATS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setRepeats(Integer repeats) {
- this.repeats = repeats;
- this.repeatsDefined = true;
- }
-
- public MenuDto maxDigits(Integer maxDigits) {
- this.maxDigits = maxDigits;
- this.maxDigitsDefined = true;
- return this;
- }
-
- /**
- * The maximum number of digits expected for a user to enter. Once these digits are collected, a
- * [Prompt Input Event (PIE)](../../voice/tag/Callbacks/#tag/Callbacks/operation/pie) is triggered
- * containing these digits.
- *
- * @return maxDigits
- */
- @JsonProperty(JSON_PROPERTY_MAX_DIGITS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDigits() {
- return maxDigits;
- }
-
- @JsonIgnore
- public boolean getMaxDigitsDefined() {
- return maxDigitsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DIGITS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDigits(Integer maxDigits) {
- this.maxDigits = maxDigits;
- this.maxDigitsDefined = true;
- }
-
- public MenuDto timeoutMills(Integer timeoutMills) {
- this.timeoutMills = timeoutMills;
- this.timeoutMillsDefined = true;
- return this;
- }
-
- /**
- * Determines silence for the purposes of collecting a DTMF or voice response in milliseconds. If
- * the timeout is reached, the response is considered completed and will be submitted.
- *
- * @return timeoutMills
- */
- @JsonProperty(JSON_PROPERTY_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getTimeoutMills() {
- return timeoutMills;
- }
-
- @JsonIgnore
- public boolean getTimeoutMillsDefined() {
- return timeoutMillsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimeoutMills(Integer timeoutMills) {
- this.timeoutMills = timeoutMills;
- this.timeoutMillsDefined = true;
- }
-
- public MenuDto maxTimeoutMills(Integer maxTimeoutMills) {
- this.maxTimeoutMills = maxTimeoutMills;
- this.maxTimeoutMillsDefined = true;
- return this;
- }
-
- /**
- * Sets a limit for the maximum amount of time allowed to collect voice input.
- *
- * @return maxTimeoutMills
- */
- @JsonProperty(JSON_PROPERTY_MAX_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxTimeoutMills() {
- return maxTimeoutMills;
- }
-
- @JsonIgnore
- public boolean getMaxTimeoutMillsDefined() {
- return maxTimeoutMillsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxTimeoutMills(Integer maxTimeoutMills) {
- this.maxTimeoutMills = maxTimeoutMills;
- this.maxTimeoutMillsDefined = true;
- }
-
- public MenuDto options(List options) {
- this.options = options;
- this.optionsDefined = true;
- return this;
- }
-
- public MenuDto addOptionsItem(OptionDto optionsItem) {
- if (this.options == null) {
- this.options = new ArrayList<>();
- }
- this.optionsDefined = true;
- this.options.add(optionsItem);
- return this;
- }
-
- /**
- * The set of options available in the menu.
- *
- * @return options
- */
- @JsonProperty(JSON_PROPERTY_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getOptions() {
- return options;
- }
-
- @JsonIgnore
- public boolean getOptionsDefined() {
- return optionsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setOptions(List options) {
- this.options = options;
- this.optionsDefined = true;
- }
-
- /** Return true if this menu object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- MenuDto menu = (MenuDto) o;
- return Objects.equals(this.id, menu.id)
- && Objects.equals(this.mainPrompt, menu.mainPrompt)
- && Objects.equals(this.repeatPrompt, menu.repeatPrompt)
- && Objects.equals(this.repeats, menu.repeats)
- && Objects.equals(this.maxDigits, menu.maxDigits)
- && Objects.equals(this.timeoutMills, menu.timeoutMills)
- && Objects.equals(this.maxTimeoutMills, menu.maxTimeoutMills)
- && Objects.equals(this.options, menu.options);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- id, mainPrompt, repeatPrompt, repeats, maxDigits, timeoutMills, maxTimeoutMills, options);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class MenuDto {\n");
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" mainPrompt: ").append(toIndentedString(mainPrompt)).append("\n");
- sb.append(" repeatPrompt: ").append(toIndentedString(repeatPrompt)).append("\n");
- sb.append(" repeats: ").append(toIndentedString(repeats)).append("\n");
- sb.append(" maxDigits: ").append(toIndentedString(maxDigits)).append("\n");
- sb.append(" timeoutMills: ").append(toIndentedString(timeoutMills)).append("\n");
- sb.append(" maxTimeoutMills: ").append(toIndentedString(maxTimeoutMills)).append("\n");
- sb.append(" options: ").append(toIndentedString(options)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/NotifyErrorRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/NotifyErrorRequestDto.java
deleted file mode 100644
index 4eb42d8eb..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/NotifyErrorRequestDto.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** The request body of Notify Event notifying of an error. */
-@JsonPropertyOrder({
- NotifyErrorRequestDto.JSON_PROPERTY_EVENT,
- NotifyErrorRequestDto.JSON_PROPERTY_VERSION,
- NotifyErrorRequestDto.JSON_PROPERTY_TYPE,
- NotifyErrorRequestDto.JSON_PROPERTY_CALLID,
- NotifyErrorRequestDto.JSON_PROPERTY_ERROR_CODE,
- NotifyErrorRequestDto.JSON_PROPERTY_ERROR_MSG,
- NotifyErrorRequestDto.JSON_PROPERTY_USER,
- NotifyErrorRequestDto.JSON_PROPERTY_CUSTOM
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class NotifyErrorRequestDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_EVENT = "event";
- private String event;
- private boolean eventDefined = false;
-
- public static final String JSON_PROPERTY_VERSION = "version";
- private Integer version;
- private boolean versionDefined = false;
-
- public static final String JSON_PROPERTY_TYPE = "type";
- private String type;
- private boolean typeDefined = false;
-
- public static final String JSON_PROPERTY_CALLID = "callid";
- private String callid;
- private boolean callidDefined = false;
-
- public static final String JSON_PROPERTY_ERROR_CODE = "errorCode";
- private Integer errorCode;
- private boolean errorCodeDefined = false;
-
- public static final String JSON_PROPERTY_ERROR_MSG = "errorMsg";
- private String errorMsg;
- private boolean errorMsgDefined = false;
-
- public static final String JSON_PROPERTY_USER = "user";
- private String user;
- private boolean userDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public NotifyErrorRequestDto() {}
-
- public NotifyErrorRequestDto event(String event) {
- this.event = event;
- this.eventDefined = true;
- return this;
- }
-
- /**
- * Must have the value `notify`.
- *
- * @return event
- */
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getEvent() {
- return event;
- }
-
- @JsonIgnore
- public boolean getEventDefined() {
- return eventDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEvent(String event) {
- this.event = event;
- this.eventDefined = true;
- }
-
- public NotifyErrorRequestDto version(Integer version) {
- this.version = version;
- this.versionDefined = true;
- return this;
- }
-
- /**
- * The current API version.
- *
- * @return version
- */
- @JsonProperty(JSON_PROPERTY_VERSION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getVersion() {
- return version;
- }
-
- @JsonIgnore
- public boolean getVersionDefined() {
- return versionDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_VERSION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setVersion(Integer version) {
- this.version = version;
- this.versionDefined = true;
- }
-
- public NotifyErrorRequestDto type(String type) {
- this.type = type;
- this.typeDefined = true;
- return this;
- }
-
- /**
- * The type of information communicated in the notification. Must have the value
- * `callingerror`.
- *
- * @return type
- */
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getType() {
- return type;
- }
-
- @JsonIgnore
- public boolean getTypeDefined() {
- return typeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setType(String type) {
- this.type = type;
- this.typeDefined = true;
- }
-
- public NotifyErrorRequestDto callid(String callid) {
- this.callid = callid;
- this.callidDefined = true;
- return this;
- }
-
- /**
- * The unique ID assigned to this call.
- *
- * @return callid
- */
- @JsonProperty(JSON_PROPERTY_CALLID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCallid() {
- return callid;
- }
-
- @JsonIgnore
- public boolean getCallidDefined() {
- return callidDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALLID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallid(String callid) {
- this.callid = callid;
- this.callidDefined = true;
- }
-
- public NotifyErrorRequestDto errorCode(Integer errorCode) {
- this.errorCode = errorCode;
- this.errorCodeDefined = true;
- return this;
- }
-
- /**
- * The error code of the error.
- *
- * @return errorCode
- */
- @JsonProperty(JSON_PROPERTY_ERROR_CODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getErrorCode() {
- return errorCode;
- }
-
- @JsonIgnore
- public boolean getErrorCodeDefined() {
- return errorCodeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ERROR_CODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setErrorCode(Integer errorCode) {
- this.errorCode = errorCode;
- this.errorCodeDefined = true;
- }
-
- public NotifyErrorRequestDto errorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- this.errorMsgDefined = true;
- return this;
- }
-
- /**
- * The error message of the error.
- *
- * @return errorMsg
- */
- @JsonProperty(JSON_PROPERTY_ERROR_MSG)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getErrorMsg() {
- return errorMsg;
- }
-
- @JsonIgnore
- public boolean getErrorMsgDefined() {
- return errorMsgDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ERROR_MSG)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setErrorMsg(String errorMsg) {
- this.errorMsg = errorMsg;
- this.errorMsgDefined = true;
- }
-
- public NotifyErrorRequestDto user(String user) {
- this.user = user;
- this.userDefined = true;
- return this;
- }
-
- /**
- * The user ID that initiated the call.
- *
- * @return user
- */
- @JsonProperty(JSON_PROPERTY_USER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getUser() {
- return user;
- }
-
- @JsonIgnore
- public boolean getUserDefined() {
- return userDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_USER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setUser(String user) {
- this.user = user;
- this.userDefined = true;
- }
-
- public NotifyErrorRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * An optional parameter containing notification-specific information.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- /** Return true if this notifyErrorRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- NotifyErrorRequestDto notifyErrorRequest = (NotifyErrorRequestDto) o;
- return Objects.equals(this.event, notifyErrorRequest.event)
- && Objects.equals(this.version, notifyErrorRequest.version)
- && Objects.equals(this.type, notifyErrorRequest.type)
- && Objects.equals(this.callid, notifyErrorRequest.callid)
- && Objects.equals(this.errorCode, notifyErrorRequest.errorCode)
- && Objects.equals(this.errorMsg, notifyErrorRequest.errorMsg)
- && Objects.equals(this.user, notifyErrorRequest.user)
- && Objects.equals(this.custom, notifyErrorRequest.custom);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(event, version, type, callid, errorCode, errorMsg, user, custom);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class NotifyErrorRequestDto {\n");
- sb.append(" event: ").append(toIndentedString(event)).append("\n");
- sb.append(" version: ").append(toIndentedString(version)).append("\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
- sb.append(" callid: ").append(toIndentedString(callid)).append("\n");
- sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
- sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n");
- sb.append(" user: ").append(toIndentedString(user)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/NotifyRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/NotifyRequestDto.java
deleted file mode 100644
index f91e29a14..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/NotifyRequestDto.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonValue;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/** The request body of a Notify Event. */
-@JsonPropertyOrder({
- NotifyRequestDto.JSON_PROPERTY_EVENT,
- NotifyRequestDto.JSON_PROPERTY_TYPE,
- NotifyRequestDto.JSON_PROPERTY_CUSTOM
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-
-/*@JsonIgnoreProperties(
- value = "event", // ignore manually set event, it will be automatically generated by Jackson during serialization
- allowSetters = true // allows the event to be set during deserialization
-)*/
-@JsonTypeInfo(
- use = JsonTypeInfo.Id.NONE,
- include = JsonTypeInfo.As.EXISTING_PROPERTY,
- property = "event",
- visible = true)
-public class NotifyRequestDto extends WebhooksEventRequestDto {
- private static final long serialVersionUID = 1L;
-
- /** Must have the value `notify`. */
- public enum EventEnum {
- NOTIFY("notify"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- EventEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static EventEnum fromValue(String value) {
- for (EventEnum b : EventEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_EVENT = "event";
- private String event;
- private boolean eventDefined = false;
-
- public static final String JSON_PROPERTY_TYPE = "type";
- private String type;
- private boolean typeDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public NotifyRequestDto() {}
-
- public NotifyRequestDto event(String event) {
- this.event = event;
- this.eventDefined = true;
- return this;
- }
-
- /**
- * Must have the value `notify`.
- *
- * @return event
- */
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getEvent() {
- return event;
- }
-
- @JsonIgnore
- public boolean getEventDefined() {
- return eventDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEvent(String event) {
- this.event = event;
- this.eventDefined = true;
- }
-
- public NotifyRequestDto type(String type) {
- this.type = type;
- this.typeDefined = true;
- return this;
- }
-
- /**
- * The type of information communicated in the notification.
- *
- * @return type
- */
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getType() {
- return type;
- }
-
- @JsonIgnore
- public boolean getTypeDefined() {
- return typeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setType(String type) {
- this.type = type;
- this.typeDefined = true;
- }
-
- public NotifyRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * An optional parameter containing notification-specific information.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- @Override
- public NotifyRequestDto callid(String callid) {
- this.setCallid(callid);
- return this;
- }
-
- @Override
- public NotifyRequestDto version(Integer version) {
- this.setVersion(version);
- return this;
- }
-
- /** Return true if this notifyRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- NotifyRequestDto notifyRequest = (NotifyRequestDto) o;
- return Objects.equals(this.event, notifyRequest.event)
- && Objects.equals(this.type, notifyRequest.type)
- && Objects.equals(this.custom, notifyRequest.custom)
- && super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(event, type, custom, super.hashCode());
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class NotifyRequestDto {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" event: ").append(toIndentedString(event)).append("\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
- static {
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("notifyRequest", NotifyRequestDto.class);
- JSONNavigator.registerDiscriminator(NotifyRequestDto.class, "event", mappings);
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/PieRequestAllOfMenuResultDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/PieRequestAllOfMenuResultDto.java
deleted file mode 100644
index c2fe826e7..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/PieRequestAllOfMenuResultDto.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** An object containing information about the returned menu result. */
-@JsonPropertyOrder({
- PieRequestAllOfMenuResultDto.JSON_PROPERTY_MENU_ID,
- PieRequestAllOfMenuResultDto.JSON_PROPERTY_TYPE,
- PieRequestAllOfMenuResultDto.JSON_PROPERTY_VALUE,
- PieRequestAllOfMenuResultDto.JSON_PROPERTY_INPUT_METHOD
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class PieRequestAllOfMenuResultDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_MENU_ID = "menuId";
- private String menuId;
- private boolean menuIdDefined = false;
-
- /** The type of information that's returned. */
- public enum TypeEnum {
- ERROR("error"),
-
- RETURN("return"),
-
- SEQUENCE("sequence"),
-
- TIMEOUT("timeout"),
-
- HANGUP("hangup"),
-
- INVALIDINPUT("invalidinput"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- TypeEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static TypeEnum fromValue(String value) {
- for (TypeEnum b : TypeEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_TYPE = "type";
- private String type;
- private boolean typeDefined = false;
-
- public static final String JSON_PROPERTY_VALUE = "value";
- private String value;
- private boolean valueDefined = false;
-
- public static final String JSON_PROPERTY_INPUT_METHOD = "inputMethod";
- private String inputMethod;
- private boolean inputMethodDefined = false;
-
- public PieRequestAllOfMenuResultDto() {}
-
- public PieRequestAllOfMenuResultDto menuId(String menuId) {
- this.menuId = menuId;
- this.menuIdDefined = true;
- return this;
- }
-
- /**
- * The ID of the menu that triggered the prompt input event.
- *
- * @return menuId
- */
- @JsonProperty(JSON_PROPERTY_MENU_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMenuId() {
- return menuId;
- }
-
- @JsonIgnore
- public boolean getMenuIdDefined() {
- return menuIdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MENU_ID)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMenuId(String menuId) {
- this.menuId = menuId;
- this.menuIdDefined = true;
- }
-
- public PieRequestAllOfMenuResultDto type(String type) {
- this.type = type;
- this.typeDefined = true;
- return this;
- }
-
- /**
- * The type of information that's returned.
- *
- * @return type
- */
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getType() {
- return type;
- }
-
- @JsonIgnore
- public boolean getTypeDefined() {
- return typeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setType(String type) {
- this.type = type;
- this.typeDefined = true;
- }
-
- public PieRequestAllOfMenuResultDto value(String value) {
- this.value = value;
- this.valueDefined = true;
- return this;
- }
-
- /**
- * The value of the returned information.
- *
- * @return value
- */
- @JsonProperty(JSON_PROPERTY_VALUE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getValue() {
- return value;
- }
-
- @JsonIgnore
- public boolean getValueDefined() {
- return valueDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_VALUE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setValue(String value) {
- this.value = value;
- this.valueDefined = true;
- }
-
- public PieRequestAllOfMenuResultDto inputMethod(String inputMethod) {
- this.inputMethod = inputMethod;
- this.inputMethodDefined = true;
- return this;
- }
-
- /**
- * The type of input received.
- *
- * @return inputMethod
- */
- @JsonProperty(JSON_PROPERTY_INPUT_METHOD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getInputMethod() {
- return inputMethod;
- }
-
- @JsonIgnore
- public boolean getInputMethodDefined() {
- return inputMethodDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_INPUT_METHOD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setInputMethod(String inputMethod) {
- this.inputMethod = inputMethod;
- this.inputMethodDefined = true;
- }
-
- /** Return true if this pieRequest_allOf_menuResult object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- PieRequestAllOfMenuResultDto pieRequestAllOfMenuResult = (PieRequestAllOfMenuResultDto) o;
- return Objects.equals(this.menuId, pieRequestAllOfMenuResult.menuId)
- && Objects.equals(this.type, pieRequestAllOfMenuResult.type)
- && Objects.equals(this.value, pieRequestAllOfMenuResult.value)
- && Objects.equals(this.inputMethod, pieRequestAllOfMenuResult.inputMethod);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(menuId, type, value, inputMethod);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class PieRequestAllOfMenuResultDto {\n");
- sb.append(" menuId: ").append(toIndentedString(menuId)).append("\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
- sb.append(" value: ").append(toIndentedString(value)).append("\n");
- sb.append(" inputMethod: ").append(toIndentedString(inputMethod)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/PieRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/PieRequestDto.java
deleted file mode 100644
index ea2a446f0..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/PieRequestDto.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonValue;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/** The request body of a Prompt Input Event. */
-@JsonPropertyOrder({
- PieRequestDto.JSON_PROPERTY_EVENT,
- PieRequestDto.JSON_PROPERTY_TIMESTAMP,
- PieRequestDto.JSON_PROPERTY_MENU_RESULT,
- PieRequestDto.JSON_PROPERTY_CUSTOM,
- PieRequestDto.JSON_PROPERTY_APPLICATION_KEY
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-
-/*@JsonIgnoreProperties(
- value = "event", // ignore manually set event, it will be automatically generated by Jackson during serialization
- allowSetters = true // allows the event to be set during deserialization
-)*/
-@JsonTypeInfo(
- use = JsonTypeInfo.Id.NONE,
- include = JsonTypeInfo.As.EXISTING_PROPERTY,
- property = "event",
- visible = true)
-public class PieRequestDto extends WebhooksEventRequestDto {
- private static final long serialVersionUID = 1L;
-
- /** Must have the value `pie`. */
- public enum EventEnum {
- PIE("pie"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- EventEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static EventEnum fromValue(String value) {
- for (EventEnum b : EventEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_EVENT = "event";
- private String event;
- private boolean eventDefined = false;
-
- public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
- private OffsetDateTime timestamp;
- private boolean timestampDefined = false;
-
- public static final String JSON_PROPERTY_MENU_RESULT = "menuResult";
- private PieRequestAllOfMenuResultDto menuResult;
- private boolean menuResultDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATION_KEY = "applicationKey";
- private String applicationKey;
- private boolean applicationKeyDefined = false;
-
- public PieRequestDto() {}
-
- public PieRequestDto event(String event) {
- this.event = event;
- this.eventDefined = true;
- return this;
- }
-
- /**
- * Must have the value `pie`.
- *
- * @return event
- */
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getEvent() {
- return event;
- }
-
- @JsonIgnore
- public boolean getEventDefined() {
- return eventDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_EVENT)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setEvent(String event) {
- this.event = event;
- this.eventDefined = true;
- }
-
- public PieRequestDto timestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- return this;
- }
-
- /**
- * The timestamp in UTC format.
- *
- * @return timestamp
- */
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public OffsetDateTime getTimestamp() {
- return timestamp;
- }
-
- @JsonIgnore
- public boolean getTimestampDefined() {
- return timestampDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- }
-
- public PieRequestDto menuResult(PieRequestAllOfMenuResultDto menuResult) {
- this.menuResult = menuResult;
- this.menuResultDefined = true;
- return this;
- }
-
- /**
- * Get menuResult
- *
- * @return menuResult
- */
- @JsonProperty(JSON_PROPERTY_MENU_RESULT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public PieRequestAllOfMenuResultDto getMenuResult() {
- return menuResult;
- }
-
- @JsonIgnore
- public boolean getMenuResultDefined() {
- return menuResultDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MENU_RESULT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMenuResult(PieRequestAllOfMenuResultDto menuResult) {
- this.menuResult = menuResult;
- this.menuResultDefined = true;
- }
-
- public PieRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * A string that can be used to pass custom information related to the call.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public PieRequestDto applicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- return this;
- }
-
- /**
- * The unique application key. You can find it in the Sinch
- * [dashboard](https://dashboard.sinch.com/voice/apps).
- *
- * @return applicationKey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationKey() {
- return applicationKey;
- }
-
- @JsonIgnore
- public boolean getApplicationKeyDefined() {
- return applicationKeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- }
-
- @Override
- public PieRequestDto callid(String callid) {
- this.setCallid(callid);
- return this;
- }
-
- @Override
- public PieRequestDto version(Integer version) {
- this.setVersion(version);
- return this;
- }
-
- /** Return true if this pieRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- PieRequestDto pieRequest = (PieRequestDto) o;
- return Objects.equals(this.event, pieRequest.event)
- && Objects.equals(this.timestamp, pieRequest.timestamp)
- && Objects.equals(this.menuResult, pieRequest.menuResult)
- && Objects.equals(this.custom, pieRequest.custom)
- && Objects.equals(this.applicationKey, pieRequest.applicationKey)
- && super.equals(o);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(event, timestamp, menuResult, custom, applicationKey, super.hashCode());
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class PieRequestDto {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
- sb.append(" event: ").append(toIndentedString(event)).append("\n");
- sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
- sb.append(" menuResult: ").append(toIndentedString(menuResult)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
- static {
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("pieRequest", PieRequestDto.class);
- JSONNavigator.registerDiscriminator(PieRequestDto.class, "event", mappings);
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SVAMLRequestBodyDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SVAMLRequestBodyDto.java
deleted file mode 100644
index dce7862d1..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SVAMLRequestBodyDto.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * SVAML is a call control markup language. When a server receives a callback event from the Sinch
- * platform, it can respond with a SVAML object to control the voice call. The following is an
- * example of a SVAML object type and its contents.
- */
-@JsonPropertyOrder({
- SVAMLRequestBodyDto.JSON_PROPERTY_INSTRUCTIONS,
- SVAMLRequestBodyDto.JSON_PROPERTY_ACTION
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SVAMLRequestBodyDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions";
- private List instructions;
- private boolean instructionsDefined = false;
-
- public static final String JSON_PROPERTY_ACTION = "action";
- private SvamlActionDto action;
- private boolean actionDefined = false;
-
- public SVAMLRequestBodyDto() {}
-
- public SVAMLRequestBodyDto instructions(List instructions) {
- this.instructions = instructions;
- this.instructionsDefined = true;
- return this;
- }
-
- public SVAMLRequestBodyDto addInstructionsItem(SvamlInstructionDto instructionsItem) {
- if (this.instructions == null) {
- this.instructions = new ArrayList<>();
- }
- this.instructionsDefined = true;
- this.instructions.add(instructionsItem);
- return this;
- }
-
- /**
- * The collection of instructions that can perform various tasks during the call. You can include
- * as many instructions as necessary.
- *
- * @return instructions
- */
- @JsonProperty(JSON_PROPERTY_INSTRUCTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getInstructions() {
- return instructions;
- }
-
- @JsonIgnore
- public boolean getInstructionsDefined() {
- return instructionsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_INSTRUCTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setInstructions(List instructions) {
- this.instructions = instructions;
- this.instructionsDefined = true;
- }
-
- public SVAMLRequestBodyDto action(SvamlActionDto action) {
- this.action = action;
- this.actionDefined = true;
- return this;
- }
-
- /**
- * Get action
- *
- * @return action
- */
- @JsonProperty(JSON_PROPERTY_ACTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public SvamlActionDto getAction() {
- return action;
- }
-
- @JsonIgnore
- public boolean getActionDefined() {
- return actionDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ACTION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setAction(SvamlActionDto action) {
- this.action = action;
- this.actionDefined = true;
- }
-
- /** Return true if this SVAMLRequestBody object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SVAMLRequestBodyDto svAMLRequestBody = (SVAMLRequestBodyDto) o;
- return Objects.equals(this.instructions, svAMLRequestBody.instructions)
- && Objects.equals(this.action, svAMLRequestBody.action);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(instructions, action);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SVAMLRequestBodyDto {\n");
- sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n");
- sb.append(" action: ").append(toIndentedString(action)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectConfConferenceDtmfOptionsDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectConfConferenceDtmfOptionsDto.java
deleted file mode 100644
index 8f8cc9114..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectConfConferenceDtmfOptionsDto.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/**
- * Options to control how DTMF signals are used by the participant in the conference. For
- * information on how to use this feature, read more [here](../../conference-dtmf).
- */
-@JsonPropertyOrder({
- SvamlActionConnectConfConferenceDtmfOptionsDto.JSON_PROPERTY_MODE,
- SvamlActionConnectConfConferenceDtmfOptionsDto.JSON_PROPERTY_MAX_DIGITS,
- SvamlActionConnectConfConferenceDtmfOptionsDto.JSON_PROPERTY_TIMEOUT_MILLS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionConnectConfConferenceDtmfOptionsDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_MODE = "mode";
- private String mode;
- private boolean modeDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DIGITS = "maxDigits";
- private Integer maxDigits;
- private boolean maxDigitsDefined = false;
-
- public static final String JSON_PROPERTY_TIMEOUT_MILLS = "timeoutMills";
- private Integer timeoutMills;
- private boolean timeoutMillsDefined = false;
-
- public SvamlActionConnectConfConferenceDtmfOptionsDto() {}
-
- public SvamlActionConnectConfConferenceDtmfOptionsDto mode(String mode) {
- this.mode = mode;
- this.modeDefined = true;
- return this;
- }
-
- /**
- * Determines what DTMF mode the participant will use in the call.
- *
- * @return mode
- */
- @JsonProperty(JSON_PROPERTY_MODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMode() {
- return mode;
- }
-
- @JsonIgnore
- public boolean getModeDefined() {
- return modeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MODE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMode(String mode) {
- this.mode = mode;
- this.modeDefined = true;
- }
-
- public SvamlActionConnectConfConferenceDtmfOptionsDto maxDigits(Integer maxDigits) {
- this.maxDigits = maxDigits;
- this.maxDigitsDefined = true;
- return this;
- }
-
- /**
- * The maximum number of accepted digits before sending the collected input via a PIE callback.
- * The default value is `1`. If the value is greater than `1`, the PIE
- * callback is triggered by one of the three following events: - No additional digit is entered
- * before the `timeoutMills` timeout period has elapsed. - The `#` character
- * is entered. - The maximum number of digits has been entered.
- *
- * @return maxDigits
- */
- @JsonProperty(JSON_PROPERTY_MAX_DIGITS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDigits() {
- return maxDigits;
- }
-
- @JsonIgnore
- public boolean getMaxDigitsDefined() {
- return maxDigitsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DIGITS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDigits(Integer maxDigits) {
- this.maxDigits = maxDigits;
- this.maxDigitsDefined = true;
- }
-
- public SvamlActionConnectConfConferenceDtmfOptionsDto timeoutMills(Integer timeoutMills) {
- this.timeoutMills = timeoutMills;
- this.timeoutMillsDefined = true;
- return this;
- }
-
- /**
- * The number of milliseconds that the system will wait between entered digits before triggering
- * the PIE callback. The default value is `3000`.
- *
- * @return timeoutMills
- */
- @JsonProperty(JSON_PROPERTY_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getTimeoutMills() {
- return timeoutMills;
- }
-
- @JsonIgnore
- public boolean getTimeoutMillsDefined() {
- return timeoutMillsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMEOUT_MILLS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimeoutMills(Integer timeoutMills) {
- this.timeoutMills = timeoutMills;
- this.timeoutMillsDefined = true;
- }
-
- /** Return true if this svaml_action_connectConf_conferenceDtmfOptions object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionConnectConfConferenceDtmfOptionsDto svamlActionConnectConfConferenceDtmfOptions =
- (SvamlActionConnectConfConferenceDtmfOptionsDto) o;
- return Objects.equals(this.mode, svamlActionConnectConfConferenceDtmfOptions.mode)
- && Objects.equals(this.maxDigits, svamlActionConnectConfConferenceDtmfOptions.maxDigits)
- && Objects.equals(
- this.timeoutMills, svamlActionConnectConfConferenceDtmfOptions.timeoutMills);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(mode, maxDigits, timeoutMills);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionConnectConfConferenceDtmfOptionsDto {\n");
- sb.append(" mode: ").append(toIndentedString(mode)).append("\n");
- sb.append(" maxDigits: ").append(toIndentedString(maxDigits)).append("\n");
- sb.append(" timeoutMills: ").append(toIndentedString(timeoutMills)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectConfDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectConfDto.java
deleted file mode 100644
index 67bf0caba..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectConfDto.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Connects an incoming call to a conference. Available to use in a response to an [Incoming Call
- * Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
- */
-@JsonPropertyOrder({
- SvamlActionConnectConfDto.JSON_PROPERTY_NAME,
- SvamlActionConnectConfDto.JSON_PROPERTY_CONFERENCE_ID,
- SvamlActionConnectConfDto.JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS,
- SvamlActionConnectConfDto.JSON_PROPERTY_MOH
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionConnectConfDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `connectConf`. */
- public enum NameEnum {
- CONNECTCONF("connectConf"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_CONFERENCE_ID = "conferenceId";
- private String conferenceId;
- private boolean conferenceIdDefined = false;
-
- public static final String JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS = "conferenceDtmfOptions";
- private SvamlActionConnectConfConferenceDtmfOptionsDto conferenceDtmfOptions;
- private boolean conferenceDtmfOptionsDefined = false;
-
- public static final String JSON_PROPERTY_MOH = "moh";
- private String moh;
- private boolean mohDefined = false;
-
- public SvamlActionConnectConfDto() {}
-
- public SvamlActionConnectConfDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `connectConf`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlActionConnectConfDto conferenceId(String conferenceId) {
- this.conferenceId = conferenceId;
- this.conferenceIdDefined = true;
- return this;
- }
-
- /**
- * The unique identifier of the conference. Shouldn't exceed 64 characters.
- *
- * @return conferenceId
- */
- @JsonProperty(JSON_PROPERTY_CONFERENCE_ID)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getConferenceId() {
- return conferenceId;
- }
-
- @JsonIgnore
- public boolean getConferenceIdDefined() {
- return conferenceIdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CONFERENCE_ID)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setConferenceId(String conferenceId) {
- this.conferenceId = conferenceId;
- this.conferenceIdDefined = true;
- }
-
- public SvamlActionConnectConfDto conferenceDtmfOptions(
- SvamlActionConnectConfConferenceDtmfOptionsDto conferenceDtmfOptions) {
- this.conferenceDtmfOptions = conferenceDtmfOptions;
- this.conferenceDtmfOptionsDefined = true;
- return this;
- }
-
- /**
- * Get conferenceDtmfOptions
- *
- * @return conferenceDtmfOptions
- */
- @JsonProperty(JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public SvamlActionConnectConfConferenceDtmfOptionsDto getConferenceDtmfOptions() {
- return conferenceDtmfOptions;
- }
-
- @JsonIgnore
- public boolean getConferenceDtmfOptionsDefined() {
- return conferenceDtmfOptionsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CONFERENCE_DTMF_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setConferenceDtmfOptions(
- SvamlActionConnectConfConferenceDtmfOptionsDto conferenceDtmfOptions) {
- this.conferenceDtmfOptions = conferenceDtmfOptions;
- this.conferenceDtmfOptionsDefined = true;
- }
-
- public SvamlActionConnectConfDto moh(String moh) {
- this.moh = moh;
- this.mohDefined = true;
- return this;
- }
-
- /**
- * Means \"music on hold\". If this optional parameter is included, plays music to the
- * first participant in a conference while they're alone and waiting for other participants to
- * join. If `moh` isn't specified, the user will only hear silence while alone in
- * the conference.
- *
- * @return moh
- */
- @JsonProperty(JSON_PROPERTY_MOH)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMoh() {
- return moh;
- }
-
- @JsonIgnore
- public boolean getMohDefined() {
- return mohDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MOH)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMoh(String moh) {
- this.moh = moh;
- this.mohDefined = true;
- }
-
- /** Return true if this svaml.action.connectConf object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionConnectConfDto svamlActionConnectConf = (SvamlActionConnectConfDto) o;
- return Objects.equals(this.name, svamlActionConnectConf.name)
- && Objects.equals(this.conferenceId, svamlActionConnectConf.conferenceId)
- && Objects.equals(this.conferenceDtmfOptions, svamlActionConnectConf.conferenceDtmfOptions)
- && Objects.equals(this.moh, svamlActionConnectConf.moh);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, conferenceId, conferenceDtmfOptions, moh);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionConnectConfDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" conferenceId: ").append(toIndentedString(conferenceId)).append("\n");
- sb.append(" conferenceDtmfOptions: ")
- .append(toIndentedString(conferenceDtmfOptions))
- .append("\n");
- sb.append(" moh: ").append(toIndentedString(moh)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectMxpDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectMxpDto.java
deleted file mode 100644
index 29d11c446..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectMxpDto.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Determines how an application-to-application call is connected. Available to use in a response to
- * an [Incoming Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
- */
-@JsonPropertyOrder({
- SvamlActionConnectMxpDto.JSON_PROPERTY_NAME,
- SvamlActionConnectMxpDto.JSON_PROPERTY_DESTINATION,
- SvamlActionConnectMxpDto.JSON_PROPERTY_CALLHEADERS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionConnectMxpDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `connectMxp`. */
- public enum NameEnum {
- CONNECTMXP("connectMxp"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_DESTINATION = "destination";
- private DestinationDto destination;
- private boolean destinationDefined = false;
-
- public static final String JSON_PROPERTY_CALLHEADERS = "callheaders";
- private List callheaders;
- private boolean callheadersDefined = false;
-
- public SvamlActionConnectMxpDto() {}
-
- public SvamlActionConnectMxpDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `connectMxp`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlActionConnectMxpDto destination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- return this;
- }
-
- /**
- * Get destination
- *
- * @return destination
- */
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DestinationDto getDestination() {
- return destination;
- }
-
- @JsonIgnore
- public boolean getDestinationDefined() {
- return destinationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDestination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- }
-
- public SvamlActionConnectMxpDto callheaders(List callheaders) {
- this.callheaders = callheaders;
- this.callheadersDefined = true;
- return this;
- }
-
- public SvamlActionConnectMxpDto addCallheadersItem(CallHeaderDto callheadersItem) {
- if (this.callheaders == null) {
- this.callheaders = new ArrayList<>();
- }
- this.callheadersDefined = true;
- this.callheaders.add(callheadersItem);
- return this;
- }
-
- /**
- * An optional parameter that allows you to specify or override call headers provided to the
- * receiving Sinch SDK client. Read more about call headers [here](../../call-headers/).
- *
- * @return callheaders
- */
- @JsonProperty(JSON_PROPERTY_CALLHEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getCallheaders() {
- return callheaders;
- }
-
- @JsonIgnore
- public boolean getCallheadersDefined() {
- return callheadersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALLHEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallheaders(List callheaders) {
- this.callheaders = callheaders;
- this.callheadersDefined = true;
- }
-
- /** Return true if this svaml.action.connectMxp object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionConnectMxpDto svamlActionConnectMxp = (SvamlActionConnectMxpDto) o;
- return Objects.equals(this.name, svamlActionConnectMxp.name)
- && Objects.equals(this.destination, svamlActionConnectMxp.destination)
- && Objects.equals(this.callheaders, svamlActionConnectMxp.callheaders);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, destination, callheaders);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionConnectMxpDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
- sb.append(" callheaders: ").append(toIndentedString(callheaders)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectPstnDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectPstnDto.java
deleted file mode 100644
index 1a15505e1..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectPstnDto.java
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Determines how a PSTN call is connected. Available to use in a response to an [Incoming Call
- * Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
- */
-@JsonPropertyOrder({
- SvamlActionConnectPstnDto.JSON_PROPERTY_NAME,
- SvamlActionConnectPstnDto.JSON_PROPERTY_NUMBER,
- SvamlActionConnectPstnDto.JSON_PROPERTY_LOCALE,
- SvamlActionConnectPstnDto.JSON_PROPERTY_MAX_DURATION,
- SvamlActionConnectPstnDto.JSON_PROPERTY_DIAL_TIMEOUT,
- SvamlActionConnectPstnDto.JSON_PROPERTY_CLI,
- SvamlActionConnectPstnDto.JSON_PROPERTY_SUPPRESS_CALLBACKS,
- SvamlActionConnectPstnDto.JSON_PROPERTY_DTMF,
- SvamlActionConnectPstnDto.JSON_PROPERTY_INDICATIONS,
- SvamlActionConnectPstnDto.JSON_PROPERTY_AMD
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionConnectPstnDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `connectPstn`. */
- public enum NameEnum {
- CONNECTPSTN("connectPstn"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_NUMBER = "number";
- private String number;
- private boolean numberDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DURATION = "maxDuration";
- private Integer maxDuration;
- private boolean maxDurationDefined = false;
-
- public static final String JSON_PROPERTY_DIAL_TIMEOUT = "dialTimeout";
- private Integer dialTimeout;
- private boolean dialTimeoutDefined = false;
-
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_SUPPRESS_CALLBACKS = "suppressCallbacks";
- private Boolean suppressCallbacks;
- private boolean suppressCallbacksDefined = false;
-
- public static final String JSON_PROPERTY_DTMF = "dtmf";
- private String dtmf;
- private boolean dtmfDefined = false;
-
- public static final String JSON_PROPERTY_INDICATIONS = "indications";
- private String indications;
- private boolean indicationsDefined = false;
-
- public static final String JSON_PROPERTY_AMD = "amd";
- private SvamlActionConnectPstnAmdDto amd;
- private boolean amdDefined = false;
-
- public SvamlActionConnectPstnDto() {}
-
- public SvamlActionConnectPstnDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `connectPstn`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlActionConnectPstnDto number(String number) {
- this.number = number;
- this.numberDefined = true;
- return this;
- }
-
- /**
- * Used to override where PSTN call is connected. If not specified, the extension the client
- * called is used.
- *
- * @return number
- */
- @JsonProperty(JSON_PROPERTY_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getNumber() {
- return number;
- }
-
- @JsonIgnore
- public boolean getNumberDefined() {
- return numberDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNumber(String number) {
- this.number = number;
- this.numberDefined = true;
- }
-
- public SvamlActionConnectPstnDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * Specifies the locale. Uses the language code according to `ISO 639`, a dash
- * (`-`), and a country code according to `ISO 3166-1 alpha-2`. If not
- * specified, the default locale of `en-US` is used.
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- public SvamlActionConnectPstnDto maxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- return this;
- }
-
- /**
- * The max duration of the call in seconds (max 14400 seconds). If the call is still connected at
- * that time, it will be automatically disconnected.
- *
- * @return maxDuration
- */
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDuration() {
- return maxDuration;
- }
-
- @JsonIgnore
- public boolean getMaxDurationDefined() {
- return maxDurationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- }
-
- public SvamlActionConnectPstnDto dialTimeout(Integer dialTimeout) {
- this.dialTimeout = dialTimeout;
- this.dialTimeoutDefined = true;
- return this;
- }
-
- /**
- * The max duration the call will wait in ringing unanswered state before terminating with
- * ```TIMEOUT/NO ANSWER``` on PSTN leg and
- * ```NA/BUSY```on MXP leg.
- *
- * @return dialTimeout
- */
- @JsonProperty(JSON_PROPERTY_DIAL_TIMEOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getDialTimeout() {
- return dialTimeout;
- }
-
- @JsonIgnore
- public boolean getDialTimeoutDefined() {
- return dialTimeoutDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DIAL_TIMEOUT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDialTimeout(Integer dialTimeout) {
- this.dialTimeout = dialTimeout;
- this.dialTimeoutDefined = true;
- }
-
- public SvamlActionConnectPstnDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * Used to override the CLI (or caller ID) of the client. The phone number of the person who
- * initiated the call is shown as the CLI. To set your own CLI, you may use your verified number
- * or your Dashboard virtual number.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public SvamlActionConnectPstnDto suppressCallbacks(Boolean suppressCallbacks) {
- this.suppressCallbacks = suppressCallbacks;
- this.suppressCallbacksDefined = true;
- return this;
- }
-
- /**
- * If enabled, suppresses [ACE](../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) and
- * [DICE](../../voice/tag/Callbacks/#tag/Callbacks/operation/dice) callbacks for the call.
- *
- * @return suppressCallbacks
- */
- @JsonProperty(JSON_PROPERTY_SUPPRESS_CALLBACKS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getSuppressCallbacks() {
- return suppressCallbacks;
- }
-
- @JsonIgnore
- public boolean getSuppressCallbacksDefined() {
- return suppressCallbacksDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_SUPPRESS_CALLBACKS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setSuppressCallbacks(Boolean suppressCallbacks) {
- this.suppressCallbacks = suppressCallbacks;
- this.suppressCallbacksDefined = true;
- }
-
- public SvamlActionConnectPstnDto dtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- return this;
- }
-
- /**
- * A string that determines the DTMF tones to play to the callee when the call is picked up. Valid
- * characters are: `0-9`, `#`, and `w`. `w` renders a
- * 500ms pause. For example, the string `ww1234#w#`, plays a 1 second pause, the DTMF
- * tones for `1`, `2`, `3`, `4`, and `#`,
- * followed by a 500ms pause and finally the `#` tone. This is useful if the callout
- * destination requires a conference PIN code or an extension. If there is a calling party, it
- * will hear progress while the DTMF is sent.
- *
- * @return dtmf
- */
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDtmf() {
- return dtmf;
- }
-
- @JsonIgnore
- public boolean getDtmfDefined() {
- return dtmfDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- }
-
- public SvamlActionConnectPstnDto indications(String indications) {
- this.indications = indications;
- this.indicationsDefined = true;
- return this;
- }
-
- /**
- * The locale's tone to play while ringing.
- *
- * @return indications
- */
- @JsonProperty(JSON_PROPERTY_INDICATIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getIndications() {
- return indications;
- }
-
- @JsonIgnore
- public boolean getIndicationsDefined() {
- return indicationsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_INDICATIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setIndications(String indications) {
- this.indications = indications;
- this.indicationsDefined = true;
- }
-
- public SvamlActionConnectPstnDto amd(SvamlActionConnectPstnAmdDto amd) {
- this.amd = amd;
- this.amdDefined = true;
- return this;
- }
-
- /**
- * Get amd
- *
- * @return amd
- */
- @JsonProperty(JSON_PROPERTY_AMD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public SvamlActionConnectPstnAmdDto getAmd() {
- return amd;
- }
-
- @JsonIgnore
- public boolean getAmdDefined() {
- return amdDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_AMD)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setAmd(SvamlActionConnectPstnAmdDto amd) {
- this.amd = amd;
- this.amdDefined = true;
- }
-
- /** Return true if this svaml.action.connectPstn object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionConnectPstnDto svamlActionConnectPstn = (SvamlActionConnectPstnDto) o;
- return Objects.equals(this.name, svamlActionConnectPstn.name)
- && Objects.equals(this.number, svamlActionConnectPstn.number)
- && Objects.equals(this.locale, svamlActionConnectPstn.locale)
- && Objects.equals(this.maxDuration, svamlActionConnectPstn.maxDuration)
- && Objects.equals(this.dialTimeout, svamlActionConnectPstn.dialTimeout)
- && Objects.equals(this.cli, svamlActionConnectPstn.cli)
- && Objects.equals(this.suppressCallbacks, svamlActionConnectPstn.suppressCallbacks)
- && Objects.equals(this.dtmf, svamlActionConnectPstn.dtmf)
- && Objects.equals(this.indications, svamlActionConnectPstn.indications)
- && Objects.equals(this.amd, svamlActionConnectPstn.amd);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- name,
- number,
- locale,
- maxDuration,
- dialTimeout,
- cli,
- suppressCallbacks,
- dtmf,
- indications,
- amd);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionConnectPstnDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" number: ").append(toIndentedString(number)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append(" maxDuration: ").append(toIndentedString(maxDuration)).append("\n");
- sb.append(" dialTimeout: ").append(toIndentedString(dialTimeout)).append("\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" suppressCallbacks: ").append(toIndentedString(suppressCallbacks)).append("\n");
- sb.append(" dtmf: ").append(toIndentedString(dtmf)).append("\n");
- sb.append(" indications: ").append(toIndentedString(indications)).append("\n");
- sb.append(" amd: ").append(toIndentedString(amd)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectSipDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectSipDto.java
deleted file mode 100644
index 5b59ee5a2..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionConnectSipDto.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Determines how to route a call to a SIP server. Available to use in a response to an [Incoming
- * Call Event](../../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
- */
-@JsonPropertyOrder({
- SvamlActionConnectSipDto.JSON_PROPERTY_NAME,
- SvamlActionConnectSipDto.JSON_PROPERTY_DESTINATION,
- SvamlActionConnectSipDto.JSON_PROPERTY_MAX_DURATION,
- SvamlActionConnectSipDto.JSON_PROPERTY_CLI,
- SvamlActionConnectSipDto.JSON_PROPERTY_TRANSPORT,
- SvamlActionConnectSipDto.JSON_PROPERTY_SUPPRESS_CALLBACKS,
- SvamlActionConnectSipDto.JSON_PROPERTY_CALL_HEADERS,
- SvamlActionConnectSipDto.JSON_PROPERTY_MOH
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionConnectSipDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `connectSip`. */
- public enum NameEnum {
- CONNECTSIP("connectSip"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_DESTINATION = "destination";
- private DestinationDto destination;
- private boolean destinationDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DURATION = "maxDuration";
- private Integer maxDuration;
- private boolean maxDurationDefined = false;
-
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_TRANSPORT = "transport";
- private String transport;
- private boolean transportDefined = false;
-
- public static final String JSON_PROPERTY_SUPPRESS_CALLBACKS = "suppressCallbacks";
- private Boolean suppressCallbacks;
- private boolean suppressCallbacksDefined = false;
-
- public static final String JSON_PROPERTY_CALL_HEADERS = "callHeaders";
- private List callHeaders;
- private boolean callHeadersDefined = false;
-
- public static final String JSON_PROPERTY_MOH = "moh";
- private String moh;
- private boolean mohDefined = false;
-
- public SvamlActionConnectSipDto() {}
-
- public SvamlActionConnectSipDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `connectSip`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlActionConnectSipDto destination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- return this;
- }
-
- /**
- * Get destination
- *
- * @return destination
- */
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public DestinationDto getDestination() {
- return destination;
- }
-
- @JsonIgnore
- public boolean getDestinationDefined() {
- return destinationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setDestination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- }
-
- public SvamlActionConnectSipDto maxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- return this;
- }
-
- /**
- * The max duration of the call in seconds (max 14400 seconds). If the call is still connected at
- * that time, it will be automatically disconnected.
- *
- * @return maxDuration
- */
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDuration() {
- return maxDuration;
- }
-
- @JsonIgnore
- public boolean getMaxDurationDefined() {
- return maxDurationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- }
-
- public SvamlActionConnectSipDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * Used to override the CLI (or caller ID) of the client. The phone number of the person who
- * initiated the call is shown as the CLI. To set your own CLI, you may use your verified number
- * or your Dashboard virtual number.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public SvamlActionConnectSipDto transport(String transport) {
- this.transport = transport;
- this.transportDefined = true;
- return this;
- }
-
- /**
- * An optional parameter to specify the SIP transport protocol. If unspecified, UDP is used.
- *
- * @return transport
- */
- @JsonProperty(JSON_PROPERTY_TRANSPORT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getTransport() {
- return transport;
- }
-
- @JsonIgnore
- public boolean getTransportDefined() {
- return transportDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TRANSPORT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTransport(String transport) {
- this.transport = transport;
- this.transportDefined = true;
- }
-
- public SvamlActionConnectSipDto suppressCallbacks(Boolean suppressCallbacks) {
- this.suppressCallbacks = suppressCallbacks;
- this.suppressCallbacksDefined = true;
- return this;
- }
-
- /**
- * If enabled, suppresses [ACE](../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) and
- * [DICE](../../voice/tag/Callbacks/#tag/Callbacks/operation/dice) callbacks for the call.
- *
- * @return suppressCallbacks
- */
- @JsonProperty(JSON_PROPERTY_SUPPRESS_CALLBACKS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getSuppressCallbacks() {
- return suppressCallbacks;
- }
-
- @JsonIgnore
- public boolean getSuppressCallbacksDefined() {
- return suppressCallbacksDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_SUPPRESS_CALLBACKS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setSuppressCallbacks(Boolean suppressCallbacks) {
- this.suppressCallbacks = suppressCallbacks;
- this.suppressCallbacksDefined = true;
- }
-
- public SvamlActionConnectSipDto callHeaders(List callHeaders) {
- this.callHeaders = callHeaders;
- this.callHeadersDefined = true;
- return this;
- }
-
- public SvamlActionConnectSipDto addCallHeadersItem(CallHeaderDto callHeadersItem) {
- if (this.callHeaders == null) {
- this.callHeaders = new ArrayList<>();
- }
- this.callHeadersDefined = true;
- this.callHeaders.add(callHeadersItem);
- return this;
- }
-
- /**
- * [Private SIP
- * headers](../../sip-trunking/#receiving-calls-from-sinch-platform-to-your-sip-infrastructure) to
- * send with the call.
- *
- * @return callHeaders
- */
- @JsonProperty(JSON_PROPERTY_CALL_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getCallHeaders() {
- return callHeaders;
- }
-
- @JsonIgnore
- public boolean getCallHeadersDefined() {
- return callHeadersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CALL_HEADERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCallHeaders(List callHeaders) {
- this.callHeaders = callHeaders;
- this.callHeadersDefined = true;
- }
-
- public SvamlActionConnectSipDto moh(String moh) {
- this.moh = moh;
- this.mohDefined = true;
- return this;
- }
-
- /**
- * Means \"music on hold\". If this optional parameter is included, plays music to the
- * connected participant if the SIP call is placed on hold. If `moh` isn't specified
- * and the SIP call is placed on hold, the user will only hear silence while during the holding
- * period .
- *
- * @return moh
- */
- @JsonProperty(JSON_PROPERTY_MOH)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMoh() {
- return moh;
- }
-
- @JsonIgnore
- public boolean getMohDefined() {
- return mohDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MOH)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMoh(String moh) {
- this.moh = moh;
- this.mohDefined = true;
- }
-
- /** Return true if this svaml.action.connectSip object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionConnectSipDto svamlActionConnectSip = (SvamlActionConnectSipDto) o;
- return Objects.equals(this.name, svamlActionConnectSip.name)
- && Objects.equals(this.destination, svamlActionConnectSip.destination)
- && Objects.equals(this.maxDuration, svamlActionConnectSip.maxDuration)
- && Objects.equals(this.cli, svamlActionConnectSip.cli)
- && Objects.equals(this.transport, svamlActionConnectSip.transport)
- && Objects.equals(this.suppressCallbacks, svamlActionConnectSip.suppressCallbacks)
- && Objects.equals(this.callHeaders, svamlActionConnectSip.callHeaders)
- && Objects.equals(this.moh, svamlActionConnectSip.moh);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- name, destination, maxDuration, cli, transport, suppressCallbacks, callHeaders, moh);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionConnectSipDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
- sb.append(" maxDuration: ").append(toIndentedString(maxDuration)).append("\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" transport: ").append(toIndentedString(transport)).append("\n");
- sb.append(" suppressCallbacks: ").append(toIndentedString(suppressCallbacks)).append("\n");
- sb.append(" callHeaders: ").append(toIndentedString(callHeaders)).append("\n");
- sb.append(" moh: ").append(toIndentedString(moh)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionContinueDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionContinueDto.java
deleted file mode 100644
index 04bdfd0d4..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionContinueDto.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Continues to set up a call. Available to use in a response to an [Answered Call
- * Event](../../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback.
- */
-@JsonPropertyOrder({SvamlActionContinueDto.JSON_PROPERTY_NAME})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionContinueDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `continue`. */
- public enum NameEnum {
- CONTINUE("continue"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public SvamlActionContinueDto() {}
-
- public SvamlActionContinueDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `continue`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- /** Return true if this svaml.action.continue object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionContinueDto svamlActionContinue = (SvamlActionContinueDto) o;
- return Objects.equals(this.name, svamlActionContinue.name);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionContinueDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionDto.java
deleted file mode 100644
index ce3184d87..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionDto.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-import com.sinch.sdk.core.models.AbstractOpenApiSchema;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-@JsonDeserialize(using = SvamlActionDto.SvamlActionDtoDeserializer.class)
-@JsonSerialize(using = SvamlActionDto.SvamlActionDtoSerializer.class)
-public final class SvamlActionDto extends AbstractOpenApiSchema {
- private static final Logger log = Logger.getLogger(SvamlActionDto.class.getName());
-
- public static final class SvamlActionDtoSerializer extends StdSerializer {
- private static final long serialVersionUID = 1L;
-
- public SvamlActionDtoSerializer(Class t) {
- super(t);
- }
-
- public SvamlActionDtoSerializer() {
- this(null);
- }
-
- @Override
- public void serialize(SvamlActionDto value, JsonGenerator jgen, SerializerProvider provider)
- throws IOException, JsonProcessingException {
- jgen.writeObject(value.getActualInstance());
- }
- }
-
- public static final class SvamlActionDtoDeserializer extends StdDeserializer {
- private static final long serialVersionUID = 1L;
-
- public SvamlActionDtoDeserializer() {
- this(SvamlActionDto.class);
- }
-
- public SvamlActionDtoDeserializer(Class> vc) {
- super(vc);
- }
-
- @Override
- public SvamlActionDto deserialize(JsonParser jp, DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
- JsonNode tree = jp.readValueAsTree();
-
- Object deserialized = null;
- Class> cls = JSONNavigator.getClassForElement(tree, SvamlActionDto.class);
- if (cls != null) {
- // When the OAS schema includes a discriminator, use the discriminator value to
- // discriminate the anyOf schemas.
- // Get the discriminator mapping value to get the class.
- deserialized = tree.traverse(jp.getCodec()).readValueAs(cls);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- }
- // deserialize SvamlActionConnectConfDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionConnectConfDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionConnectMxpDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionConnectMxpDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionConnectPstnDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionConnectPstnDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionConnectSipDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionConnectSipDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionContinueDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionContinueDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionHangupDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionHangupDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionParkDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionParkDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- // deserialize SvamlActionRunMenuDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlActionRunMenuDto.class);
- SvamlActionDto ret = new SvamlActionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlActionDto'", e);
- }
-
- throw new IOException(
- String.format("Failed deserialization for SvamlActionDto: no match found"));
- }
-
- /** Handle deserialization of the 'null' value. */
- @Override
- public SvamlActionDto getNullValue(DeserializationContext ctxt) throws JsonMappingException {
- throw new JsonMappingException(ctxt.getParser(), "SvamlActionDto cannot be null");
- }
- }
-
- // store a list of schema names defined in anyOf
- public static final Map> schemas = new HashMap>();
-
- public SvamlActionDto() {
- super("anyOf", Boolean.FALSE);
- }
-
- public SvamlActionDto(SvamlActionConnectConfDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionConnectMxpDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionConnectPstnDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionConnectSipDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionContinueDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionHangupDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionParkDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlActionDto(SvamlActionRunMenuDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- static {
- schemas.put("SvamlActionConnectConfDto", SvamlActionConnectConfDto.class);
- schemas.put("SvamlActionConnectMxpDto", SvamlActionConnectMxpDto.class);
- schemas.put("SvamlActionConnectPstnDto", SvamlActionConnectPstnDto.class);
- schemas.put("SvamlActionConnectSipDto", SvamlActionConnectSipDto.class);
- schemas.put("SvamlActionContinueDto", SvamlActionContinueDto.class);
- schemas.put("SvamlActionHangupDto", SvamlActionHangupDto.class);
- schemas.put("SvamlActionParkDto", SvamlActionParkDto.class);
- schemas.put("SvamlActionRunMenuDto", SvamlActionRunMenuDto.class);
- JSONNavigator.registerDescendants(SvamlActionDto.class, Collections.unmodifiableMap(schemas));
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("connectConf", SvamlActionConnectConfDto.class);
- mappings.put("connectMxp", SvamlActionConnectMxpDto.class);
- mappings.put("connectPstn", SvamlActionConnectPstnDto.class);
- mappings.put("connectSip", SvamlActionConnectSipDto.class);
- mappings.put("continue", SvamlActionContinueDto.class);
- mappings.put("hangup", SvamlActionHangupDto.class);
- mappings.put("park", SvamlActionParkDto.class);
- mappings.put("runMenu", SvamlActionRunMenuDto.class);
- mappings.put("svaml.action.connectConf", SvamlActionConnectConfDto.class);
- mappings.put("svaml.action.connectMxp", SvamlActionConnectMxpDto.class);
- mappings.put("svaml.action.connectPstn", SvamlActionConnectPstnDto.class);
- mappings.put("svaml.action.connectSip", SvamlActionConnectSipDto.class);
- mappings.put("svaml.action.continue", SvamlActionContinueDto.class);
- mappings.put("svaml.action.hangup", SvamlActionHangupDto.class);
- mappings.put("svaml.action.park", SvamlActionParkDto.class);
- mappings.put("svaml.action.runMenu", SvamlActionRunMenuDto.class);
- mappings.put("svaml.action", SvamlActionDto.class);
- JSONNavigator.registerDiscriminator(SvamlActionDto.class, "name", mappings);
- }
-
- @Override
- public Map> getSchemas() {
- return SvamlActionDto.schemas;
- }
-
- /**
- * Set the instance that matches the anyOf child schema, check the instance parameter is valid
- * against the anyOf child schemas: SvamlActionConnectConfDto, SvamlActionConnectMxpDto,
- * SvamlActionConnectPstnDto, SvamlActionConnectSipDto, SvamlActionContinueDto,
- * SvamlActionHangupDto, SvamlActionParkDto, SvamlActionRunMenuDto
- *
- * It could be an instance of the 'anyOf' schemas. The anyOf child schemas may themselves be a
- * composed schema (allOf, anyOf, anyOf).
- */
- @Override
- public void setActualInstance(Object instance) {
- if (JSONNavigator.isInstanceOf(
- SvamlActionConnectConfDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlActionConnectMxpDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlActionConnectPstnDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlActionConnectSipDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlActionContinueDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(SvamlActionHangupDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(SvamlActionParkDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlActionRunMenuDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- throw new RuntimeException(
- "Invalid instance type. Must be SvamlActionConnectConfDto, SvamlActionConnectMxpDto,"
- + " SvamlActionConnectPstnDto, SvamlActionConnectSipDto, SvamlActionContinueDto,"
- + " SvamlActionHangupDto, SvamlActionParkDto, SvamlActionRunMenuDto");
- }
-
- /**
- * Get the actual instance, which can be the following: SvamlActionConnectConfDto,
- * SvamlActionConnectMxpDto, SvamlActionConnectPstnDto, SvamlActionConnectSipDto,
- * SvamlActionContinueDto, SvamlActionHangupDto, SvamlActionParkDto, SvamlActionRunMenuDto
- *
- * @return The actual instance (SvamlActionConnectConfDto, SvamlActionConnectMxpDto,
- * SvamlActionConnectPstnDto, SvamlActionConnectSipDto, SvamlActionContinueDto,
- * SvamlActionHangupDto, SvamlActionParkDto, SvamlActionRunMenuDto)
- */
- @Override
- public Object getActualInstance() {
- return super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionConnectConfDto`. If the actual instance is not
- * `SvamlActionConnectConfDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionConnectConfDto`
- * @throws ClassCastException if the instance is not `SvamlActionConnectConfDto`
- */
- public SvamlActionConnectConfDto getSvamlActionConnectConfDto() throws ClassCastException {
- return (SvamlActionConnectConfDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionConnectMxpDto`. If the actual instance is not
- * `SvamlActionConnectMxpDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionConnectMxpDto`
- * @throws ClassCastException if the instance is not `SvamlActionConnectMxpDto`
- */
- public SvamlActionConnectMxpDto getSvamlActionConnectMxpDto() throws ClassCastException {
- return (SvamlActionConnectMxpDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionConnectPstnDto`. If the actual instance is not
- * `SvamlActionConnectPstnDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionConnectPstnDto`
- * @throws ClassCastException if the instance is not `SvamlActionConnectPstnDto`
- */
- public SvamlActionConnectPstnDto getSvamlActionConnectPstnDto() throws ClassCastException {
- return (SvamlActionConnectPstnDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionConnectSipDto`. If the actual instance is not
- * `SvamlActionConnectSipDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionConnectSipDto`
- * @throws ClassCastException if the instance is not `SvamlActionConnectSipDto`
- */
- public SvamlActionConnectSipDto getSvamlActionConnectSipDto() throws ClassCastException {
- return (SvamlActionConnectSipDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionContinueDto`. If the actual instance is not
- * `SvamlActionContinueDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionContinueDto`
- * @throws ClassCastException if the instance is not `SvamlActionContinueDto`
- */
- public SvamlActionContinueDto getSvamlActionContinueDto() throws ClassCastException {
- return (SvamlActionContinueDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionHangupDto`. If the actual instance is not
- * `SvamlActionHangupDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionHangupDto`
- * @throws ClassCastException if the instance is not `SvamlActionHangupDto`
- */
- public SvamlActionHangupDto getSvamlActionHangupDto() throws ClassCastException {
- return (SvamlActionHangupDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionParkDto`. If the actual instance is not
- * `SvamlActionParkDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionParkDto`
- * @throws ClassCastException if the instance is not `SvamlActionParkDto`
- */
- public SvamlActionParkDto getSvamlActionParkDto() throws ClassCastException {
- return (SvamlActionParkDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlActionRunMenuDto`. If the actual instance is not
- * `SvamlActionRunMenuDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlActionRunMenuDto`
- * @throws ClassCastException if the instance is not `SvamlActionRunMenuDto`
- */
- public SvamlActionRunMenuDto getSvamlActionRunMenuDto() throws ClassCastException {
- return (SvamlActionRunMenuDto) super.getActualInstance();
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionHangupDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionHangupDto.java
deleted file mode 100644
index 2f3d052f9..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionHangupDto.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Hangs up a call. Available to use in a response to an [Incoming Call
- * Event](../../../docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice)
- * callback or an [Answered Call
- * Event](../../../docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace)
- * callback.
- */
-@JsonPropertyOrder({SvamlActionHangupDto.JSON_PROPERTY_NAME})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionHangupDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `hangup`. */
- public enum NameEnum {
- HANGUP("hangup"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public SvamlActionHangupDto() {}
-
- public SvamlActionHangupDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `hangup`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- /** Return true if this svaml.action.hangup object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionHangupDto svamlActionHangup = (SvamlActionHangupDto) o;
- return Objects.equals(this.name, svamlActionHangup.name);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionHangupDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionParkDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionParkDto.java
deleted file mode 100644
index fb9331ef7..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionParkDto.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Parks the call and places the caller on hold. The caller is placed into a loop, listening to an
- * IVR prompt (either a pre-recorded audio file or generated by text to speech). If the call is
- * unparked, prompts will stop playing immediately. If the max duration is reached, the last prompt
- * will be fully played until the call ends.
- */
-@JsonPropertyOrder({
- SvamlActionParkDto.JSON_PROPERTY_NAME,
- SvamlActionParkDto.JSON_PROPERTY_LOCALE,
- SvamlActionParkDto.JSON_PROPERTY_INTRO_PROMPT,
- SvamlActionParkDto.JSON_PROPERTY_HOLD_PROMPT,
- SvamlActionParkDto.JSON_PROPERTY_MAX_DURATION
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionParkDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `park`. */
- public enum NameEnum {
- PARK("park"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public static final String JSON_PROPERTY_INTRO_PROMPT = "introPrompt";
- private String introPrompt;
- private boolean introPromptDefined = false;
-
- public static final String JSON_PROPERTY_HOLD_PROMPT = "holdPrompt";
- private String holdPrompt;
- private boolean holdPromptDefined = false;
-
- public static final String JSON_PROPERTY_MAX_DURATION = "maxDuration";
- private Integer maxDuration;
- private boolean maxDurationDefined = false;
-
- public SvamlActionParkDto() {}
-
- public SvamlActionParkDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `park`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlActionParkDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * The voice and language you want to use for the text-to-speech message. This can either be
- * defined by the ISO 639 locale and language code or by specifying a particular voice. Supported
- * languages and voices are detailed [here](../../voice-locales).
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- public SvamlActionParkDto introPrompt(String introPrompt) {
- this.introPrompt = introPrompt;
- this.introPromptDefined = true;
- return this;
- }
-
- /**
- * That prompt that is played when the call is first answered. You can use text-to-speech using
- * the `#tts[]` element, SSML commands using the `#ssml[]` element.
- *
- * @return introPrompt
- */
- @JsonProperty(JSON_PROPERTY_INTRO_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getIntroPrompt() {
- return introPrompt;
- }
-
- @JsonIgnore
- public boolean getIntroPromptDefined() {
- return introPromptDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_INTRO_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setIntroPrompt(String introPrompt) {
- this.introPrompt = introPrompt;
- this.introPromptDefined = true;
- }
-
- public SvamlActionParkDto holdPrompt(String holdPrompt) {
- this.holdPrompt = holdPrompt;
- this.holdPromptDefined = true;
- return this;
- }
-
- /**
- * The prompt that is played on repeat until the call is unparked or the until the
- * `maxDuration` value is reached. You can use text-to-speech using the
- * `#tts[]` element, SSML commands using the `#ssml[]` element.
- *
- * @return holdPrompt
- */
- @JsonProperty(JSON_PROPERTY_HOLD_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getHoldPrompt() {
- return holdPrompt;
- }
-
- @JsonIgnore
- public boolean getHoldPromptDefined() {
- return holdPromptDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_HOLD_PROMPT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setHoldPrompt(String holdPrompt) {
- this.holdPrompt = holdPrompt;
- this.holdPromptDefined = true;
- }
-
- public SvamlActionParkDto maxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- return this;
- }
-
- /**
- * The maximum amount of time in seconds that the `holdPrompt` will be played.
- *
- * @return maxDuration
- */
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Integer getMaxDuration() {
- return maxDuration;
- }
-
- @JsonIgnore
- public boolean getMaxDurationDefined() {
- return maxDurationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAX_DURATION)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMaxDuration(Integer maxDuration) {
- this.maxDuration = maxDuration;
- this.maxDurationDefined = true;
- }
-
- /** Return true if this svaml.action.park object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionParkDto svamlActionPark = (SvamlActionParkDto) o;
- return Objects.equals(this.name, svamlActionPark.name)
- && Objects.equals(this.locale, svamlActionPark.locale)
- && Objects.equals(this.introPrompt, svamlActionPark.introPrompt)
- && Objects.equals(this.holdPrompt, svamlActionPark.holdPrompt)
- && Objects.equals(this.maxDuration, svamlActionPark.maxDuration);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, locale, introPrompt, holdPrompt, maxDuration);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionParkDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append(" introPrompt: ").append(toIndentedString(introPrompt)).append("\n");
- sb.append(" holdPrompt: ").append(toIndentedString(holdPrompt)).append("\n");
- sb.append(" maxDuration: ").append(toIndentedString(maxDuration)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionRunMenuDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionRunMenuDto.java
deleted file mode 100644
index 180907f3c..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlActionRunMenuDto.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Plays an interactive voice response (IVR) menu to the callee. This menu can play pre-recorded
- * files or text-to-speech messages, collect DTMF tones, and trigger the [Prompt Input
- * Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/pie) (PIE) callback towards your
- * backend, notifying you of the actions the callee took. Available to use in a response to an
- * [Incoming Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback or an
- * [Answered Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback. Also be
- * used in combination with the
- * [Conferences](/docs/voice/api-reference/voice/tag/Conferences/#tag/Conferences) endpoint of the
- * Calling API.
- */
-@JsonPropertyOrder({
- SvamlActionRunMenuDto.JSON_PROPERTY_NAME,
- SvamlActionRunMenuDto.JSON_PROPERTY_BARGE,
- SvamlActionRunMenuDto.JSON_PROPERTY_LOCALE,
- SvamlActionRunMenuDto.JSON_PROPERTY_MAIN_MENU,
- SvamlActionRunMenuDto.JSON_PROPERTY_ENABLE_VOICE,
- SvamlActionRunMenuDto.JSON_PROPERTY_MENUS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlActionRunMenuDto {
- private static final long serialVersionUID = 1L;
-
- /** The name property. Must have the value `runMenu`. */
- public enum NameEnum {
- RUNMENU("runMenu"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_BARGE = "barge";
- private Boolean barge;
- private boolean bargeDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public static final String JSON_PROPERTY_MAIN_MENU = "mainMenu";
- private String mainMenu;
- private boolean mainMenuDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_VOICE = "enableVoice";
- private Boolean enableVoice;
- private boolean enableVoiceDefined = false;
-
- public static final String JSON_PROPERTY_MENUS = "menus";
- private List menus;
- private boolean menusDefined = false;
-
- public SvamlActionRunMenuDto() {}
-
- public SvamlActionRunMenuDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The name property. Must have the value `runMenu`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlActionRunMenuDto barge(Boolean barge) {
- this.barge = barge;
- this.bargeDefined = true;
- return this;
- }
-
- /**
- * 'Barging' means that the user can press a DTMF digit before the prompt has finished
- * playing. If a valid input is pressed, the message will stop playing and accept the input. If
- * `barge` is disabled, the user must listen to the entire prompt before input is
- * accepted. By default, barging is enabled.
- *
- * @return barge
- */
- @JsonProperty(JSON_PROPERTY_BARGE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getBarge() {
- return barge;
- }
-
- @JsonIgnore
- public boolean getBargeDefined() {
- return bargeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_BARGE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setBarge(Boolean barge) {
- this.barge = barge;
- this.bargeDefined = true;
- }
-
- public SvamlActionRunMenuDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * The voice and language you want to use for the text-to-speech message. This can either be
- * defined by the ISO 639 locale and language code or by specifying a particular voice. Supported
- * languages and voices are detailed [here](../../voice-locales). If using the
- * `enableVoice` to enable voice detection, the `locale` property is required
- * in order to select the input language.
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- public SvamlActionRunMenuDto mainMenu(String mainMenu) {
- this.mainMenu = mainMenu;
- this.mainMenuDefined = true;
- return this;
- }
-
- /**
- * Selects the menu item from the `menus` array to play first.
- *
- * @return mainMenu
- */
- @JsonProperty(JSON_PROPERTY_MAIN_MENU)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getMainMenu() {
- return mainMenu;
- }
-
- @JsonIgnore
- public boolean getMainMenuDefined() {
- return mainMenuDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MAIN_MENU)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMainMenu(String mainMenu) {
- this.mainMenu = mainMenu;
- this.mainMenuDefined = true;
- }
-
- public SvamlActionRunMenuDto enableVoice(Boolean enableVoice) {
- this.enableVoice = enableVoice;
- this.enableVoiceDefined = true;
- return this;
- }
-
- /**
- * Enables voice detection. If enabled, users can say their answers to prompts in addition to
- * entering them using the keypad.
- *
- * @return enableVoice
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_VOICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnableVoice() {
- return enableVoice;
- }
-
- @JsonIgnore
- public boolean getEnableVoiceDefined() {
- return enableVoiceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_VOICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnableVoice(Boolean enableVoice) {
- this.enableVoice = enableVoice;
- this.enableVoiceDefined = true;
- }
-
- public SvamlActionRunMenuDto menus(List menus) {
- this.menus = menus;
- this.menusDefined = true;
- return this;
- }
-
- public SvamlActionRunMenuDto addMenusItem(MenuDto menusItem) {
- if (this.menus == null) {
- this.menus = new ArrayList<>();
- }
- this.menusDefined = true;
- this.menus.add(menusItem);
- return this;
- }
-
- /**
- * The list of menus available. The menu with the `id` value of `main` will
- * always play first. If no menu has an `id` value of `main`, an error is
- * returned.
- *
- * @return menus
- */
- @JsonProperty(JSON_PROPERTY_MENUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getMenus() {
- return menus;
- }
-
- @JsonIgnore
- public boolean getMenusDefined() {
- return menusDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_MENUS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setMenus(List menus) {
- this.menus = menus;
- this.menusDefined = true;
- }
-
- /** Return true if this svaml.action.runMenu object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlActionRunMenuDto svamlActionRunMenu = (SvamlActionRunMenuDto) o;
- return Objects.equals(this.name, svamlActionRunMenu.name)
- && Objects.equals(this.barge, svamlActionRunMenu.barge)
- && Objects.equals(this.locale, svamlActionRunMenu.locale)
- && Objects.equals(this.mainMenu, svamlActionRunMenu.mainMenu)
- && Objects.equals(this.enableVoice, svamlActionRunMenu.enableVoice)
- && Objects.equals(this.menus, svamlActionRunMenu.menus);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, barge, locale, mainMenu, enableVoice, menus);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlActionRunMenuDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" barge: ").append(toIndentedString(barge)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append(" mainMenu: ").append(toIndentedString(mainMenu)).append("\n");
- sb.append(" enableVoice: ").append(toIndentedString(enableVoice)).append("\n");
- sb.append(" menus: ").append(toIndentedString(menus)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionAnswerDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionAnswerDto.java
deleted file mode 100644
index 09fc11ce3..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionAnswerDto.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** Forces the callee to answer the call. */
-@JsonPropertyOrder({SvamlInstructionAnswerDto.JSON_PROPERTY_NAME})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionAnswerDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `answer`. */
- public enum NameEnum {
- ANSWER("answer"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public SvamlInstructionAnswerDto() {}
-
- public SvamlInstructionAnswerDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `answer`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- /** Return true if this svaml.instruction.answer object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionAnswerDto svamlInstructionAnswer = (SvamlInstructionAnswerDto) o;
- return Objects.equals(this.name, svamlInstructionAnswer.name);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionAnswerDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionDto.java
deleted file mode 100644
index 291d36b6b..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionDto.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-import com.sinch.sdk.core.models.AbstractOpenApiSchema;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-@JsonDeserialize(using = SvamlInstructionDto.SvamlInstructionDtoDeserializer.class)
-@JsonSerialize(using = SvamlInstructionDto.SvamlInstructionDtoSerializer.class)
-public final class SvamlInstructionDto extends AbstractOpenApiSchema {
- private static final Logger log = Logger.getLogger(SvamlInstructionDto.class.getName());
-
- public static final class SvamlInstructionDtoSerializer
- extends StdSerializer {
- private static final long serialVersionUID = 1L;
-
- public SvamlInstructionDtoSerializer(Class t) {
- super(t);
- }
-
- public SvamlInstructionDtoSerializer() {
- this(null);
- }
-
- @Override
- public void serialize(
- SvamlInstructionDto value, JsonGenerator jgen, SerializerProvider provider)
- throws IOException, JsonProcessingException {
- jgen.writeObject(value.getActualInstance());
- }
- }
-
- public static final class SvamlInstructionDtoDeserializer
- extends StdDeserializer {
- private static final long serialVersionUID = 1L;
-
- public SvamlInstructionDtoDeserializer() {
- this(SvamlInstructionDto.class);
- }
-
- public SvamlInstructionDtoDeserializer(Class> vc) {
- super(vc);
- }
-
- @Override
- public SvamlInstructionDto deserialize(JsonParser jp, DeserializationContext ctxt)
- throws IOException, JsonProcessingException {
- JsonNode tree = jp.readValueAsTree();
-
- Object deserialized = null;
- Class> cls = JSONNavigator.getClassForElement(tree, SvamlInstructionDto.class);
- if (cls != null) {
- // When the OAS schema includes a discriminator, use the discriminator value to
- // discriminate the anyOf schemas.
- // Get the discriminator mapping value to get the class.
- deserialized = tree.traverse(jp.getCodec()).readValueAs(cls);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- }
- // deserialize SvamlInstructionAnswerDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionAnswerDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- // deserialize SvamlInstructionPlayFilesDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionPlayFilesDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- // deserialize SvamlInstructionSayDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionSayDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- // deserialize SvamlInstructionSendDtmfDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionSendDtmfDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- // deserialize SvamlInstructionSetCookieDto
- try {
- deserialized = tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionSetCookieDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- // deserialize SvamlInstructionStartRecordingDto
- try {
- deserialized =
- tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionStartRecordingDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- // deserialize SvamlInstructionStopRecordingDto
- try {
- deserialized =
- tree.traverse(jp.getCodec()).readValueAs(SvamlInstructionStopRecordingDto.class);
- SvamlInstructionDto ret = new SvamlInstructionDto();
- ret.setActualInstance(deserialized);
- return ret;
- } catch (Exception e) {
- // deserialization failed, continue, log to help debugging
- log.log(Level.FINER, "Input data does not match 'SvamlInstructionDto'", e);
- }
-
- throw new IOException(
- String.format("Failed deserialization for SvamlInstructionDto: no match found"));
- }
-
- /** Handle deserialization of the 'null' value. */
- @Override
- public SvamlInstructionDto getNullValue(DeserializationContext ctxt)
- throws JsonMappingException {
- throw new JsonMappingException(ctxt.getParser(), "SvamlInstructionDto cannot be null");
- }
- }
-
- // store a list of schema names defined in anyOf
- public static final Map> schemas = new HashMap>();
-
- public SvamlInstructionDto() {
- super("anyOf", Boolean.FALSE);
- }
-
- public SvamlInstructionDto(SvamlInstructionAnswerDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlInstructionDto(SvamlInstructionPlayFilesDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlInstructionDto(SvamlInstructionSayDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlInstructionDto(SvamlInstructionSendDtmfDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlInstructionDto(SvamlInstructionSetCookieDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlInstructionDto(SvamlInstructionStartRecordingDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- public SvamlInstructionDto(SvamlInstructionStopRecordingDto o) {
- super("anyOf", Boolean.FALSE);
- setActualInstance(o);
- }
-
- static {
- schemas.put("SvamlInstructionAnswerDto", SvamlInstructionAnswerDto.class);
- schemas.put("SvamlInstructionPlayFilesDto", SvamlInstructionPlayFilesDto.class);
- schemas.put("SvamlInstructionSayDto", SvamlInstructionSayDto.class);
- schemas.put("SvamlInstructionSendDtmfDto", SvamlInstructionSendDtmfDto.class);
- schemas.put("SvamlInstructionSetCookieDto", SvamlInstructionSetCookieDto.class);
- schemas.put("SvamlInstructionStartRecordingDto", SvamlInstructionStartRecordingDto.class);
- schemas.put("SvamlInstructionStopRecordingDto", SvamlInstructionStopRecordingDto.class);
- JSONNavigator.registerDescendants(
- SvamlInstructionDto.class, Collections.unmodifiableMap(schemas));
- // Initialize and register the discriminator mappings.
- Map> mappings = new HashMap>();
- mappings.put("answer", SvamlInstructionAnswerDto.class);
- mappings.put("playFiles", SvamlInstructionPlayFilesDto.class);
- mappings.put("say", SvamlInstructionSayDto.class);
- mappings.put("sendDtmf", SvamlInstructionSendDtmfDto.class);
- mappings.put("setCookie", SvamlInstructionSetCookieDto.class);
- mappings.put("startRecording", SvamlInstructionStartRecordingDto.class);
- mappings.put("stopRecording", SvamlInstructionStopRecordingDto.class);
- mappings.put("svaml.instruction.answer", SvamlInstructionAnswerDto.class);
- mappings.put("svaml.instruction.playFiles", SvamlInstructionPlayFilesDto.class);
- mappings.put("svaml.instruction.say", SvamlInstructionSayDto.class);
- mappings.put("svaml.instruction.sendDtmf", SvamlInstructionSendDtmfDto.class);
- mappings.put("svaml.instruction.setCookie", SvamlInstructionSetCookieDto.class);
- mappings.put("svaml.instruction.startRecording", SvamlInstructionStartRecordingDto.class);
- mappings.put("svaml.instruction.stopRecording", SvamlInstructionStopRecordingDto.class);
- mappings.put("svaml.instruction", SvamlInstructionDto.class);
- JSONNavigator.registerDiscriminator(SvamlInstructionDto.class, "name", mappings);
- }
-
- @Override
- public Map> getSchemas() {
- return SvamlInstructionDto.schemas;
- }
-
- /**
- * Set the instance that matches the anyOf child schema, check the instance parameter is valid
- * against the anyOf child schemas: SvamlInstructionAnswerDto, SvamlInstructionPlayFilesDto,
- * SvamlInstructionSayDto, SvamlInstructionSendDtmfDto, SvamlInstructionSetCookieDto,
- * SvamlInstructionStartRecordingDto, SvamlInstructionStopRecordingDto
- *
- * It could be an instance of the 'anyOf' schemas. The anyOf child schemas may themselves be a
- * composed schema (allOf, anyOf, anyOf).
- */
- @Override
- public void setActualInstance(Object instance) {
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionAnswerDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionPlayFilesDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionSayDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionSendDtmfDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionSetCookieDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionStartRecordingDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- if (JSONNavigator.isInstanceOf(
- SvamlInstructionStopRecordingDto.class, instance, new HashSet>())) {
- super.setActualInstance(instance);
- return;
- }
-
- throw new RuntimeException(
- "Invalid instance type. Must be SvamlInstructionAnswerDto, SvamlInstructionPlayFilesDto,"
- + " SvamlInstructionSayDto, SvamlInstructionSendDtmfDto, SvamlInstructionSetCookieDto,"
- + " SvamlInstructionStartRecordingDto, SvamlInstructionStopRecordingDto");
- }
-
- /**
- * Get the actual instance, which can be the following: SvamlInstructionAnswerDto,
- * SvamlInstructionPlayFilesDto, SvamlInstructionSayDto, SvamlInstructionSendDtmfDto,
- * SvamlInstructionSetCookieDto, SvamlInstructionStartRecordingDto,
- * SvamlInstructionStopRecordingDto
- *
- * @return The actual instance (SvamlInstructionAnswerDto, SvamlInstructionPlayFilesDto,
- * SvamlInstructionSayDto, SvamlInstructionSendDtmfDto, SvamlInstructionSetCookieDto,
- * SvamlInstructionStartRecordingDto, SvamlInstructionStopRecordingDto)
- */
- @Override
- public Object getActualInstance() {
- return super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionAnswerDto`. If the actual instance is not
- * `SvamlInstructionAnswerDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionAnswerDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionAnswerDto`
- */
- public SvamlInstructionAnswerDto getSvamlInstructionAnswerDto() throws ClassCastException {
- return (SvamlInstructionAnswerDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionPlayFilesDto`. If the actual instance is not
- * `SvamlInstructionPlayFilesDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionPlayFilesDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionPlayFilesDto`
- */
- public SvamlInstructionPlayFilesDto getSvamlInstructionPlayFilesDto() throws ClassCastException {
- return (SvamlInstructionPlayFilesDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionSayDto`. If the actual instance is not
- * `SvamlInstructionSayDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionSayDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionSayDto`
- */
- public SvamlInstructionSayDto getSvamlInstructionSayDto() throws ClassCastException {
- return (SvamlInstructionSayDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionSendDtmfDto`. If the actual instance is not
- * `SvamlInstructionSendDtmfDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionSendDtmfDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionSendDtmfDto`
- */
- public SvamlInstructionSendDtmfDto getSvamlInstructionSendDtmfDto() throws ClassCastException {
- return (SvamlInstructionSendDtmfDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionSetCookieDto`. If the actual instance is not
- * `SvamlInstructionSetCookieDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionSetCookieDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionSetCookieDto`
- */
- public SvamlInstructionSetCookieDto getSvamlInstructionSetCookieDto() throws ClassCastException {
- return (SvamlInstructionSetCookieDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionStartRecordingDto`. If the actual instance is not
- * `SvamlInstructionStartRecordingDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionStartRecordingDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionStartRecordingDto`
- */
- public SvamlInstructionStartRecordingDto getSvamlInstructionStartRecordingDto()
- throws ClassCastException {
- return (SvamlInstructionStartRecordingDto) super.getActualInstance();
- }
-
- /**
- * Get the actual instance of `SvamlInstructionStopRecordingDto`. If the actual instance is not
- * `SvamlInstructionStopRecordingDto`, the ClassCastException will be thrown.
- *
- * @return The actual instance of `SvamlInstructionStopRecordingDto`
- * @throws ClassCastException if the instance is not `SvamlInstructionStopRecordingDto`
- */
- public SvamlInstructionStopRecordingDto getSvamlInstructionStopRecordingDto()
- throws ClassCastException {
- return (SvamlInstructionStopRecordingDto) super.getActualInstance();
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionPlayFilesDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionPlayFilesDto.java
deleted file mode 100644
index 78c143e28..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionPlayFilesDto.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Plays Interactive Voice Response (IVR) files for the supported locale or SSML commands at the
- * Sinch backend. An IVR message is played only on the caller's side.
- */
-@JsonPropertyOrder({
- SvamlInstructionPlayFilesDto.JSON_PROPERTY_NAME,
- SvamlInstructionPlayFilesDto.JSON_PROPERTY_IDS,
- SvamlInstructionPlayFilesDto.JSON_PROPERTY_LOCALE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionPlayFilesDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `playFiles`. */
- public enum NameEnum {
- PLAYFILES("playFiles"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_IDS = "ids";
- private List ids;
- private boolean idsDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public SvamlInstructionPlayFilesDto() {}
-
- public SvamlInstructionPlayFilesDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `playFiles`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlInstructionPlayFilesDto ids(List ids) {
- this.ids = ids;
- this.idsDefined = true;
- return this;
- }
-
- public SvamlInstructionPlayFilesDto addIdsItem(String idsItem) {
- if (this.ids == null) {
- this.ids = new ArrayList<>();
- }
- this.idsDefined = true;
- this.ids.add(idsItem);
- return this;
- }
-
- /**
- * The IDs of the files which will be played. These can be a URL to a file, SSML commands using
- * the `#ssml[]` element, or text using the `#tts[]` element.
- *
- * @return ids
- */
- @JsonProperty(JSON_PROPERTY_IDS)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public List getIds() {
- return ids;
- }
-
- @JsonIgnore
- public boolean getIdsDefined() {
- return idsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_IDS)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setIds(List ids) {
- this.ids = ids;
- this.idsDefined = true;
- }
-
- public SvamlInstructionPlayFilesDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * If using SSML or TTS, this is a required field. The voice and language you want to use for the
- * text-to-speech message. This can either be defined by the ISO 639 locale and language code or
- * by specifying a particular voice. Supported languages and voices are detailed
- * [here](../../voice-locales).
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- /** Return true if this svaml.instruction.playFiles object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionPlayFilesDto svamlInstructionPlayFiles = (SvamlInstructionPlayFilesDto) o;
- return Objects.equals(this.name, svamlInstructionPlayFiles.name)
- && Objects.equals(this.ids, svamlInstructionPlayFiles.ids)
- && Objects.equals(this.locale, svamlInstructionPlayFiles.locale);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, ids, locale);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionPlayFilesDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" ids: ").append(toIndentedString(ids)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSayDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSayDto.java
deleted file mode 100644
index 4b22bcfba..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSayDto.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/**
- * Plays a synthesized text-to-speech message to the end user. The message is provided in the text
- * field.
- */
-@JsonPropertyOrder({
- SvamlInstructionSayDto.JSON_PROPERTY_NAME,
- SvamlInstructionSayDto.JSON_PROPERTY_TEXT,
- SvamlInstructionSayDto.JSON_PROPERTY_LOCALE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionSayDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `say`. */
- public enum NameEnum {
- SAY("say"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_TEXT = "text";
- private String text;
- private boolean textDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public SvamlInstructionSayDto() {}
-
- public SvamlInstructionSayDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `say`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlInstructionSayDto text(String text) {
- this.text = text;
- this.textDefined = true;
- return this;
- }
-
- /**
- * Contains the message that will be spoken. Default maximum length is 600 characters. To change
- * this limit, please contact support.
- *
- * @return text
- */
- @JsonProperty(JSON_PROPERTY_TEXT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getText() {
- return text;
- }
-
- @JsonIgnore
- public boolean getTextDefined() {
- return textDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TEXT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setText(String text) {
- this.text = text;
- this.textDefined = true;
- }
-
- public SvamlInstructionSayDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * The voice and language you want to use for the text-to-speech message. This can either be
- * defined by the ISO 639 locale and language code or by specifying a particular voice. Supported
- * languages and voices are detailed [here](../../voice-locales).
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- /** Return true if this svaml.instruction.say object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionSayDto svamlInstructionSay = (SvamlInstructionSayDto) o;
- return Objects.equals(this.name, svamlInstructionSay.name)
- && Objects.equals(this.text, svamlInstructionSay.text)
- && Objects.equals(this.locale, svamlInstructionSay.locale);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, text, locale);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionSayDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" text: ").append(toIndentedString(text)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSendDtmfDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSendDtmfDto.java
deleted file mode 100644
index e231db5f3..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSendDtmfDto.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** Plays DTMF tones in the call. */
-@JsonPropertyOrder({
- SvamlInstructionSendDtmfDto.JSON_PROPERTY_NAME,
- SvamlInstructionSendDtmfDto.JSON_PROPERTY_VALUE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionSendDtmfDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `sendDtmf`. */
- public enum NameEnum {
- SENDDTMF("sendDtmf"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_VALUE = "value";
- private String value;
- private boolean valueDefined = false;
-
- public SvamlInstructionSendDtmfDto() {}
-
- public SvamlInstructionSendDtmfDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `sendDtmf`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlInstructionSendDtmfDto value(String value) {
- this.value = value;
- this.valueDefined = true;
- return this;
- }
-
- /**
- * A string that determines the DTMF tones to play to the callee when the call is picked up. Valid
- * characters are: `0-9`, `#`, and `w`. `w` renders a
- * 500ms pause. For example, the string `ww1234#w#`, plays a 1 second pause, the DTMF
- * tones for `1`, `2`, `3`, `4`, and `#`,
- * followed by a 500ms pause and finally the `#` tone. This is useful if the callout
- * destination requires a conference PIN code or an extension. If there is a calling party, it
- * will hear progress while the DTMF is sent.
- *
- * @return value
- */
- @JsonProperty(JSON_PROPERTY_VALUE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getValue() {
- return value;
- }
-
- @JsonIgnore
- public boolean getValueDefined() {
- return valueDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_VALUE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setValue(String value) {
- this.value = value;
- this.valueDefined = true;
- }
-
- /** Return true if this svaml.instruction.sendDtmf object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionSendDtmfDto svamlInstructionSendDtmf = (SvamlInstructionSendDtmfDto) o;
- return Objects.equals(this.name, svamlInstructionSendDtmf.name)
- && Objects.equals(this.value, svamlInstructionSendDtmf.value);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, value);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionSendDtmfDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" value: ").append(toIndentedString(value)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSetCookieDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSetCookieDto.java
deleted file mode 100644
index 7765f5f47..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionSetCookieDto.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** Creates a cookie for the duration of the call. */
-@JsonPropertyOrder({
- SvamlInstructionSetCookieDto.JSON_PROPERTY_NAME,
- SvamlInstructionSetCookieDto.JSON_PROPERTY_KEY,
- SvamlInstructionSetCookieDto.JSON_PROPERTY_VALUE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionSetCookieDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `setCookie`. */
- public enum NameEnum {
- SETCOOKIE("setCookie"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_KEY = "key";
- private String key;
- private boolean keyDefined = false;
-
- public static final String JSON_PROPERTY_VALUE = "value";
- private String value;
- private boolean valueDefined = false;
-
- public SvamlInstructionSetCookieDto() {}
-
- public SvamlInstructionSetCookieDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `setCookie`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlInstructionSetCookieDto key(String key) {
- this.key = key;
- this.keyDefined = true;
- return this;
- }
-
- /**
- * The name of the cookie you want to set.
- *
- * @return key
- */
- @JsonProperty(JSON_PROPERTY_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getKey() {
- return key;
- }
-
- @JsonIgnore
- public boolean getKeyDefined() {
- return keyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setKey(String key) {
- this.key = key;
- this.keyDefined = true;
- }
-
- public SvamlInstructionSetCookieDto value(String value) {
- this.value = value;
- this.valueDefined = true;
- return this;
- }
-
- /**
- * The value of the cookie you want to set.
- *
- * @return value
- */
- @JsonProperty(JSON_PROPERTY_VALUE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getValue() {
- return value;
- }
-
- @JsonIgnore
- public boolean getValueDefined() {
- return valueDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_VALUE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setValue(String value) {
- this.value = value;
- this.valueDefined = true;
- }
-
- /** Return true if this svaml.instruction.setCookie object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionSetCookieDto svamlInstructionSetCookie = (SvamlInstructionSetCookieDto) o;
- return Objects.equals(this.name, svamlInstructionSetCookie.name)
- && Objects.equals(this.key, svamlInstructionSetCookie.key)
- && Objects.equals(this.value, svamlInstructionSetCookie.value);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, key, value);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionSetCookieDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" key: ").append(toIndentedString(key)).append("\n");
- sb.append(" value: ").append(toIndentedString(value)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStartRecordingDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStartRecordingDto.java
deleted file mode 100644
index 57147b13d..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStartRecordingDto.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** Starts a recording of the call. */
-@JsonPropertyOrder({
- SvamlInstructionStartRecordingDto.JSON_PROPERTY_NAME,
- SvamlInstructionStartRecordingDto.JSON_PROPERTY_OPTIONS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionStartRecordingDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `startRecording`. */
- public enum NameEnum {
- STARTRECORDING("startRecording"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public static final String JSON_PROPERTY_OPTIONS = "options";
- private SvamlInstructionStartRecordingOptionsDto options;
- private boolean optionsDefined = false;
-
- public SvamlInstructionStartRecordingDto() {}
-
- public SvamlInstructionStartRecordingDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `startRecording`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- public SvamlInstructionStartRecordingDto options(
- SvamlInstructionStartRecordingOptionsDto options) {
- this.options = options;
- this.optionsDefined = true;
- return this;
- }
-
- /**
- * Get options
- *
- * @return options
- */
- @JsonProperty(JSON_PROPERTY_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public SvamlInstructionStartRecordingOptionsDto getOptions() {
- return options;
- }
-
- @JsonIgnore
- public boolean getOptionsDefined() {
- return optionsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setOptions(SvamlInstructionStartRecordingOptionsDto options) {
- this.options = options;
- this.optionsDefined = true;
- }
-
- /** Return true if this svaml.instruction.startRecording object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionStartRecordingDto svamlInstructionStartRecording =
- (SvamlInstructionStartRecordingDto) o;
- return Objects.equals(this.name, svamlInstructionStartRecording.name)
- && Objects.equals(this.options, svamlInstructionStartRecording.options);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, options);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionStartRecordingDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" options: ").append(toIndentedString(options)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStartRecordingOptionsDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStartRecordingOptionsDto.java
deleted file mode 100644
index 0d115a678..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStartRecordingOptionsDto.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/** SvamlInstructionStartRecordingOptionsDto */
-@JsonPropertyOrder({
- SvamlInstructionStartRecordingOptionsDto.JSON_PROPERTY_DESTINATION_URL,
- SvamlInstructionStartRecordingOptionsDto.JSON_PROPERTY_CREDENTIALS,
- SvamlInstructionStartRecordingOptionsDto.JSON_PROPERTY_FORMAT,
- SvamlInstructionStartRecordingOptionsDto.JSON_PROPERTY_NOTIFICATION_EVENTS,
- SvamlInstructionStartRecordingOptionsDto.JSON_PROPERTY_TRANSCRIPTION_OPTIONS
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionStartRecordingOptionsDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_DESTINATION_URL = "destinationUrl";
- private String destinationUrl;
- private boolean destinationUrlDefined = false;
-
- public static final String JSON_PROPERTY_CREDENTIALS = "credentials";
- private String credentials;
- private boolean credentialsDefined = false;
-
- public static final String JSON_PROPERTY_FORMAT = "format";
- private String format;
- private boolean formatDefined = false;
-
- public static final String JSON_PROPERTY_NOTIFICATION_EVENTS = "notificationEvents";
- private Boolean notificationEvents;
- private boolean notificationEventsDefined = false;
-
- public static final String JSON_PROPERTY_TRANSCRIPTION_OPTIONS = "transcriptionOptions";
- private SvamlInstructionStartRecordingOptionsTranscriptionOptionsDto transcriptionOptions;
- private boolean transcriptionOptionsDefined = false;
-
- public SvamlInstructionStartRecordingOptionsDto() {}
-
- public SvamlInstructionStartRecordingOptionsDto destinationUrl(String destinationUrl) {
- this.destinationUrl = destinationUrl;
- this.destinationUrlDefined = true;
- return this;
- }
-
- /**
- * Get destinationUrl
- *
- * @return destinationUrl
- */
- @JsonProperty(JSON_PROPERTY_DESTINATION_URL)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDestinationUrl() {
- return destinationUrl;
- }
-
- @JsonIgnore
- public boolean getDestinationUrlDefined() {
- return destinationUrlDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DESTINATION_URL)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDestinationUrl(String destinationUrl) {
- this.destinationUrl = destinationUrl;
- this.destinationUrlDefined = true;
- }
-
- public SvamlInstructionStartRecordingOptionsDto credentials(String credentials) {
- this.credentials = credentials;
- this.credentialsDefined = true;
- return this;
- }
-
- /**
- * Get credentials
- *
- * @return credentials
- */
- @JsonProperty(JSON_PROPERTY_CREDENTIALS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCredentials() {
- return credentials;
- }
-
- @JsonIgnore
- public boolean getCredentialsDefined() {
- return credentialsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CREDENTIALS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCredentials(String credentials) {
- this.credentials = credentials;
- this.credentialsDefined = true;
- }
-
- public SvamlInstructionStartRecordingOptionsDto format(String format) {
- this.format = format;
- this.formatDefined = true;
- return this;
- }
-
- /**
- * Get format
- *
- * @return format
- */
- @JsonProperty(JSON_PROPERTY_FORMAT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getFormat() {
- return format;
- }
-
- @JsonIgnore
- public boolean getFormatDefined() {
- return formatDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_FORMAT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setFormat(String format) {
- this.format = format;
- this.formatDefined = true;
- }
-
- public SvamlInstructionStartRecordingOptionsDto notificationEvents(Boolean notificationEvents) {
- this.notificationEvents = notificationEvents;
- this.notificationEventsDefined = true;
- return this;
- }
-
- /**
- * Get notificationEvents
- *
- * @return notificationEvents
- */
- @JsonProperty(JSON_PROPERTY_NOTIFICATION_EVENTS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getNotificationEvents() {
- return notificationEvents;
- }
-
- @JsonIgnore
- public boolean getNotificationEventsDefined() {
- return notificationEventsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NOTIFICATION_EVENTS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNotificationEvents(Boolean notificationEvents) {
- this.notificationEvents = notificationEvents;
- this.notificationEventsDefined = true;
- }
-
- public SvamlInstructionStartRecordingOptionsDto transcriptionOptions(
- SvamlInstructionStartRecordingOptionsTranscriptionOptionsDto transcriptionOptions) {
- this.transcriptionOptions = transcriptionOptions;
- this.transcriptionOptionsDefined = true;
- return this;
- }
-
- /**
- * Get transcriptionOptions
- *
- * @return transcriptionOptions
- */
- @JsonProperty(JSON_PROPERTY_TRANSCRIPTION_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public SvamlInstructionStartRecordingOptionsTranscriptionOptionsDto getTranscriptionOptions() {
- return transcriptionOptions;
- }
-
- @JsonIgnore
- public boolean getTranscriptionOptionsDefined() {
- return transcriptionOptionsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TRANSCRIPTION_OPTIONS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTranscriptionOptions(
- SvamlInstructionStartRecordingOptionsTranscriptionOptionsDto transcriptionOptions) {
- this.transcriptionOptions = transcriptionOptions;
- this.transcriptionOptionsDefined = true;
- }
-
- /** Return true if this svaml.instruction.startRecordingOptions object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionStartRecordingOptionsDto svamlInstructionStartRecordingOptions =
- (SvamlInstructionStartRecordingOptionsDto) o;
- return Objects.equals(this.destinationUrl, svamlInstructionStartRecordingOptions.destinationUrl)
- && Objects.equals(this.credentials, svamlInstructionStartRecordingOptions.credentials)
- && Objects.equals(this.format, svamlInstructionStartRecordingOptions.format)
- && Objects.equals(
- this.notificationEvents, svamlInstructionStartRecordingOptions.notificationEvents)
- && Objects.equals(
- this.transcriptionOptions, svamlInstructionStartRecordingOptions.transcriptionOptions);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- destinationUrl, credentials, format, notificationEvents, transcriptionOptions);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionStartRecordingOptionsDto {\n");
- sb.append(" destinationUrl: ").append(toIndentedString(destinationUrl)).append("\n");
- sb.append(" credentials: ").append(toIndentedString(credentials)).append("\n");
- sb.append(" format: ").append(toIndentedString(format)).append("\n");
- sb.append(" notificationEvents: ").append(toIndentedString(notificationEvents)).append("\n");
- sb.append(" transcriptionOptions: ")
- .append(toIndentedString(transcriptionOptions))
- .append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStopRecordingDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStopRecordingDto.java
deleted file mode 100644
index 1c050c39d..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/SvamlInstructionStopRecordingDto.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** Stops the recording of the call. */
-@JsonPropertyOrder({SvamlInstructionStopRecordingDto.JSON_PROPERTY_NAME})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class SvamlInstructionStopRecordingDto {
- private static final long serialVersionUID = 1L;
-
- /** The `name` property. Must have the value `stopRecording`. */
- public enum NameEnum {
- STOPRECORDING("stopRecording"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- NameEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static NameEnum fromValue(String value) {
- for (NameEnum b : NameEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_NAME = "name";
- private String name;
- private boolean nameDefined = false;
-
- public SvamlInstructionStopRecordingDto() {}
-
- public SvamlInstructionStopRecordingDto name(String name) {
- this.name = name;
- this.nameDefined = true;
- return this;
- }
-
- /**
- * The `name` property. Must have the value `stopRecording`.
- *
- * @return name
- */
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getName() {
- return name;
- }
-
- @JsonIgnore
- public boolean getNameDefined() {
- return nameDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setName(String name) {
- this.name = name;
- this.nameDefined = true;
- }
-
- /** Return true if this svaml.instruction.stopRecording object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- SvamlInstructionStopRecordingDto svamlInstructionStopRecording =
- (SvamlInstructionStopRecordingDto) o;
- return Objects.equals(this.name, svamlInstructionStopRecording.name);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class SvamlInstructionStopRecordingDto {\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/TtsCalloutRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/TtsCalloutRequestDto.java
deleted file mode 100644
index fa43eba7f..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/TtsCalloutRequestDto.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.util.Objects;
-
-/**
- * The text-to-speech callout calls a phone number and plays a synthesized text messages or
- * pre-recorded sound files.
- */
-@JsonPropertyOrder({
- TtsCalloutRequestDto.JSON_PROPERTY_DESTINATION,
- TtsCalloutRequestDto.JSON_PROPERTY_CLI,
- TtsCalloutRequestDto.JSON_PROPERTY_DTMF,
- TtsCalloutRequestDto.JSON_PROPERTY_DOMAIN,
- TtsCalloutRequestDto.JSON_PROPERTY_CUSTOM,
- TtsCalloutRequestDto.JSON_PROPERTY_LOCALE,
- TtsCalloutRequestDto.JSON_PROPERTY_TEXT,
- TtsCalloutRequestDto.JSON_PROPERTY_PROMPTS,
- TtsCalloutRequestDto.JSON_PROPERTY_ENABLE_ACE,
- TtsCalloutRequestDto.JSON_PROPERTY_ENABLE_DICE,
- TtsCalloutRequestDto.JSON_PROPERTY_ENABLE_PIE
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class TtsCalloutRequestDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_DESTINATION = "destination";
- private DestinationDto destination;
- private boolean destinationDefined = false;
-
- public static final String JSON_PROPERTY_CLI = "cli";
- private String cli;
- private boolean cliDefined = false;
-
- public static final String JSON_PROPERTY_DTMF = "dtmf";
- private String dtmf;
- private boolean dtmfDefined = false;
-
- public static final String JSON_PROPERTY_DOMAIN = "domain";
- private DomainDto domain;
- private boolean domainDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_LOCALE = "locale";
- private String locale;
- private boolean localeDefined = false;
-
- public static final String JSON_PROPERTY_TEXT = "text";
- private String text;
- private boolean textDefined = false;
-
- public static final String JSON_PROPERTY_PROMPTS = "prompts";
- private String prompts;
- private boolean promptsDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_ACE = "enableAce";
- private Boolean enableAce;
- private boolean enableAceDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_DICE = "enableDice";
- private Boolean enableDice;
- private boolean enableDiceDefined = false;
-
- public static final String JSON_PROPERTY_ENABLE_PIE = "enablePie";
- private Boolean enablePie;
- private boolean enablePieDefined = false;
-
- public TtsCalloutRequestDto() {}
-
- public TtsCalloutRequestDto destination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- return this;
- }
-
- /**
- * Get destination
- *
- * @return destination
- */
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public DestinationDto getDestination() {
- return destination;
- }
-
- @JsonIgnore
- public boolean getDestinationDefined() {
- return destinationDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DESTINATION)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public void setDestination(DestinationDto destination) {
- this.destination = destination;
- this.destinationDefined = true;
- }
-
- public TtsCalloutRequestDto cli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- return this;
- }
-
- /**
- * The number that will be displayed as the incoming caller. To set your own CLI, you may use your
- * verified number or your Dashboard number. The number must be in
- * [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format.
- *
- * @return cli
- */
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCli() {
- return cli;
- }
-
- @JsonIgnore
- public boolean getCliDefined() {
- return cliDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CLI)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCli(String cli) {
- this.cli = cli;
- this.cliDefined = true;
- }
-
- public TtsCalloutRequestDto dtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- return this;
- }
-
- /**
- * When the destination picks up, this DTMF tones will be played to the callee. Valid characters
- * in the string are \"0\"-\"9\", \"#\", and \"w\". A
- * \"w\" will render a 500 ms pause. For example, \"ww1234#w#\" will render a
- * 1s pause, the DTMF tones \"1\", \"2\", \"3\", \"4\" and
- * \"#\" followed by a 0.5s pause and finally the DTMF tone for \"#\". This
- * can be used if the callout destination for instance require a conference PIN code or an
- * extension to be entered.
- *
- * @return dtmf
- */
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getDtmf() {
- return dtmf;
- }
-
- @JsonIgnore
- public boolean getDtmfDefined() {
- return dtmfDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DTMF)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDtmf(String dtmf) {
- this.dtmf = dtmf;
- this.dtmfDefined = true;
- }
-
- public TtsCalloutRequestDto domain(DomainDto domain) {
- this.domain = domain;
- this.domainDefined = true;
- return this;
- }
-
- /**
- * Get domain
- *
- * @return domain
- */
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public DomainDto getDomain() {
- return domain;
- }
-
- @JsonIgnore
- public boolean getDomainDefined() {
- return domainDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_DOMAIN)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setDomain(DomainDto domain) {
- this.domain = domain;
- this.domainDefined = true;
- }
-
- public TtsCalloutRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * Can be used to input custom data.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public TtsCalloutRequestDto locale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- return this;
- }
-
- /**
- * The voice and language you want to use for the text-to-speech message. This can either be
- * defined by the ISO 639 locale and language code or by specifying a particular voice. Supported
- * languages and voices are detailed [here](../../../voice-locales/).
- *
- * @return locale
- */
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getLocale() {
- return locale;
- }
-
- @JsonIgnore
- public boolean getLocaleDefined() {
- return localeDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_LOCALE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setLocale(String locale) {
- this.locale = locale;
- this.localeDefined = true;
- }
-
- public TtsCalloutRequestDto text(String text) {
- this.text = text;
- this.textDefined = true;
- return this;
- }
-
- /**
- * The text that will be spoken in the text-to-speech message. _Every application's default
- * maximum characters allowed in text-to-speech is 600 characters. Contact support if you wish
- * this limit to be changed._
- *
- * @return text
- */
- @JsonProperty(JSON_PROPERTY_TEXT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getText() {
- return text;
- }
-
- @JsonIgnore
- public boolean getTextDefined() {
- return textDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TEXT)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setText(String text) {
- this.text = text;
- this.textDefined = true;
- }
-
- public TtsCalloutRequestDto prompts(String prompts) {
- this.prompts = prompts;
- this.promptsDefined = true;
- return this;
- }
-
- /**
- * An advanced alternative to using ```text```. __TTS__ _Text To
- * Speech:_ The equivalent of text but within the prompt property. Example:
- * _```#tts[Hello from Sinch]```_ __TTS with SSML__ _Text To Speech
- * with Speech Synthesis Markup Language (SSML)._ This is an XML-based markup language for
- * assisting the generation of synthetic speech in the Web and other applications. AWS Polly
- * supports a sub-set of SSML. This allows us to use SSML-enhanced text for additional control
- * over how Polly generates speech from the text. Details and examples of supported tags are
- * [here](https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html) __Externally hosted
- * media:__ Provide a URL to your own hosted media. Please check
- * [here](../../../supported-audio-formats/#limits) to read about audio content type and usage
- * limits. _Every application's default maximum allowed in TTS or TTS SSML is 600 characters.
- * Contact support if you wish this limit to be changed._ _Several prompts can be used, separated
- * by a semi-colon_ ```;``` Example: _```#tts[Hello
- * from Sinch];#ssml[<speak><break time=\\\"250ms\\\"/>Have a great
- * day!</speak>]```_
- *
- * @return prompts
- */
- @JsonProperty(JSON_PROPERTY_PROMPTS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getPrompts() {
- return prompts;
- }
-
- @JsonIgnore
- public boolean getPromptsDefined() {
- return promptsDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_PROMPTS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setPrompts(String prompts) {
- this.prompts = prompts;
- this.promptsDefined = true;
- }
-
- public TtsCalloutRequestDto enableAce(Boolean enableAce) {
- this.enableAce = enableAce;
- this.enableAceDefined = true;
- return this;
- }
-
- /**
- * If `enableAce` is set to `true` and the application has a callback URL
- * specified, you will receive an ACE callback when the call is answered. When the callback is
- * received, your platform must respond with a svamlet, containing the “connectconf” action in
- * order to add the call to a conference or create the conference if it's the first call. If
- * it's set to `false`, no ACE event will be sent to your backend.
- *
- * @return enableAce
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_ACE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnableAce() {
- return enableAce;
- }
-
- @JsonIgnore
- public boolean getEnableAceDefined() {
- return enableAceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_ACE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnableAce(Boolean enableAce) {
- this.enableAce = enableAce;
- this.enableAceDefined = true;
- }
-
- public TtsCalloutRequestDto enableDice(Boolean enableDice) {
- this.enableDice = enableDice;
- this.enableDiceDefined = true;
- return this;
- }
-
- /**
- * If `enableDice` is set to `true` and the application has a callback URL
- * specified, you will receive a DiCE callback when the call is disconnected. If it's set to
- * `false`, no DiCE event will be sent to your backend.
- *
- * @return enableDice
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_DICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnableDice() {
- return enableDice;
- }
-
- @JsonIgnore
- public boolean getEnableDiceDefined() {
- return enableDiceDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_DICE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnableDice(Boolean enableDice) {
- this.enableDice = enableDice;
- this.enableDiceDefined = true;
- }
-
- public TtsCalloutRequestDto enablePie(Boolean enablePie) {
- this.enablePie = enablePie;
- this.enablePieDefined = true;
- return this;
- }
-
- /**
- * <b>Note:</b> PIE callbacks are not available for DATA Calls; only PSTN and SIP
- * calls. If `enablePie` is set to `true` and the application has a callback
- * URL specified, you will receive a PIE callback after the `runMenu` action executes
- * and after the configured menu timeout has elapsed with no input. If it's set to
- * `false`, no PIE events will be sent to your backend.
- *
- * @return enablePie
- */
- @JsonProperty(JSON_PROPERTY_ENABLE_PIE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getEnablePie() {
- return enablePie;
- }
-
- @JsonIgnore
- public boolean getEnablePieDefined() {
- return enablePieDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_ENABLE_PIE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setEnablePie(Boolean enablePie) {
- this.enablePie = enablePie;
- this.enablePieDefined = true;
- }
-
- /** Return true if this ttsCalloutRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- TtsCalloutRequestDto ttsCalloutRequest = (TtsCalloutRequestDto) o;
- return Objects.equals(this.destination, ttsCalloutRequest.destination)
- && Objects.equals(this.cli, ttsCalloutRequest.cli)
- && Objects.equals(this.dtmf, ttsCalloutRequest.dtmf)
- && Objects.equals(this.domain, ttsCalloutRequest.domain)
- && Objects.equals(this.custom, ttsCalloutRequest.custom)
- && Objects.equals(this.locale, ttsCalloutRequest.locale)
- && Objects.equals(this.text, ttsCalloutRequest.text)
- && Objects.equals(this.prompts, ttsCalloutRequest.prompts)
- && Objects.equals(this.enableAce, ttsCalloutRequest.enableAce)
- && Objects.equals(this.enableDice, ttsCalloutRequest.enableDice)
- && Objects.equals(this.enablePie, ttsCalloutRequest.enablePie);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(
- destination,
- cli,
- dtmf,
- domain,
- custom,
- locale,
- text,
- prompts,
- enableAce,
- enableDice,
- enablePie);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class TtsCalloutRequestDto {\n");
- sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
- sb.append(" cli: ").append(toIndentedString(cli)).append("\n");
- sb.append(" dtmf: ").append(toIndentedString(dtmf)).append("\n");
- sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
- sb.append(" text: ").append(toIndentedString(text)).append("\n");
- sb.append(" prompts: ").append(toIndentedString(prompts)).append("\n");
- sb.append(" enableAce: ").append(toIndentedString(enableAce)).append("\n");
- sb.append(" enableDice: ").append(toIndentedString(enableDice)).append("\n");
- sb.append(" enablePie: ").append(toIndentedString(enablePie)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/UnassignNumbersDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/UnassignNumbersDto.java
deleted file mode 100644
index 3590399e5..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/UnassignNumbersDto.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.Objects;
-
-/** UnassignNumbersDto */
-@JsonPropertyOrder({
- UnassignNumbersDto.JSON_PROPERTY_NUMBER,
- UnassignNumbersDto.JSON_PROPERTY_APPLICATIONKEY,
- UnassignNumbersDto.JSON_PROPERTY_CAPABILITY
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class UnassignNumbersDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_NUMBER = "number";
- private String number;
- private boolean numberDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATIONKEY = "applicationkey";
- private String applicationkey;
- private boolean applicationkeyDefined = false;
-
- /**
- * (optional) indicates the DID capability that was assigned to the chosen application. Please
- * note that the DID needs to support the selected capability.
- */
- public enum CapabilityEnum {
- VOICE("voice"),
-
- SMS("sms"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- CapabilityEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static CapabilityEnum fromValue(String value) {
- for (CapabilityEnum b : CapabilityEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_CAPABILITY = "capability";
- private String capability;
- private boolean capabilityDefined = false;
-
- public UnassignNumbersDto() {}
-
- public UnassignNumbersDto number(String number) {
- this.number = number;
- this.numberDefined = true;
- return this;
- }
-
- /**
- * The phone number in E.164 format (https://en.wikipedia.org/wiki/E.164)
- *
- * @return number
- */
- @JsonProperty(JSON_PROPERTY_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getNumber() {
- return number;
- }
-
- @JsonIgnore
- public boolean getNumberDefined() {
- return numberDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NUMBER)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNumber(String number) {
- this.number = number;
- this.numberDefined = true;
- }
-
- public UnassignNumbersDto applicationkey(String applicationkey) {
- this.applicationkey = applicationkey;
- this.applicationkeyDefined = true;
- return this;
- }
-
- /**
- * Indicates the application where the number(s) was assigned. If empty, the application key that
- * is used to sign the request will be used.
- *
- * @return applicationkey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationkey() {
- return applicationkey;
- }
-
- @JsonIgnore
- public boolean getApplicationkeyDefined() {
- return applicationkeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationkey(String applicationkey) {
- this.applicationkey = applicationkey;
- this.applicationkeyDefined = true;
- }
-
- public UnassignNumbersDto capability(String capability) {
- this.capability = capability;
- this.capabilityDefined = true;
- return this;
- }
-
- /**
- * (optional) indicates the DID capability that was assigned to the chosen application. Please
- * note that the DID needs to support the selected capability.
- *
- * @return capability
- */
- @JsonProperty(JSON_PROPERTY_CAPABILITY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCapability() {
- return capability;
- }
-
- @JsonIgnore
- public boolean getCapabilityDefined() {
- return capabilityDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CAPABILITY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCapability(String capability) {
- this.capability = capability;
- this.capabilityDefined = true;
- }
-
- /** Return true if this unassignNumbers object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- UnassignNumbersDto unassignNumbers = (UnassignNumbersDto) o;
- return Objects.equals(this.number, unassignNumbers.number)
- && Objects.equals(this.applicationkey, unassignNumbers.applicationkey)
- && Objects.equals(this.capability, unassignNumbers.capability);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(number, applicationkey, capability);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class UnassignNumbersDto {\n");
- sb.append(" number: ").append(toIndentedString(number)).append("\n");
- sb.append(" applicationkey: ").append(toIndentedString(applicationkey)).append("\n");
- sb.append(" capability: ").append(toIndentedString(capability)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/UpdateNumbersDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/UpdateNumbersDto.java
deleted file mode 100644
index 812b0fd17..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/UpdateNumbersDto.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonValue;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/** UpdateNumbersDto */
-@JsonPropertyOrder({
- UpdateNumbersDto.JSON_PROPERTY_NUMBERS,
- UpdateNumbersDto.JSON_PROPERTY_APPLICATIONKEY,
- UpdateNumbersDto.JSON_PROPERTY_CAPABILITY
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class UpdateNumbersDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_NUMBERS = "numbers";
- private List numbers;
- private boolean numbersDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATIONKEY = "applicationkey";
- private String applicationkey;
- private boolean applicationkeyDefined = false;
-
- /**
- * indicates the DID capability that needs to be assigned to the chosen application. Valid values
- * are 'voice' and 'sms'. Please note that the DID needs to support the selected
- * capability.
- */
- public enum CapabilityEnum {
- VOICE("voice"),
-
- SMS("sms"),
-
- UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
-
- private String value;
-
- CapabilityEnum(String value) {
- this.value = value;
- }
-
- @JsonValue
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- @JsonCreator
- public static CapabilityEnum fromValue(String value) {
- for (CapabilityEnum b : CapabilityEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- return UNKNOWN_DEFAULT_OPEN_API;
- }
- }
-
- public static final String JSON_PROPERTY_CAPABILITY = "capability";
- private String capability;
- private boolean capabilityDefined = false;
-
- public UpdateNumbersDto() {}
-
- public UpdateNumbersDto numbers(List numbers) {
- this.numbers = numbers;
- this.numbersDefined = true;
- return this;
- }
-
- public UpdateNumbersDto addNumbersItem(String numbersItem) {
- if (this.numbers == null) {
- this.numbers = new ArrayList<>();
- }
- this.numbersDefined = true;
- this.numbers.add(numbersItem);
- return this;
- }
-
- /**
- * The phone number or list of numbers in E.164 format.
- *
- * @return numbers
- */
- @JsonProperty(JSON_PROPERTY_NUMBERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public List getNumbers() {
- return numbers;
- }
-
- @JsonIgnore
- public boolean getNumbersDefined() {
- return numbersDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_NUMBERS)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setNumbers(List numbers) {
- this.numbers = numbers;
- this.numbersDefined = true;
- }
-
- public UpdateNumbersDto applicationkey(String applicationkey) {
- this.applicationkey = applicationkey;
- this.applicationkeyDefined = true;
- return this;
- }
-
- /**
- * indicates the application where the number(s) will be assigned. If empty, the application key
- * that is used to sign the request will be used.
- *
- * @return applicationkey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationkey() {
- return applicationkey;
- }
-
- @JsonIgnore
- public boolean getApplicationkeyDefined() {
- return applicationkeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationkey(String applicationkey) {
- this.applicationkey = applicationkey;
- this.applicationkeyDefined = true;
- }
-
- public UpdateNumbersDto capability(String capability) {
- this.capability = capability;
- this.capabilityDefined = true;
- return this;
- }
-
- /**
- * indicates the DID capability that needs to be assigned to the chosen application. Valid values
- * are 'voice' and 'sms'. Please note that the DID needs to support the selected
- * capability.
- *
- * @return capability
- */
- @JsonProperty(JSON_PROPERTY_CAPABILITY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCapability() {
- return capability;
- }
-
- @JsonIgnore
- public boolean getCapabilityDefined() {
- return capabilityDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CAPABILITY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCapability(String capability) {
- this.capability = capability;
- this.capabilityDefined = true;
- }
-
- /** Return true if this updateNumbers object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- UpdateNumbersDto updateNumbers = (UpdateNumbersDto) o;
- return Objects.equals(this.numbers, updateNumbers.numbers)
- && Objects.equals(this.applicationkey, updateNumbers.applicationkey)
- && Objects.equals(this.capability, updateNumbers.capability);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(numbers, applicationkey, capability);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class UpdateNumbersDto {\n");
- sb.append(" numbers: ").append(toIndentedString(numbers)).append("\n");
- sb.append(" applicationkey: ").append(toIndentedString(applicationkey)).append("\n");
- sb.append(" capability: ").append(toIndentedString(capability)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/WebhooksCallEventRequestDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/WebhooksCallEventRequestDto.java
deleted file mode 100644
index 657a9c7d8..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/WebhooksCallEventRequestDto.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.annotation.JsonFilter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import java.time.OffsetDateTime;
-import java.util.Objects;
-
-/** WebhooksCallEventRequestDto */
-@JsonPropertyOrder({
- WebhooksCallEventRequestDto.JSON_PROPERTY_TIMESTAMP,
- WebhooksCallEventRequestDto.JSON_PROPERTY_CUSTOM,
- WebhooksCallEventRequestDto.JSON_PROPERTY_APPLICATION_KEY
-})
-@JsonFilter("uninitializedFilter")
-@JsonInclude(value = JsonInclude.Include.CUSTOM)
-public class WebhooksCallEventRequestDto {
- private static final long serialVersionUID = 1L;
- public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
- private OffsetDateTime timestamp;
- private boolean timestampDefined = false;
-
- public static final String JSON_PROPERTY_CUSTOM = "custom";
- private String custom;
- private boolean customDefined = false;
-
- public static final String JSON_PROPERTY_APPLICATION_KEY = "applicationKey";
- private String applicationKey;
- private boolean applicationKeyDefined = false;
-
- public WebhooksCallEventRequestDto() {}
-
- public WebhooksCallEventRequestDto timestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- return this;
- }
-
- /**
- * The timestamp in UTC format.
- *
- * @return timestamp
- */
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public OffsetDateTime getTimestamp() {
- return timestamp;
- }
-
- @JsonIgnore
- public boolean getTimestampDefined() {
- return timestampDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_TIMESTAMP)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setTimestamp(OffsetDateTime timestamp) {
- this.timestamp = timestamp;
- this.timestampDefined = true;
- }
-
- public WebhooksCallEventRequestDto custom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- return this;
- }
-
- /**
- * A string that can be used to pass custom information related to the call.
- *
- * @return custom
- */
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getCustom() {
- return custom;
- }
-
- @JsonIgnore
- public boolean getCustomDefined() {
- return customDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_CUSTOM)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setCustom(String custom) {
- this.custom = custom;
- this.customDefined = true;
- }
-
- public WebhooksCallEventRequestDto applicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- return this;
- }
-
- /**
- * The unique application key. You can find it in the Sinch
- * [dashboard](https://dashboard.sinch.com/voice/apps).
- *
- * @return applicationKey
- */
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public String getApplicationKey() {
- return applicationKey;
- }
-
- @JsonIgnore
- public boolean getApplicationKeyDefined() {
- return applicationKeyDefined;
- }
-
- @JsonProperty(JSON_PROPERTY_APPLICATION_KEY)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public void setApplicationKey(String applicationKey) {
- this.applicationKey = applicationKey;
- this.applicationKeyDefined = true;
- }
-
- /** Return true if this webhooksCallEventRequest object is equal to o. */
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- WebhooksCallEventRequestDto webhooksCallEventRequest = (WebhooksCallEventRequestDto) o;
- return Objects.equals(this.timestamp, webhooksCallEventRequest.timestamp)
- && Objects.equals(this.custom, webhooksCallEventRequest.custom)
- && Objects.equals(this.applicationKey, webhooksCallEventRequest.applicationKey);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(timestamp, custom, applicationKey);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class WebhooksCallEventRequestDto {\n");
- sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
- sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
- sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/WebhooksEventDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/WebhooksEventDto.java
deleted file mode 100644
index d839ce04b..000000000
--- a/openapi-contracts/src/main/com/sinch/sdk/domains/voice/models/dto/v1/WebhooksEventDto.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*
- * Voice API | Sinch
- * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
- *
- * The version of the OpenAPI document: 1.0.1
- * Contact: support@sinch.com
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-package com.sinch.sdk.domains.voice.models.dto.v1;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.MapperFeature;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-import com.sinch.sdk.core.models.AbstractOpenApiSchema;
-import com.sinch.sdk.core.utils.databind.JSONNavigator;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-@JsonDeserialize(using = WebhooksEventDto.WebhooksEventDtoDeserializer.class)
-@JsonSerialize(using = WebhooksEventDto.WebhooksEventDtoSerializer.class)
-public final class WebhooksEventDto extends AbstractOpenApiSchema {
- private static final Logger log = Logger.getLogger(WebhooksEventDto.class.getName());
-
- public static final class WebhooksEventDtoSerializer extends StdSerializer {
- private static final long serialVersionUID = 1L;
-
- public WebhooksEventDtoSerializer(Class