diff --git a/README.md b/README.md
index 66f95ee..37decfd 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,8 @@ This API client provides type-safe Java interfaces for Qualtrics API, enabling s
- Retrieving project IDs for participants with incomplete project involvement
- Create, check status, and manage columns of imported data projects, as well as initiate, monitor, and download data exports
- Add, retrieve, update and delete single or multiple records in imported data projects
+- Managing contacts within mailing lists
+- Retrieving detailed history for contacts in mailing lists
## ✨ Why choose this client?
@@ -66,7 +68,19 @@ This API client provides type-safe Java interfaces for Qualtrics API, enabling s
- Get a record from imported data project
- Delete a record from imported data project
- Update a record in imported data project
-
+
+- ✅ Mailing List Contacts API
+ - Create contact in mailing list
+ - List contacts in mailing list
+ - List bounced contacts in mailing list
+ - List opted-out contacts in mailing list
+ - Get contact in mailing list
+ - Update contact in mailing list
+ - Delete contact in mailing list
+
+- ✅ Mailing List Contacts History API
+ - Get contact history in mailing list
+
## 🚨 Project status
> ⚠️ **Note: This is a development version!**
@@ -76,7 +90,7 @@ This API client provides type-safe Java interfaces for Qualtrics API, enabling s
## 📦 Version information
-- **Current Version**: `0.1.2`
+- **Current Version**: `0.1.3`
- **Supported API Version**: `v3`
- **Java Compatibility**: Java 17+
@@ -98,7 +112,7 @@ You can add the library to your project by including the dependency from Maven C
pl.wtx.qualtrics
qualtrics-api-client
- 0.1.2
+ 0.1.3
```
@@ -116,7 +130,7 @@ Then add the locally built artifact to your project:
pl.wtx.qualtrics
qualtrics-api-client
- 0.1.2
+ 0.1.3
```
diff --git a/pom.xml b/pom.xml
index 3d34dcd..e0bb07a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
pl.wtx.qualtrics
qualtrics-api-client
- 0.1.2
+ 0.1.3
jar
Qualtrics API Client for Java
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/MailingListContactsApi.java b/src/main/java/pl/wtx/qualtrics/api/client/MailingListContactsApi.java
new file mode 100644
index 0000000..ade5622
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/MailingListContactsApi.java
@@ -0,0 +1,1214 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client;
+
+import pl.wtx.qualtrics.api.client.invoker.ApiCallback;
+import pl.wtx.qualtrics.api.client.invoker.ApiClient;
+import pl.wtx.qualtrics.api.client.invoker.ApiException;
+import pl.wtx.qualtrics.api.client.invoker.ApiResponse;
+import pl.wtx.qualtrics.api.client.invoker.Configuration;
+import pl.wtx.qualtrics.api.client.invoker.Pair;
+import pl.wtx.qualtrics.api.client.invoker.ProgressRequestBody;
+import pl.wtx.qualtrics.api.client.invoker.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import pl.wtx.qualtrics.api.client.model.CreateContactResponse;
+import pl.wtx.qualtrics.api.client.model.CreateMailingListContactRequest;
+import pl.wtx.qualtrics.api.client.model.DefaultErrorResponse;
+import pl.wtx.qualtrics.api.client.model.DeleteContactResponse;
+import pl.wtx.qualtrics.api.client.model.GetMailingListContactResponse;
+import pl.wtx.qualtrics.api.client.model.ListContactsInContactListResponse;
+import java.time.OffsetDateTime;
+import pl.wtx.qualtrics.api.client.model.PageOfContacts;
+import pl.wtx.qualtrics.api.client.model.UpdateContactResponse;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MailingListContactsApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public MailingListContactsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public MailingListContactsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for createMailingListContact
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful create contact results | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call createMailingListContactCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = createMailingListContactRequest;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/contacts"
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createMailingListContactValidateBeforeCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling createMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling createMailingListContact(Async)");
+ }
+
+ return createMailingListContactCall(mailingListId, directoryId, createMailingListContactRequest, _callback);
+
+ }
+
+ /**
+ * Create Contact In Mailing List
+ * Create a contact in a specified mailing list. <!--From Readme--> <!-- theme: info --> >### Performance and Operational Comments >It is recommended to run only one import at a time. There is no size limit on the data. It will not speed up imports to a single mailinglist by sending more than one request as the batches are processed sequentially. <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### Deduplication >If deduplication is on and a contact exists with the same deduplication criteria then it will modify the original contact's information. > You can find more information on [the support page for deduplication](https://www.qualtrics.com/support/iq-directory/directory-settings-tab/automatic-deduplication/).
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @return CreateContactResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful create contact results | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public CreateContactResponse createMailingListContact(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest) throws ApiException {
+ ApiResponse localVarResp = createMailingListContactWithHttpInfo(mailingListId, directoryId, createMailingListContactRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create Contact In Mailing List
+ * Create a contact in a specified mailing list. <!--From Readme--> <!-- theme: info --> >### Performance and Operational Comments >It is recommended to run only one import at a time. There is no size limit on the data. It will not speed up imports to a single mailinglist by sending more than one request as the batches are processed sequentially. <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### Deduplication >If deduplication is on and a contact exists with the same deduplication criteria then it will modify the original contact's information. > You can find more information on [the support page for deduplication](https://www.qualtrics.com/support/iq-directory/directory-settings-tab/automatic-deduplication/).
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @return ApiResponse<CreateContactResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful create contact results | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse createMailingListContactWithHttpInfo(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest) throws ApiException {
+ okhttp3.Call localVarCall = createMailingListContactValidateBeforeCall(mailingListId, directoryId, createMailingListContactRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create Contact In Mailing List (asynchronously)
+ * Create a contact in a specified mailing list. <!--From Readme--> <!-- theme: info --> >### Performance and Operational Comments >It is recommended to run only one import at a time. There is no size limit on the data. It will not speed up imports to a single mailinglist by sending more than one request as the batches are processed sequentially. <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### Deduplication >If deduplication is on and a contact exists with the same deduplication criteria then it will modify the original contact's information. > You can find more information on [the support page for deduplication](https://www.qualtrics.com/support/iq-directory/directory-settings-tab/automatic-deduplication/).
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful create contact results | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call createMailingListContactAsync(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createMailingListContactValidateBeforeCall(mailingListId, directoryId, createMailingListContactRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteMailingListContact
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Delete Contact response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call deleteMailingListContactCall(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/contacts/{contactId}"
+ .replace("{" + "contactId" + "}", localVarApiClient.escapeString(contactId.toString()))
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteMailingListContactValidateBeforeCall(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'contactId' is set
+ if (contactId == null) {
+ throw new ApiException("Missing the required parameter 'contactId' when calling deleteMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling deleteMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling deleteMailingListContact(Async)");
+ }
+
+ return deleteMailingListContactCall(contactId, mailingListId, directoryId, _callback);
+
+ }
+
+ /**
+ * Delete Contact In Mailing List
+ * Delete a single contact from a mailing list. <!--From Readme--> <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### The contact only gets removed from the mailing list, they will remain in the directory. >
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @return DeleteContactResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Delete Contact response | - |
+ 0 | A default error response | - |
+
+ */
+ public DeleteContactResponse deleteMailingListContact(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId) throws ApiException {
+ ApiResponse localVarResp = deleteMailingListContactWithHttpInfo(contactId, mailingListId, directoryId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Delete Contact In Mailing List
+ * Delete a single contact from a mailing list. <!--From Readme--> <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### The contact only gets removed from the mailing list, they will remain in the directory. >
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @return ApiResponse<DeleteContactResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Delete Contact response | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse deleteMailingListContactWithHttpInfo(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId) throws ApiException {
+ okhttp3.Call localVarCall = deleteMailingListContactValidateBeforeCall(contactId, mailingListId, directoryId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Delete Contact In Mailing List (asynchronously)
+ * Delete a single contact from a mailing list. <!--From Readme--> <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### The contact only gets removed from the mailing list, they will remain in the directory. >
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Delete Contact response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call deleteMailingListContactAsync(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteMailingListContactValidateBeforeCall(contactId, mailingListId, directoryId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getMailingListContact
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call getMailingListContactCall(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/contacts/{contactId}"
+ .replace("{" + "contactId" + "}", localVarApiClient.escapeString(contactId.toString()))
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getMailingListContactValidateBeforeCall(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'contactId' is set
+ if (contactId == null) {
+ throw new ApiException("Missing the required parameter 'contactId' when calling getMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling getMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling getMailingListContact(Async)");
+ }
+
+ return getMailingListContactCall(contactId, mailingListId, directoryId, _callback);
+
+ }
+
+ /**
+ * Get Contact In Mailing List
+ * Retrieve a specified contact within a mailing list. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @return GetMailingListContactResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public GetMailingListContactResponse getMailingListContact(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId) throws ApiException {
+ ApiResponse localVarResp = getMailingListContactWithHttpInfo(contactId, mailingListId, directoryId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get Contact In Mailing List
+ * Retrieve a specified contact within a mailing list. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @return ApiResponse<GetMailingListContactResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse getMailingListContactWithHttpInfo(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId) throws ApiException {
+ okhttp3.Call localVarCall = getMailingListContactValidateBeforeCall(contactId, mailingListId, directoryId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get Contact In Mailing List (asynchronously)
+ * Retrieve a specified contact within a mailing list. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call getMailingListContactAsync(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getMailingListContactValidateBeforeCall(contactId, mailingListId, directoryId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listMailingListBouncedContacts
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call listMailingListBouncedContactsCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable OffsetDateTime since, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/bouncedContacts"
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (since != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
+ }
+
+ if (pageSize != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize));
+ }
+
+ if (skipToken != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipToken", skipToken));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call listMailingListBouncedContactsValidateBeforeCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable OffsetDateTime since, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling listMailingListBouncedContacts(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling listMailingListBouncedContacts(Async)");
+ }
+
+ return listMailingListBouncedContactsCall(mailingListId, directoryId, since, pageSize, skipToken, _callback);
+
+ }
+
+ /**
+ * List Bounced Contacts In Mailing List
+ * Return a list of contacts in a mailing list who have had an email bounce. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @return PageOfContacts
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public PageOfContacts listMailingListBouncedContacts(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable OffsetDateTime since, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken) throws ApiException {
+ ApiResponse localVarResp = listMailingListBouncedContactsWithHttpInfo(mailingListId, directoryId, since, pageSize, skipToken);
+ return localVarResp.getData();
+ }
+
+ /**
+ * List Bounced Contacts In Mailing List
+ * Return a list of contacts in a mailing list who have had an email bounce. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @return ApiResponse<PageOfContacts>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse listMailingListBouncedContactsWithHttpInfo(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable OffsetDateTime since, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken) throws ApiException {
+ okhttp3.Call localVarCall = listMailingListBouncedContactsValidateBeforeCall(mailingListId, directoryId, since, pageSize, skipToken, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * List Bounced Contacts In Mailing List (asynchronously)
+ * Return a list of contacts in a mailing list who have had an email bounce. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call listMailingListBouncedContactsAsync(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable OffsetDateTime since, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listMailingListBouncedContactsValidateBeforeCall(mailingListId, directoryId, since, pageSize, skipToken, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listMailingListContacts
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 50)
+ * @param skipToken The start position for pagination. (optional)
+ * @param includeEmbedded Whether `embeddedData` is returned in the response. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call listMailingListContactsCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Boolean includeEmbedded, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/contacts"
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (pageSize != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize));
+ }
+
+ if (skipToken != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipToken", skipToken));
+ }
+
+ if (includeEmbedded != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeEmbedded", includeEmbedded));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call listMailingListContactsValidateBeforeCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Boolean includeEmbedded, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling listMailingListContacts(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling listMailingListContacts(Async)");
+ }
+
+ return listMailingListContactsCall(mailingListId, directoryId, pageSize, skipToken, includeEmbedded, _callback);
+
+ }
+
+ /**
+ * List Contacts In Mailing List
+ * Return a list of contacts in a specified mailing list. <!--From Readme--> For the last page of results, the value associated with `nextPage` will be `null`. <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### The maximum value for `pageSize` is 50. > The new string-based pagination functionality results in improved performance and a lower rate of timeouts. To opt in, append query parameter `useNewPaginationScheme=true`.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 50)
+ * @param skipToken The start position for pagination. (optional)
+ * @param includeEmbedded Whether `embeddedData` is returned in the response. (optional)
+ * @return ListContactsInContactListResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public ListContactsInContactListResponse listMailingListContacts(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Boolean includeEmbedded) throws ApiException {
+ ApiResponse localVarResp = listMailingListContactsWithHttpInfo(mailingListId, directoryId, pageSize, skipToken, includeEmbedded);
+ return localVarResp.getData();
+ }
+
+ /**
+ * List Contacts In Mailing List
+ * Return a list of contacts in a specified mailing list. <!--From Readme--> For the last page of results, the value associated with `nextPage` will be `null`. <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### The maximum value for `pageSize` is 50. > The new string-based pagination functionality results in improved performance and a lower rate of timeouts. To opt in, append query parameter `useNewPaginationScheme=true`.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 50)
+ * @param skipToken The start position for pagination. (optional)
+ * @param includeEmbedded Whether `embeddedData` is returned in the response. (optional)
+ * @return ApiResponse<ListContactsInContactListResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse listMailingListContactsWithHttpInfo(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Boolean includeEmbedded) throws ApiException {
+ okhttp3.Call localVarCall = listMailingListContactsValidateBeforeCall(mailingListId, directoryId, pageSize, skipToken, includeEmbedded, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * List Contacts In Mailing List (asynchronously)
+ * Return a list of contacts in a specified mailing list. <!--From Readme--> For the last page of results, the value associated with `nextPage` will be `null`. <!-- theme: warning --> >### This API call is only available to XM Directory users. > <!-- theme: warning --> >### The maximum value for `pageSize` is 50. > The new string-based pagination functionality results in improved performance and a lower rate of timeouts. To opt in, append query parameter `useNewPaginationScheme=true`.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 50)
+ * @param skipToken The start position for pagination. (optional)
+ * @param includeEmbedded Whether `embeddedData` is returned in the response. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call listMailingListContactsAsync(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Boolean includeEmbedded, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listMailingListContactsValidateBeforeCall(mailingListId, directoryId, pageSize, skipToken, includeEmbedded, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listMailingListOptedOutContacts
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call listMailingListOptedOutContactsCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable OffsetDateTime since, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/optedOutContacts"
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (pageSize != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize));
+ }
+
+ if (skipToken != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipToken", skipToken));
+ }
+
+ if (since != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call listMailingListOptedOutContactsValidateBeforeCall(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable OffsetDateTime since, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling listMailingListOptedOutContacts(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling listMailingListOptedOutContacts(Async)");
+ }
+
+ return listMailingListOptedOutContactsCall(mailingListId, directoryId, pageSize, skipToken, since, _callback);
+
+ }
+
+ /**
+ * List Opted-Out Contacts In Mailing List
+ * Return a list of contacts in a mailing list who have opted out.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @return PageOfContacts
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public PageOfContacts listMailingListOptedOutContacts(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable OffsetDateTime since) throws ApiException {
+ ApiResponse localVarResp = listMailingListOptedOutContactsWithHttpInfo(mailingListId, directoryId, pageSize, skipToken, since);
+ return localVarResp.getData();
+ }
+
+ /**
+ * List Opted-Out Contacts In Mailing List
+ * Return a list of contacts in a mailing list who have opted out.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @return ApiResponse<PageOfContacts>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse listMailingListOptedOutContactsWithHttpInfo(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable OffsetDateTime since) throws ApiException {
+ okhttp3.Call localVarCall = listMailingListOptedOutContactsValidateBeforeCall(mailingListId, directoryId, pageSize, skipToken, since, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * List Opted-Out Contacts In Mailing List (asynchronously)
+ * Return a list of contacts in a mailing list who have opted out.
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param skipToken The start position for pagination. (optional)
+ * @param since The bounced date of the email from which to begin searching for opted-out contacts in the mailing list. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | A collection of contacts | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call listMailingListOptedOutContactsAsync(@javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable OffsetDateTime since, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listMailingListOptedOutContactsValidateBeforeCall(mailingListId, directoryId, pageSize, skipToken, since, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for updateMailingListContact
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Update Contact response | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call updateMailingListContactCall(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = createMailingListContactRequest;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/contacts/{contactId}"
+ .replace("{" + "contactId" + "}", localVarApiClient.escapeString(contactId.toString()))
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call updateMailingListContactValidateBeforeCall(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'contactId' is set
+ if (contactId == null) {
+ throw new ApiException("Missing the required parameter 'contactId' when calling updateMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling updateMailingListContact(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling updateMailingListContact(Async)");
+ }
+
+ return updateMailingListContactCall(contactId, mailingListId, directoryId, createMailingListContactRequest, _callback);
+
+ }
+
+ /**
+ * Update Contact In Mailing List
+ * Update a single contact in a mailing list. <!--From Readme--> <!-- theme: warning --> >### This API call is only available to XM Directory users. >
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @return UpdateContactResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Update Contact response | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public UpdateContactResponse updateMailingListContact(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest) throws ApiException {
+ ApiResponse localVarResp = updateMailingListContactWithHttpInfo(contactId, mailingListId, directoryId, createMailingListContactRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Update Contact In Mailing List
+ * Update a single contact in a mailing list. <!--From Readme--> <!-- theme: warning --> >### This API call is only available to XM Directory users. >
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @return ApiResponse<UpdateContactResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Update Contact response | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse updateMailingListContactWithHttpInfo(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateMailingListContactValidateBeforeCall(contactId, mailingListId, directoryId, createMailingListContactRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Update Contact In Mailing List (asynchronously)
+ * Update a single contact in a mailing list. <!--From Readme--> <!-- theme: warning --> >### This API call is only available to XM Directory users. >
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param createMailingListContactRequest (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Update Contact response | - |
+ 400 | Invalid arguments response | - |
+ 401 | Unauthorized | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call updateMailingListContactAsync(@javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable CreateMailingListContactRequest createMailingListContactRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = updateMailingListContactValidateBeforeCall(contactId, mailingListId, directoryId, createMailingListContactRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/MailingListContactsHistoryApi.java b/src/main/java/pl/wtx/qualtrics/api/client/MailingListContactsHistoryApi.java
new file mode 100644
index 0000000..12675f1
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/MailingListContactsHistoryApi.java
@@ -0,0 +1,260 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client;
+
+import pl.wtx.qualtrics.api.client.invoker.ApiCallback;
+import pl.wtx.qualtrics.api.client.invoker.ApiClient;
+import pl.wtx.qualtrics.api.client.invoker.ApiException;
+import pl.wtx.qualtrics.api.client.invoker.ApiResponse;
+import pl.wtx.qualtrics.api.client.invoker.Configuration;
+import pl.wtx.qualtrics.api.client.invoker.Pair;
+import pl.wtx.qualtrics.api.client.invoker.ProgressRequestBody;
+import pl.wtx.qualtrics.api.client.invoker.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import pl.wtx.qualtrics.api.client.model.DefaultErrorResponse;
+import pl.wtx.qualtrics.api.client.model.GetContactHistoryResponse;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MailingListContactsHistoryApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public MailingListContactsHistoryApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public MailingListContactsHistoryApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for getMailingListContactHistory
+ * @param type The desired history type; one of two values: email and response (required)
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param skipToken The start position for pagination. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call getMailingListContactHistoryCall(@javax.annotation.Nonnull String type, @javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Integer pageSize, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/directories/{directoryId}/mailinglists/{mailingListId}/contacts/{contactId}/history"
+ .replace("{" + "contactId" + "}", localVarApiClient.escapeString(contactId.toString()))
+ .replace("{" + "mailingListId" + "}", localVarApiClient.escapeString(mailingListId.toString()))
+ .replace("{" + "directoryId" + "}", localVarApiClient.escapeString(directoryId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (type != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
+ }
+
+ if (skipToken != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("skipToken", skipToken));
+ }
+
+ if (pageSize != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "api_token", "public_oauth2", "public_oauth2" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getMailingListContactHistoryValidateBeforeCall(@javax.annotation.Nonnull String type, @javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Integer pageSize, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'type' is set
+ if (type == null) {
+ throw new ApiException("Missing the required parameter 'type' when calling getMailingListContactHistory(Async)");
+ }
+
+ // verify the required parameter 'contactId' is set
+ if (contactId == null) {
+ throw new ApiException("Missing the required parameter 'contactId' when calling getMailingListContactHistory(Async)");
+ }
+
+ // verify the required parameter 'mailingListId' is set
+ if (mailingListId == null) {
+ throw new ApiException("Missing the required parameter 'mailingListId' when calling getMailingListContactHistory(Async)");
+ }
+
+ // verify the required parameter 'directoryId' is set
+ if (directoryId == null) {
+ throw new ApiException("Missing the required parameter 'directoryId' when calling getMailingListContactHistory(Async)");
+ }
+
+ return getMailingListContactHistoryCall(type, contactId, mailingListId, directoryId, skipToken, pageSize, _callback);
+
+ }
+
+ /**
+ * Get Contact History In Mailing List
+ * Retrieve the history for contacts in a mailing list. <!--From Readme--> For the last page of results, the value associated with _nextPage_ will be **null**. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param type The desired history type; one of two values: email and response (required)
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param skipToken The start position for pagination. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @return GetContactHistoryResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public GetContactHistoryResponse getMailingListContactHistory(@javax.annotation.Nonnull String type, @javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Integer pageSize) throws ApiException {
+ ApiResponse localVarResp = getMailingListContactHistoryWithHttpInfo(type, contactId, mailingListId, directoryId, skipToken, pageSize);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get Contact History In Mailing List
+ * Retrieve the history for contacts in a mailing list. <!--From Readme--> For the last page of results, the value associated with _nextPage_ will be **null**. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param type The desired history type; one of two values: email and response (required)
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param skipToken The start position for pagination. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @return ApiResponse<GetContactHistoryResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public ApiResponse getMailingListContactHistoryWithHttpInfo(@javax.annotation.Nonnull String type, @javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Integer pageSize) throws ApiException {
+ okhttp3.Call localVarCall = getMailingListContactHistoryValidateBeforeCall(type, contactId, mailingListId, directoryId, skipToken, pageSize, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get Contact History In Mailing List (asynchronously)
+ * Retrieve the history for contacts in a mailing list. <!--From Readme--> For the last page of results, the value associated with _nextPage_ will be **null**. <!-- theme: warning --> >### This API call is only available to XM Directory users.
+ * @param type The desired history type; one of two values: email and response (required)
+ * @param contactId The ID for the desired contact. (required)
+ * @param mailingListId The ID for the desired mailing list. (required)
+ * @param directoryId The directory ID, also known as a pool ID. (required)
+ * @param skipToken The start position for pagination. (optional)
+ * @param pageSize The maximum number of items to return per request (optional, default to 100)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 200 | Successful Get Contact response | - |
+ 400 | Invalid arguments response | - |
+ 0 | A default error response | - |
+
+ */
+ public okhttp3.Call getMailingListContactHistoryAsync(@javax.annotation.Nonnull String type, @javax.annotation.Nonnull String contactId, @javax.annotation.Nonnull String mailingListId, @javax.annotation.Nonnull String directoryId, @javax.annotation.Nullable String skipToken, @javax.annotation.Nullable Integer pageSize, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getMailingListContactHistoryValidateBeforeCall(type, contactId, mailingListId, directoryId, skipToken, pageSize, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/invoker/JSON.java b/src/main/java/pl/wtx/qualtrics/api/client/invoker/JSON.java
index cb129aa..7e9dd23 100644
--- a/src/main/java/pl/wtx/qualtrics/api/client/invoker/JSON.java
+++ b/src/main/java/pl/wtx/qualtrics/api/client/invoker/JSON.java
@@ -97,26 +97,29 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.BatchGetParticipantResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.BounceInfo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateContactExportRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateContactExportRequestEmbeddedData.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateContactExportResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateDirectoryContactRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateDirectoryContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateIDPRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateMailingListContactRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateTransactionContactsImportRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateTransactionContactsImportRequestContactsInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateTransactionContactsImportRequestTransactionMeta.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.CreateTransactionContactsImportResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.DefaultEmptyResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.DefaultErrorResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.DirectoryContactMailingListsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.DeleteContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.EX360CopyRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ElementsInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ElementsInner1.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ElementsInner2.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.EmailHistory.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.EmailHistoryBounceInfo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Error.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Evaluator.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.EvaluatorImportBody.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.EvaluatorRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ExportCreationRequest.CustomTypeAdapterFactory());
@@ -124,32 +127,32 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ExportStatusResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetContactExportFileResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetContactExportProgress.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetContactHistoryResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetDirectoryContactEmailHistoryResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetDirectoryContactHistoryResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetDirectoryContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetDirectoryContactResponseHistoryResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetImportReportResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetImportReportResponseResults.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetMailingListContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetRecordResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetTransactionContactsImportStatusResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.GetTransactionContactsImportSummaryResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.IDPField.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.IDPNotFound.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.IDPResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ImportEvaluatorResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ImportReportEntry.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ImportedDataProject.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.JobId.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.JobInfo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.JobResult.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.JobResultsBucket.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ListContactsInContactListResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.ListDirectoryContactsResponse.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.MailingListMembership.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.MailingListMembershipDetails.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Meta.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.MetaInError.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.MetadataFilter.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.NumericFilter.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.PageOfContacts.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.PartialFailureResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Participant.CustomTypeAdapterFactory());
@@ -168,6 +171,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result12.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result13.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result14.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result15.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result16.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result17.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result18.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result1Contacts.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result1ContactsCount.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.Result1Transactions.CustomTypeAdapterFactory());
@@ -190,10 +197,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SearchDirectoryContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SegmentMembershipDetails.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SingleContact.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.StringFilter.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SingleContactLegacy.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SubjectData.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SubjectImportBody.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.SubjectRequest.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.UpdateContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.UpdateDirectoryContactResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.qualtrics.api.client.model.UpdateIDPRequest.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/BounceInfo.java b/src/main/java/pl/wtx/qualtrics/api/client/model/BounceInfo.java
new file mode 100644
index 0000000..a37df02
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/BounceInfo.java
@@ -0,0 +1,305 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import pl.wtx.qualtrics.api.client.invoker.JSON;
+
+/**
+ * BounceInfo
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
+public class BounceInfo {
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ @javax.annotation.Nullable
+ private String type;
+
+ public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode";
+ @SerializedName(SERIALIZED_NAME_STATUS_CODE)
+ @javax.annotation.Nullable
+ private String statusCode;
+
+ public static final String SERIALIZED_NAME_REASON = "reason";
+ @SerializedName(SERIALIZED_NAME_REASON)
+ @javax.annotation.Nullable
+ private String reason;
+
+ public static final String SERIALIZED_NAME_BLACKLISTED = "blacklisted";
+ @SerializedName(SERIALIZED_NAME_BLACKLISTED)
+ @javax.annotation.Nullable
+ private Boolean blacklisted;
+
+ public BounceInfo() {
+ }
+
+ public BounceInfo type(@javax.annotation.Nullable String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public String getType() {
+ return type;
+ }
+
+ public void setType(@javax.annotation.Nullable String type) {
+ this.type = type;
+ }
+
+
+ public BounceInfo statusCode(@javax.annotation.Nullable String statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ /**
+ * Get statusCode
+ * @return statusCode
+ */
+ @javax.annotation.Nullable
+ public String getStatusCode() {
+ return statusCode;
+ }
+
+ public void setStatusCode(@javax.annotation.Nullable String statusCode) {
+ this.statusCode = statusCode;
+ }
+
+
+ public BounceInfo reason(@javax.annotation.Nullable String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get reason
+ * @return reason
+ */
+ @javax.annotation.Nullable
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(@javax.annotation.Nullable String reason) {
+ this.reason = reason;
+ }
+
+
+ public BounceInfo blacklisted(@javax.annotation.Nullable Boolean blacklisted) {
+ this.blacklisted = blacklisted;
+ return this;
+ }
+
+ /**
+ * Get blacklisted
+ * @return blacklisted
+ */
+ @javax.annotation.Nullable
+ public Boolean getBlacklisted() {
+ return blacklisted;
+ }
+
+ public void setBlacklisted(@javax.annotation.Nullable Boolean blacklisted) {
+ this.blacklisted = blacklisted;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BounceInfo bounceInfo = (BounceInfo) o;
+ return Objects.equals(this.type, bounceInfo.type) &&
+ Objects.equals(this.statusCode, bounceInfo.statusCode) &&
+ Objects.equals(this.reason, bounceInfo.reason) &&
+ Objects.equals(this.blacklisted, bounceInfo.blacklisted);
+ }
+
+ private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
+ return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, statusCode, reason, blacklisted);
+ }
+
+ private static int hashCodeNullable(JsonNullable a) {
+ if (a == null) {
+ return 1;
+ }
+ return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BounceInfo {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n");
+ sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
+ sb.append(" blacklisted: ").append(toIndentedString(blacklisted)).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 ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("type");
+ openapiFields.add("statusCode");
+ openapiFields.add("reason");
+ openapiFields.add("blacklisted");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BounceInfo
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BounceInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in BounceInfo is not found in the empty JSON string", BounceInfo.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!BounceInfo.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BounceInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ if ((jsonObj.get("statusCode") != null && !jsonObj.get("statusCode").isJsonNull()) && !jsonObj.get("statusCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `statusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusCode").toString()));
+ }
+ if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!BounceInfo.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'BounceInfo' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(BounceInfo.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, BounceInfo value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public BounceInfo read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of BounceInfo given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of BounceInfo
+ * @throws IOException if the JSON string is invalid with respect to BounceInfo
+ */
+ public static BounceInfo fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, BounceInfo.class);
+ }
+
+ /**
+ * Convert an instance of BounceInfo to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/Comparison.java b/src/main/java/pl/wtx/qualtrics/api/client/model/Comparison.java
deleted file mode 100644
index 878bc01..0000000
--- a/src/main/java/pl/wtx/qualtrics/api/client/model/Comparison.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Qualtrics API
- * This is the API specification for Qualtrics platform.
- *
- * The version of the OpenAPI document: 3.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package pl.wtx.qualtrics.api.client.model;
-
-import java.util.Objects;
-import com.google.gson.annotations.SerializedName;
-
-import java.io.IOException;
-import com.google.gson.TypeAdapter;
-import com.google.gson.JsonElement;
-import com.google.gson.annotations.JsonAdapter;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-
-/**
- * Gets or Sets Comparison
- */
-@JsonAdapter(Comparison.Adapter.class)
-public enum Comparison {
-
- EQ("eq"),
-
- NEQ("neq"),
-
- GT("gt"),
-
- LT("lt"),
-
- GTE("gte"),
-
- LTE("lte"),
-
- TRUE("true"),
-
- FALSE("false"),
-
- NOT_EMPTY("notEmpty"),
-
- EMPTY("empty");
-
- private String value;
-
- Comparison(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- public static Comparison fromValue(String value) {
- for (Comparison b : Comparison.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- throw new IllegalArgumentException("Unexpected value '" + value + "'");
- }
-
- public static class Adapter extends TypeAdapter {
- @Override
- public void write(final JsonWriter jsonWriter, final Comparison enumeration) throws IOException {
- jsonWriter.value(enumeration.getValue());
- }
-
- @Override
- public Comparison read(final JsonReader jsonReader) throws IOException {
- String value = jsonReader.nextString();
- return Comparison.fromValue(value);
- }
- }
-
- public static void validateJsonElement(JsonElement jsonElement) throws IOException {
- String value = jsonElement.getAsString();
- Comparison.fromValue(value);
- }
-}
-
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/Evaluator.java b/src/main/java/pl/wtx/qualtrics/api/client/model/CreateContactResponse.java
similarity index 56%
rename from src/main/java/pl/wtx/qualtrics/api/client/model/Evaluator.java
rename to src/main/java/pl/wtx/qualtrics/api/client/model/CreateContactResponse.java
index b8e4506..ecda4b1 100644
--- a/src/main/java/pl/wtx/qualtrics/api/client/model/Evaluator.java
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/CreateContactResponse.java
@@ -21,8 +21,8 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
+import pl.wtx.qualtrics.api.client.model.Meta;
+import pl.wtx.qualtrics.api.client.model.Result15;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -48,66 +48,58 @@
import pl.wtx.qualtrics.api.client.invoker.JSON;
/**
- * Evaluator
+ * CreateContactResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
-public class Evaluator {
- public static final String SERIALIZED_NAME_UNIQUE_IDENTIFIER = "uniqueIdentifier";
- @SerializedName(SERIALIZED_NAME_UNIQUE_IDENTIFIER)
+public class CreateContactResponse {
+ public static final String SERIALIZED_NAME_RESULT = "result";
+ @SerializedName(SERIALIZED_NAME_RESULT)
@javax.annotation.Nonnull
- private String uniqueIdentifier = "CRZ_12234455";
+ private Result15 result;
- public static final String SERIALIZED_NAME_METADATA = "metadata";
- @SerializedName(SERIALIZED_NAME_METADATA)
- @javax.annotation.Nullable
- private Map metadata = new HashMap<>();
+ public static final String SERIALIZED_NAME_META = "meta";
+ @SerializedName(SERIALIZED_NAME_META)
+ @javax.annotation.Nonnull
+ private Meta meta;
- public Evaluator() {
+ public CreateContactResponse() {
}
- public Evaluator uniqueIdentifier(@javax.annotation.Nonnull String uniqueIdentifier) {
- this.uniqueIdentifier = uniqueIdentifier;
+ public CreateContactResponse result(@javax.annotation.Nonnull Result15 result) {
+ this.result = result;
return this;
}
/**
- * Get uniqueIdentifier
- * @return uniqueIdentifier
+ * Get result
+ * @return result
*/
@javax.annotation.Nonnull
- public String getUniqueIdentifier() {
- return uniqueIdentifier;
+ public Result15 getResult() {
+ return result;
}
- public void setUniqueIdentifier(@javax.annotation.Nonnull String uniqueIdentifier) {
- this.uniqueIdentifier = uniqueIdentifier;
+ public void setResult(@javax.annotation.Nonnull Result15 result) {
+ this.result = result;
}
- public Evaluator metadata(@javax.annotation.Nullable Map metadata) {
- this.metadata = metadata;
- return this;
- }
-
- public Evaluator putMetadataItem(String key, String metadataItem) {
- if (this.metadata == null) {
- this.metadata = new HashMap<>();
- }
- this.metadata.put(key, metadataItem);
+ public CreateContactResponse meta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
return this;
}
/**
- * Get metadata
- * @return metadata
+ * Get meta
+ * @return meta
*/
- @javax.annotation.Nullable
- public Map getMetadata() {
- return metadata;
+ @javax.annotation.Nonnull
+ public Meta getMeta() {
+ return meta;
}
- public void setMetadata(@javax.annotation.Nullable Map metadata) {
- this.metadata = metadata;
+ public void setMeta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
}
@@ -120,22 +112,22 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- Evaluator evaluator = (Evaluator) o;
- return Objects.equals(this.uniqueIdentifier, evaluator.uniqueIdentifier) &&
- Objects.equals(this.metadata, evaluator.metadata);
+ CreateContactResponse createContactResponse = (CreateContactResponse) o;
+ return Objects.equals(this.result, createContactResponse.result) &&
+ Objects.equals(this.meta, createContactResponse.meta);
}
@Override
public int hashCode() {
- return Objects.hash(uniqueIdentifier, metadata);
+ return Objects.hash(result, meta);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("class Evaluator {\n");
- sb.append(" uniqueIdentifier: ").append(toIndentedString(uniqueIdentifier)).append("\n");
- sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
+ sb.append("class CreateContactResponse {\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -158,67 +150,69 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
- openapiFields.add("uniqueIdentifier");
- openapiFields.add("metadata");
+ openapiFields.add("result");
+ openapiFields.add("meta");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("uniqueIdentifier");
+ openapiRequiredFields.add("result");
+ openapiRequiredFields.add("meta");
}
/**
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
- * @throws IOException if the JSON Element is invalid with respect to Evaluator
+ * @throws IOException if the JSON Element is invalid with respect to CreateContactResponse
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
- if (!Evaluator.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format("The required field(s) %s in Evaluator is not found in the empty JSON string", Evaluator.openapiRequiredFields.toString()));
+ if (!CreateContactResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in CreateContactResponse is not found in the empty JSON string", CreateContactResponse.openapiRequiredFields.toString()));
}
}
Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry entry : entries) {
- if (!Evaluator.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Evaluator` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ if (!CreateContactResponse.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateContactResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : Evaluator.openapiRequiredFields) {
+ for (String requiredField : CreateContactResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
- if (!jsonObj.get("uniqueIdentifier").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format("Expected the field `uniqueIdentifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueIdentifier").toString()));
- }
+ // validate the required field `result`
+ Result15.validateJsonElement(jsonObj.get("result"));
+ // validate the required field `meta`
+ Meta.validateJsonElement(jsonObj.get("meta"));
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
- if (!Evaluator.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'Evaluator' and its subtypes
+ if (!CreateContactResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CreateContactResponse' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(Evaluator.class));
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CreateContactResponse.class));
- return (TypeAdapter) new TypeAdapter() {
+ return (TypeAdapter) new TypeAdapter() {
@Override
- public void write(JsonWriter out, Evaluator value) throws IOException {
+ public void write(JsonWriter out, CreateContactResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}
@Override
- public Evaluator read(JsonReader in) throws IOException {
+ public CreateContactResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
return thisAdapter.fromJsonTree(jsonElement);
@@ -229,18 +223,18 @@ public Evaluator read(JsonReader in) throws IOException {
}
/**
- * Create an instance of Evaluator given an JSON string
+ * Create an instance of CreateContactResponse given an JSON string
*
* @param jsonString JSON string
- * @return An instance of Evaluator
- * @throws IOException if the JSON string is invalid with respect to Evaluator
+ * @return An instance of CreateContactResponse
+ * @throws IOException if the JSON string is invalid with respect to CreateContactResponse
*/
- public static Evaluator fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, Evaluator.class);
+ public static CreateContactResponse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CreateContactResponse.class);
}
/**
- * Convert an instance of Evaluator to an JSON string
+ * Convert an instance of CreateContactResponse to an JSON string
*
* @return JSON string
*/
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/CreateMailingListContactRequest.java b/src/main/java/pl/wtx/qualtrics/api/client/model/CreateMailingListContactRequest.java
new file mode 100644
index 0000000..964d00d
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/CreateMailingListContactRequest.java
@@ -0,0 +1,467 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import pl.wtx.qualtrics.api.client.invoker.JSON;
+
+/**
+ * CreateMailingListContactRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
+public class CreateMailingListContactRequest {
+ public static final String SERIALIZED_NAME_FIRST_NAME = "firstName";
+ @SerializedName(SERIALIZED_NAME_FIRST_NAME)
+ @javax.annotation.Nullable
+ private String firstName;
+
+ public static final String SERIALIZED_NAME_LAST_NAME = "lastName";
+ @SerializedName(SERIALIZED_NAME_LAST_NAME)
+ @javax.annotation.Nullable
+ private String lastName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ @javax.annotation.Nullable
+ private String email;
+
+ public static final String SERIALIZED_NAME_PHONE = "phone";
+ @SerializedName(SERIALIZED_NAME_PHONE)
+ @javax.annotation.Nullable
+ private String phone;
+
+ public static final String SERIALIZED_NAME_EXT_REF = "extRef";
+ @SerializedName(SERIALIZED_NAME_EXT_REF)
+ @javax.annotation.Nullable
+ private String extRef;
+
+ public static final String SERIALIZED_NAME_EMBEDDED_DATA = "embeddedData";
+ @SerializedName(SERIALIZED_NAME_EMBEDDED_DATA)
+ @javax.annotation.Nullable
+ private Map embeddedData = new HashMap<>();
+
+ public static final String SERIALIZED_NAME_PRIVATE_EMBEDDED_DATA = "privateEmbeddedData";
+ @SerializedName(SERIALIZED_NAME_PRIVATE_EMBEDDED_DATA)
+ @javax.annotation.Nullable
+ private Map privateEmbeddedData;
+
+ public static final String SERIALIZED_NAME_LANGUAGE = "language";
+ @SerializedName(SERIALIZED_NAME_LANGUAGE)
+ @javax.annotation.Nullable
+ private String language;
+
+ public static final String SERIALIZED_NAME_UNSUBSCRIBED = "unsubscribed";
+ @SerializedName(SERIALIZED_NAME_UNSUBSCRIBED)
+ @javax.annotation.Nullable
+ private Boolean unsubscribed;
+
+ public CreateMailingListContactRequest() {
+ }
+
+ public CreateMailingListContactRequest firstName(@javax.annotation.Nullable String firstName) {
+ this.firstName = firstName;
+ return this;
+ }
+
+ /**
+ * THe contact's first name.
+ * @return firstName
+ */
+ @javax.annotation.Nullable
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(@javax.annotation.Nullable String firstName) {
+ this.firstName = firstName;
+ }
+
+
+ public CreateMailingListContactRequest lastName(@javax.annotation.Nullable String lastName) {
+ this.lastName = lastName;
+ return this;
+ }
+
+ /**
+ * The contact's last name.
+ * @return lastName
+ */
+ @javax.annotation.Nullable
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(@javax.annotation.Nullable String lastName) {
+ this.lastName = lastName;
+ }
+
+
+ public CreateMailingListContactRequest email(@javax.annotation.Nullable String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * The contact's email address.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(@javax.annotation.Nullable String email) {
+ this.email = email;
+ }
+
+
+ public CreateMailingListContactRequest phone(@javax.annotation.Nullable String phone) {
+ this.phone = phone;
+ return this;
+ }
+
+ /**
+ * The contact's phone number.
+ * @return phone
+ */
+ @javax.annotation.Nullable
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(@javax.annotation.Nullable String phone) {
+ this.phone = phone;
+ }
+
+
+ public CreateMailingListContactRequest extRef(@javax.annotation.Nullable String extRef) {
+ this.extRef = extRef;
+ return this;
+ }
+
+ /**
+ * External reference information for the contact.
+ * @return extRef
+ */
+ @javax.annotation.Nullable
+ public String getExtRef() {
+ return extRef;
+ }
+
+ public void setExtRef(@javax.annotation.Nullable String extRef) {
+ this.extRef = extRef;
+ }
+
+
+ public CreateMailingListContactRequest embeddedData(@javax.annotation.Nullable Map embeddedData) {
+ this.embeddedData = embeddedData;
+ return this;
+ }
+
+ public CreateMailingListContactRequest putEmbeddedDataItem(String key, String embeddedDataItem) {
+ if (this.embeddedData == null) {
+ this.embeddedData = new HashMap<>();
+ }
+ this.embeddedData.put(key, embeddedDataItem);
+ return this;
+ }
+
+ /**
+ * Embedded data for the contact.
+ * @return embeddedData
+ */
+ @javax.annotation.Nullable
+ public Map getEmbeddedData() {
+ return embeddedData;
+ }
+
+ public void setEmbeddedData(@javax.annotation.Nullable Map embeddedData) {
+ this.embeddedData = embeddedData;
+ }
+
+
+ public CreateMailingListContactRequest privateEmbeddedData(@javax.annotation.Nullable Map privateEmbeddedData) {
+ this.privateEmbeddedData = privateEmbeddedData;
+ return this;
+ }
+
+ public CreateMailingListContactRequest putPrivateEmbeddedDataItem(String key, Object privateEmbeddedDataItem) {
+ if (this.privateEmbeddedData == null) {
+ this.privateEmbeddedData = new HashMap<>();
+ }
+ this.privateEmbeddedData.put(key, privateEmbeddedDataItem);
+ return this;
+ }
+
+ /**
+ * Embedded data that is specific to this contact list. For more information please visit: https://www.qualtrics.com/support/iq-directory/lists-tab/creating-mailing-lists/#PrivateListData
+ * @return privateEmbeddedData
+ */
+ @javax.annotation.Nullable
+ public Map getPrivateEmbeddedData() {
+ return privateEmbeddedData;
+ }
+
+ public void setPrivateEmbeddedData(@javax.annotation.Nullable Map privateEmbeddedData) {
+ this.privateEmbeddedData = privateEmbeddedData;
+ }
+
+
+ public CreateMailingListContactRequest language(@javax.annotation.Nullable String language) {
+ this.language = language;
+ return this;
+ }
+
+ /**
+ * The contact's preferred language.
+ * @return language
+ */
+ @javax.annotation.Nullable
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(@javax.annotation.Nullable String language) {
+ this.language = language;
+ }
+
+
+ public CreateMailingListContactRequest unsubscribed(@javax.annotation.Nullable Boolean unsubscribed) {
+ this.unsubscribed = unsubscribed;
+ return this;
+ }
+
+ /**
+ * Whether the contact is unsubscribed.
+ * @return unsubscribed
+ */
+ @javax.annotation.Nullable
+ public Boolean getUnsubscribed() {
+ return unsubscribed;
+ }
+
+ public void setUnsubscribed(@javax.annotation.Nullable Boolean unsubscribed) {
+ this.unsubscribed = unsubscribed;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreateMailingListContactRequest createMailingListContactRequest = (CreateMailingListContactRequest) o;
+ return Objects.equals(this.firstName, createMailingListContactRequest.firstName) &&
+ Objects.equals(this.lastName, createMailingListContactRequest.lastName) &&
+ Objects.equals(this.email, createMailingListContactRequest.email) &&
+ Objects.equals(this.phone, createMailingListContactRequest.phone) &&
+ Objects.equals(this.extRef, createMailingListContactRequest.extRef) &&
+ Objects.equals(this.embeddedData, createMailingListContactRequest.embeddedData) &&
+ Objects.equals(this.privateEmbeddedData, createMailingListContactRequest.privateEmbeddedData) &&
+ Objects.equals(this.language, createMailingListContactRequest.language) &&
+ Objects.equals(this.unsubscribed, createMailingListContactRequest.unsubscribed);
+ }
+
+ private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
+ return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(firstName, lastName, email, phone, extRef, embeddedData, privateEmbeddedData, language, unsubscribed);
+ }
+
+ private static int hashCodeNullable(JsonNullable a) {
+ if (a == null) {
+ return 1;
+ }
+ return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreateMailingListContactRequest {\n");
+ sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
+ sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
+ sb.append(" extRef: ").append(toIndentedString(extRef)).append("\n");
+ sb.append(" embeddedData: ").append(toIndentedString(embeddedData)).append("\n");
+ sb.append(" privateEmbeddedData: ").append(toIndentedString(privateEmbeddedData)).append("\n");
+ sb.append(" language: ").append(toIndentedString(language)).append("\n");
+ sb.append(" unsubscribed: ").append(toIndentedString(unsubscribed)).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 ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("firstName");
+ openapiFields.add("lastName");
+ openapiFields.add("email");
+ openapiFields.add("phone");
+ openapiFields.add("extRef");
+ openapiFields.add("embeddedData");
+ openapiFields.add("privateEmbeddedData");
+ openapiFields.add("language");
+ openapiFields.add("unsubscribed");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to CreateMailingListContactRequest
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CreateMailingListContactRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in CreateMailingListContactRequest is not found in the empty JSON string", CreateMailingListContactRequest.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!CreateMailingListContactRequest.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateMailingListContactRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString()));
+ }
+ if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString()));
+ }
+ if ((jsonObj.get("extRef") != null && !jsonObj.get("extRef").isJsonNull()) && !jsonObj.get("extRef").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `extRef` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extRef").toString()));
+ }
+ if ((jsonObj.get("language") != null && !jsonObj.get("language").isJsonNull()) && !jsonObj.get("language").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `language` to be a primitive type in the JSON string but got `%s`", jsonObj.get("language").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CreateMailingListContactRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CreateMailingListContactRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CreateMailingListContactRequest.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CreateMailingListContactRequest value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public CreateMailingListContactRequest read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of CreateMailingListContactRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CreateMailingListContactRequest
+ * @throws IOException if the JSON string is invalid with respect to CreateMailingListContactRequest
+ */
+ public static CreateMailingListContactRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CreateMailingListContactRequest.class);
+ }
+
+ /**
+ * Convert an instance of CreateMailingListContactRequest to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/ImportEvaluatorResponse.java b/src/main/java/pl/wtx/qualtrics/api/client/model/DeleteContactResponse.java
similarity index 73%
rename from src/main/java/pl/wtx/qualtrics/api/client/model/ImportEvaluatorResponse.java
rename to src/main/java/pl/wtx/qualtrics/api/client/model/DeleteContactResponse.java
index e8ffb3f..36c1219 100644
--- a/src/main/java/pl/wtx/qualtrics/api/client/model/ImportEvaluatorResponse.java
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/DeleteContactResponse.java
@@ -47,19 +47,19 @@
import pl.wtx.qualtrics.api.client.invoker.JSON;
/**
- * ImportEvaluatorResponse
+ * DeleteContactResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
-public class ImportEvaluatorResponse {
+public class DeleteContactResponse {
public static final String SERIALIZED_NAME_META = "meta";
@SerializedName(SERIALIZED_NAME_META)
@javax.annotation.Nonnull
private Meta meta;
- public ImportEvaluatorResponse() {
+ public DeleteContactResponse() {
}
- public ImportEvaluatorResponse meta(@javax.annotation.Nonnull Meta meta) {
+ public DeleteContactResponse meta(@javax.annotation.Nonnull Meta meta) {
this.meta = meta;
return this;
}
@@ -87,8 +87,8 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- ImportEvaluatorResponse importEvaluatorResponse = (ImportEvaluatorResponse) o;
- return Objects.equals(this.meta, importEvaluatorResponse.meta);
+ DeleteContactResponse deleteContactResponse = (DeleteContactResponse) o;
+ return Objects.equals(this.meta, deleteContactResponse.meta);
}
@Override
@@ -99,7 +99,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("class ImportEvaluatorResponse {\n");
+ sb.append("class DeleteContactResponse {\n");
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
sb.append("}");
return sb.toString();
@@ -134,25 +134,25 @@ private String toIndentedString(Object o) {
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
- * @throws IOException if the JSON Element is invalid with respect to ImportEvaluatorResponse
+ * @throws IOException if the JSON Element is invalid with respect to DeleteContactResponse
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
- if (!ImportEvaluatorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format("The required field(s) %s in ImportEvaluatorResponse is not found in the empty JSON string", ImportEvaluatorResponse.openapiRequiredFields.toString()));
+ if (!DeleteContactResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteContactResponse is not found in the empty JSON string", DeleteContactResponse.openapiRequiredFields.toString()));
}
}
Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry entry : entries) {
- if (!ImportEvaluatorResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ImportEvaluatorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ if (!DeleteContactResponse.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeleteContactResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : ImportEvaluatorResponse.openapiRequiredFields) {
+ for (String requiredField : DeleteContactResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
@@ -166,22 +166,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
- if (!ImportEvaluatorResponse.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'ImportEvaluatorResponse' and its subtypes
+ if (!DeleteContactResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'DeleteContactResponse' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(ImportEvaluatorResponse.class));
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(DeleteContactResponse.class));
- return (TypeAdapter) new TypeAdapter() {
+ return (TypeAdapter) new TypeAdapter() {
@Override
- public void write(JsonWriter out, ImportEvaluatorResponse value) throws IOException {
+ public void write(JsonWriter out, DeleteContactResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}
@Override
- public ImportEvaluatorResponse read(JsonReader in) throws IOException {
+ public DeleteContactResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
return thisAdapter.fromJsonTree(jsonElement);
@@ -192,18 +192,18 @@ public ImportEvaluatorResponse read(JsonReader in) throws IOException {
}
/**
- * Create an instance of ImportEvaluatorResponse given an JSON string
+ * Create an instance of DeleteContactResponse given an JSON string
*
* @param jsonString JSON string
- * @return An instance of ImportEvaluatorResponse
- * @throws IOException if the JSON string is invalid with respect to ImportEvaluatorResponse
+ * @return An instance of DeleteContactResponse
+ * @throws IOException if the JSON string is invalid with respect to DeleteContactResponse
*/
- public static ImportEvaluatorResponse fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, ImportEvaluatorResponse.class);
+ public static DeleteContactResponse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, DeleteContactResponse.class);
}
/**
- * Convert an instance of ImportEvaluatorResponse to an JSON string
+ * Convert an instance of DeleteContactResponse to an JSON string
*
* @return JSON string
*/
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/DirectoryContactMailingListsResponse.java b/src/main/java/pl/wtx/qualtrics/api/client/model/DirectoryContactMailingListsResponse.java
deleted file mode 100644
index 1ba26bb..0000000
--- a/src/main/java/pl/wtx/qualtrics/api/client/model/DirectoryContactMailingListsResponse.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Qualtrics API
- * This is the API specification for Qualtrics platform.
- *
- * The version of the OpenAPI document: 3.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package pl.wtx.qualtrics.api.client.model;
-
-import java.util.Objects;
-import com.google.gson.TypeAdapter;
-import com.google.gson.annotations.JsonAdapter;
-import com.google.gson.annotations.SerializedName;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.Arrays;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParseException;
-import com.google.gson.TypeAdapterFactory;
-import com.google.gson.reflect.TypeToken;
-import com.google.gson.TypeAdapter;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-import java.io.IOException;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import pl.wtx.qualtrics.api.client.invoker.JSON;
-
-/**
- * Mailing list memberships of a directory contact
- */
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
-public class DirectoryContactMailingListsResponse {
- public static final String SERIALIZED_NAME_LOOKUP_ID = "lookupId";
- @SerializedName(SERIALIZED_NAME_LOOKUP_ID)
- @javax.annotation.Nonnull
- private String lookupId;
-
- public static final String SERIALIZED_NAME_GROUP_NAME = "groupName";
- @SerializedName(SERIALIZED_NAME_GROUP_NAME)
- @javax.annotation.Nonnull
- private String groupName;
-
- public static final String SERIALIZED_NAME_GROUP_UNSUBSCRIBED = "groupUnsubscribed";
- @SerializedName(SERIALIZED_NAME_GROUP_UNSUBSCRIBED)
- @javax.annotation.Nonnull
- private Boolean groupUnsubscribed;
-
- public static final String SERIALIZED_NAME_GROUP_UNSUBSCRIBE_DATE = "groupUnsubscribeDate";
- @SerializedName(SERIALIZED_NAME_GROUP_UNSUBSCRIBE_DATE)
- @javax.annotation.Nullable
- private BigDecimal groupUnsubscribeDate;
-
- public static final String SERIALIZED_NAME_GROUP_OWNER_ID = "groupOwnerId";
- @SerializedName(SERIALIZED_NAME_GROUP_OWNER_ID)
- @javax.annotation.Nonnull
- private String groupOwnerId;
-
- public DirectoryContactMailingListsResponse() {
- }
-
- public DirectoryContactMailingListsResponse lookupId(@javax.annotation.Nonnull String lookupId) {
- this.lookupId = lookupId;
- return this;
- }
-
- /**
- * Get lookupId
- * @return lookupId
- */
- @javax.annotation.Nonnull
- public String getLookupId() {
- return lookupId;
- }
-
- public void setLookupId(@javax.annotation.Nonnull String lookupId) {
- this.lookupId = lookupId;
- }
-
-
- public DirectoryContactMailingListsResponse groupName(@javax.annotation.Nonnull String groupName) {
- this.groupName = groupName;
- return this;
- }
-
- /**
- * Get groupName
- * @return groupName
- */
- @javax.annotation.Nonnull
- public String getGroupName() {
- return groupName;
- }
-
- public void setGroupName(@javax.annotation.Nonnull String groupName) {
- this.groupName = groupName;
- }
-
-
- public DirectoryContactMailingListsResponse groupUnsubscribed(@javax.annotation.Nonnull Boolean groupUnsubscribed) {
- this.groupUnsubscribed = groupUnsubscribed;
- return this;
- }
-
- /**
- * Get groupUnsubscribed
- * @return groupUnsubscribed
- */
- @javax.annotation.Nonnull
- public Boolean getGroupUnsubscribed() {
- return groupUnsubscribed;
- }
-
- public void setGroupUnsubscribed(@javax.annotation.Nonnull Boolean groupUnsubscribed) {
- this.groupUnsubscribed = groupUnsubscribed;
- }
-
-
- public DirectoryContactMailingListsResponse groupUnsubscribeDate(@javax.annotation.Nullable BigDecimal groupUnsubscribeDate) {
- this.groupUnsubscribeDate = groupUnsubscribeDate;
- return this;
- }
-
- /**
- * Get groupUnsubscribeDate
- * @return groupUnsubscribeDate
- */
- @javax.annotation.Nullable
- public BigDecimal getGroupUnsubscribeDate() {
- return groupUnsubscribeDate;
- }
-
- public void setGroupUnsubscribeDate(@javax.annotation.Nullable BigDecimal groupUnsubscribeDate) {
- this.groupUnsubscribeDate = groupUnsubscribeDate;
- }
-
-
- public DirectoryContactMailingListsResponse groupOwnerId(@javax.annotation.Nonnull String groupOwnerId) {
- this.groupOwnerId = groupOwnerId;
- return this;
- }
-
- /**
- * Get groupOwnerId
- * @return groupOwnerId
- */
- @javax.annotation.Nonnull
- public String getGroupOwnerId() {
- return groupOwnerId;
- }
-
- public void setGroupOwnerId(@javax.annotation.Nonnull String groupOwnerId) {
- this.groupOwnerId = groupOwnerId;
- }
-
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- DirectoryContactMailingListsResponse directoryContactMailingListsResponse = (DirectoryContactMailingListsResponse) o;
- return Objects.equals(this.lookupId, directoryContactMailingListsResponse.lookupId) &&
- Objects.equals(this.groupName, directoryContactMailingListsResponse.groupName) &&
- Objects.equals(this.groupUnsubscribed, directoryContactMailingListsResponse.groupUnsubscribed) &&
- Objects.equals(this.groupUnsubscribeDate, directoryContactMailingListsResponse.groupUnsubscribeDate) &&
- Objects.equals(this.groupOwnerId, directoryContactMailingListsResponse.groupOwnerId);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(lookupId, groupName, groupUnsubscribed, groupUnsubscribeDate, groupOwnerId);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class DirectoryContactMailingListsResponse {\n");
- sb.append(" lookupId: ").append(toIndentedString(lookupId)).append("\n");
- sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
- sb.append(" groupUnsubscribed: ").append(toIndentedString(groupUnsubscribed)).append("\n");
- sb.append(" groupUnsubscribeDate: ").append(toIndentedString(groupUnsubscribeDate)).append("\n");
- sb.append(" groupOwnerId: ").append(toIndentedString(groupOwnerId)).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 ");
- }
-
-
- public static HashSet openapiFields;
- public static HashSet openapiRequiredFields;
-
- static {
- // a set of all properties/fields (JSON key names)
- openapiFields = new HashSet();
- openapiFields.add("lookupId");
- openapiFields.add("groupName");
- openapiFields.add("groupUnsubscribed");
- openapiFields.add("groupUnsubscribeDate");
- openapiFields.add("groupOwnerId");
-
- // a set of required properties/fields (JSON key names)
- openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("lookupId");
- openapiRequiredFields.add("groupName");
- openapiRequiredFields.add("groupUnsubscribed");
- openapiRequiredFields.add("groupUnsubscribeDate");
- openapiRequiredFields.add("groupOwnerId");
- }
-
- /**
- * Validates the JSON Element and throws an exception if issues found
- *
- * @param jsonElement JSON Element
- * @throws IOException if the JSON Element is invalid with respect to DirectoryContactMailingListsResponse
- */
- public static void validateJsonElement(JsonElement jsonElement) throws IOException {
- if (jsonElement == null) {
- if (!DirectoryContactMailingListsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format("The required field(s) %s in DirectoryContactMailingListsResponse is not found in the empty JSON string", DirectoryContactMailingListsResponse.openapiRequiredFields.toString()));
- }
- }
-
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!DirectoryContactMailingListsResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DirectoryContactMailingListsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
- // check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : DirectoryContactMailingListsResponse.openapiRequiredFields) {
- if (jsonElement.getAsJsonObject().get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
- }
- }
- JsonObject jsonObj = jsonElement.getAsJsonObject();
- if (!jsonObj.get("lookupId").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format("Expected the field `lookupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lookupId").toString()));
- }
- if (!jsonObj.get("groupName").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString()));
- }
- if (!jsonObj.get("groupOwnerId").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format("Expected the field `groupOwnerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupOwnerId").toString()));
- }
- }
-
- public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
- @SuppressWarnings("unchecked")
- @Override
- public TypeAdapter create(Gson gson, TypeToken type) {
- if (!DirectoryContactMailingListsResponse.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'DirectoryContactMailingListsResponse' and its subtypes
- }
- final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(DirectoryContactMailingListsResponse.class));
-
- return (TypeAdapter) new TypeAdapter() {
- @Override
- public void write(JsonWriter out, DirectoryContactMailingListsResponse value) throws IOException {
- JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
- elementAdapter.write(out, obj);
- }
-
- @Override
- public DirectoryContactMailingListsResponse read(JsonReader in) throws IOException {
- JsonElement jsonElement = elementAdapter.read(in);
- validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
- }
-
- }.nullSafe();
- }
- }
-
- /**
- * Create an instance of DirectoryContactMailingListsResponse given an JSON string
- *
- * @param jsonString JSON string
- * @return An instance of DirectoryContactMailingListsResponse
- * @throws IOException if the JSON string is invalid with respect to DirectoryContactMailingListsResponse
- */
- public static DirectoryContactMailingListsResponse fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, DirectoryContactMailingListsResponse.class);
- }
-
- /**
- * Convert an instance of DirectoryContactMailingListsResponse to an JSON string
- *
- * @return JSON string
- */
- public String toJson() {
- return JSON.getGson().toJson(this);
- }
-}
-
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/ElementsInner2.java b/src/main/java/pl/wtx/qualtrics/api/client/model/ElementsInner2.java
new file mode 100644
index 0000000..cb3e9c1
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/ElementsInner2.java
@@ -0,0 +1,598 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.util.Arrays;
+import pl.wtx.qualtrics.api.client.model.BounceInfo;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import pl.wtx.qualtrics.api.client.invoker.JSON;
+
+/**
+ * ElementsInner2
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
+public class ElementsInner2 {
+ public static final String SERIALIZED_NAME_DISTRIBUTION_ID = "distributionId";
+ @SerializedName(SERIALIZED_NAME_DISTRIBUTION_ID)
+ @javax.annotation.Nullable
+ private String distributionId;
+
+ public static final String SERIALIZED_NAME_DATE = "date";
+ @SerializedName(SERIALIZED_NAME_DATE)
+ @javax.annotation.Nullable
+ private OffsetDateTime date;
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ @javax.annotation.Nullable
+ private String type;
+
+ /**
+ * Gets or Sets result
+ */
+ @JsonAdapter(ResultEnum.Adapter.class)
+ public enum ResultEnum {
+ PENDING("Pending"),
+
+ SUCCESS("Success"),
+
+ ERROR("Error"),
+
+ BOUNCE("Bounce"),
+
+ COMPLAINT("Complaint"),
+
+ SKIPPED("Skipped"),
+
+ BLOCKED("Blocked"),
+
+ FAILURE("Failure"),
+
+ UNKNOWN("Unknown"),
+
+ SOFT_BOUNCE("SoftBounce"),
+
+ HARD_BOUNCE("HardBounce");
+
+ private String value;
+
+ ResultEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static ResultEnum fromValue(String value) {
+ for (ResultEnum b : ResultEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final ResultEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public ResultEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return ResultEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ ResultEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_RESULT = "result";
+ @SerializedName(SERIALIZED_NAME_RESULT)
+ @javax.annotation.Nullable
+ private ResultEnum result;
+
+ public static final String SERIALIZED_NAME_BOUNCE_INFO = "bounceInfo";
+ @SerializedName(SERIALIZED_NAME_BOUNCE_INFO)
+ @javax.annotation.Nullable
+ private BounceInfo bounceInfo;
+
+ public static final String SERIALIZED_NAME_SURVEY_ID = "surveyId";
+ @SerializedName(SERIALIZED_NAME_SURVEY_ID)
+ @javax.annotation.Nullable
+ private String surveyId;
+
+ public static final String SERIALIZED_NAME_READ = "read";
+ @SerializedName(SERIALIZED_NAME_READ)
+ @javax.annotation.Nullable
+ private Boolean read;
+
+ public static final String SERIALIZED_NAME_LOOKUP_ID = "lookupId";
+ @SerializedName(SERIALIZED_NAME_LOOKUP_ID)
+ @javax.annotation.Nullable
+ private String lookupId;
+
+ public static final String SERIALIZED_NAME_RESPONSE_ID = "responseId";
+ @SerializedName(SERIALIZED_NAME_RESPONSE_ID)
+ @javax.annotation.Nullable
+ private String responseId;
+
+ public static final String SERIALIZED_NAME_SURVEY_STARTED_DATE = "surveyStartedDate";
+ @SerializedName(SERIALIZED_NAME_SURVEY_STARTED_DATE)
+ @javax.annotation.Nullable
+ private OffsetDateTime surveyStartedDate;
+
+ public static final String SERIALIZED_NAME_SURVEY_COMPLETED_DATE = "surveyCompletedDate";
+ @SerializedName(SERIALIZED_NAME_SURVEY_COMPLETED_DATE)
+ @javax.annotation.Nullable
+ private OffsetDateTime surveyCompletedDate;
+
+ public static final String SERIALIZED_NAME_SURVEY_FINISHED = "surveyFinished";
+ @SerializedName(SERIALIZED_NAME_SURVEY_FINISHED)
+ @javax.annotation.Nullable
+ private Boolean surveyFinished;
+
+ public ElementsInner2() {
+ }
+
+ public ElementsInner2 distributionId(@javax.annotation.Nullable String distributionId) {
+ this.distributionId = distributionId;
+ return this;
+ }
+
+ /**
+ * The distribution's ID, which can be used with Get Distribution to obtain more information about the distribution.
+ * @return distributionId
+ */
+ @javax.annotation.Nullable
+ public String getDistributionId() {
+ return distributionId;
+ }
+
+ public void setDistributionId(@javax.annotation.Nullable String distributionId) {
+ this.distributionId = distributionId;
+ }
+
+
+ public ElementsInner2 date(@javax.annotation.Nullable OffsetDateTime date) {
+ this.date = date;
+ return this;
+ }
+
+ /**
+ * Get date
+ * @return date
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getDate() {
+ return date;
+ }
+
+ public void setDate(@javax.annotation.Nullable OffsetDateTime date) {
+ this.date = date;
+ }
+
+
+ public ElementsInner2 type(@javax.annotation.Nullable String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public String getType() {
+ return type;
+ }
+
+ public void setType(@javax.annotation.Nullable String type) {
+ this.type = type;
+ }
+
+
+ public ElementsInner2 result(@javax.annotation.Nullable ResultEnum result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get result
+ * @return result
+ */
+ @javax.annotation.Nullable
+ public ResultEnum getResult() {
+ return result;
+ }
+
+ public void setResult(@javax.annotation.Nullable ResultEnum result) {
+ this.result = result;
+ }
+
+
+ public ElementsInner2 bounceInfo(@javax.annotation.Nullable BounceInfo bounceInfo) {
+ this.bounceInfo = bounceInfo;
+ return this;
+ }
+
+ /**
+ * Get bounceInfo
+ * @return bounceInfo
+ */
+ @javax.annotation.Nullable
+ public BounceInfo getBounceInfo() {
+ return bounceInfo;
+ }
+
+ public void setBounceInfo(@javax.annotation.Nullable BounceInfo bounceInfo) {
+ this.bounceInfo = bounceInfo;
+ }
+
+
+ public ElementsInner2 surveyId(@javax.annotation.Nullable String surveyId) {
+ this.surveyId = surveyId;
+ return this;
+ }
+
+ /**
+ * The survey ID of the survey referenced by this distribution.
+ * @return surveyId
+ */
+ @javax.annotation.Nullable
+ public String getSurveyId() {
+ return surveyId;
+ }
+
+ public void setSurveyId(@javax.annotation.Nullable String surveyId) {
+ this.surveyId = surveyId;
+ }
+
+
+ public ElementsInner2 read(@javax.annotation.Nullable Boolean read) {
+ this.read = read;
+ return this;
+ }
+
+ /**
+ * Get read
+ * @return read
+ */
+ @javax.annotation.Nullable
+ public Boolean getRead() {
+ return read;
+ }
+
+ public void setRead(@javax.annotation.Nullable Boolean read) {
+ this.read = read;
+ }
+
+
+ public ElementsInner2 lookupId(@javax.annotation.Nullable String lookupId) {
+ this.lookupId = lookupId;
+ return this;
+ }
+
+ /**
+ * Get lookupId
+ * @return lookupId
+ */
+ @javax.annotation.Nullable
+ public String getLookupId() {
+ return lookupId;
+ }
+
+ public void setLookupId(@javax.annotation.Nullable String lookupId) {
+ this.lookupId = lookupId;
+ }
+
+
+ public ElementsInner2 responseId(@javax.annotation.Nullable String responseId) {
+ this.responseId = responseId;
+ return this;
+ }
+
+ /**
+ * The contact's response ID. Indicates the contact's response to the survey.
+ * @return responseId
+ */
+ @javax.annotation.Nullable
+ public String getResponseId() {
+ return responseId;
+ }
+
+ public void setResponseId(@javax.annotation.Nullable String responseId) {
+ this.responseId = responseId;
+ }
+
+
+ public ElementsInner2 surveyStartedDate(@javax.annotation.Nullable OffsetDateTime surveyStartedDate) {
+ this.surveyStartedDate = surveyStartedDate;
+ return this;
+ }
+
+ /**
+ * Get surveyStartedDate
+ * @return surveyStartedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSurveyStartedDate() {
+ return surveyStartedDate;
+ }
+
+ public void setSurveyStartedDate(@javax.annotation.Nullable OffsetDateTime surveyStartedDate) {
+ this.surveyStartedDate = surveyStartedDate;
+ }
+
+
+ public ElementsInner2 surveyCompletedDate(@javax.annotation.Nullable OffsetDateTime surveyCompletedDate) {
+ this.surveyCompletedDate = surveyCompletedDate;
+ return this;
+ }
+
+ /**
+ * Get surveyCompletedDate
+ * @return surveyCompletedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSurveyCompletedDate() {
+ return surveyCompletedDate;
+ }
+
+ public void setSurveyCompletedDate(@javax.annotation.Nullable OffsetDateTime surveyCompletedDate) {
+ this.surveyCompletedDate = surveyCompletedDate;
+ }
+
+
+ public ElementsInner2 surveyFinished(@javax.annotation.Nullable Boolean surveyFinished) {
+ this.surveyFinished = surveyFinished;
+ return this;
+ }
+
+ /**
+ * Get surveyFinished
+ * @return surveyFinished
+ */
+ @javax.annotation.Nullable
+ public Boolean getSurveyFinished() {
+ return surveyFinished;
+ }
+
+ public void setSurveyFinished(@javax.annotation.Nullable Boolean surveyFinished) {
+ this.surveyFinished = surveyFinished;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ElementsInner2 elementsInner2 = (ElementsInner2) o;
+ return Objects.equals(this.distributionId, elementsInner2.distributionId) &&
+ Objects.equals(this.date, elementsInner2.date) &&
+ Objects.equals(this.type, elementsInner2.type) &&
+ Objects.equals(this.result, elementsInner2.result) &&
+ Objects.equals(this.bounceInfo, elementsInner2.bounceInfo) &&
+ Objects.equals(this.surveyId, elementsInner2.surveyId) &&
+ Objects.equals(this.read, elementsInner2.read) &&
+ Objects.equals(this.lookupId, elementsInner2.lookupId) &&
+ Objects.equals(this.responseId, elementsInner2.responseId) &&
+ Objects.equals(this.surveyStartedDate, elementsInner2.surveyStartedDate) &&
+ Objects.equals(this.surveyCompletedDate, elementsInner2.surveyCompletedDate) &&
+ Objects.equals(this.surveyFinished, elementsInner2.surveyFinished);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(distributionId, date, type, result, bounceInfo, surveyId, read, lookupId, responseId, surveyStartedDate, surveyCompletedDate, surveyFinished);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ElementsInner2 {\n");
+ sb.append(" distributionId: ").append(toIndentedString(distributionId)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" bounceInfo: ").append(toIndentedString(bounceInfo)).append("\n");
+ sb.append(" surveyId: ").append(toIndentedString(surveyId)).append("\n");
+ sb.append(" read: ").append(toIndentedString(read)).append("\n");
+ sb.append(" lookupId: ").append(toIndentedString(lookupId)).append("\n");
+ sb.append(" responseId: ").append(toIndentedString(responseId)).append("\n");
+ sb.append(" surveyStartedDate: ").append(toIndentedString(surveyStartedDate)).append("\n");
+ sb.append(" surveyCompletedDate: ").append(toIndentedString(surveyCompletedDate)).append("\n");
+ sb.append(" surveyFinished: ").append(toIndentedString(surveyFinished)).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 ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("distributionId");
+ openapiFields.add("date");
+ openapiFields.add("type");
+ openapiFields.add("result");
+ openapiFields.add("bounceInfo");
+ openapiFields.add("surveyId");
+ openapiFields.add("read");
+ openapiFields.add("lookupId");
+ openapiFields.add("responseId");
+ openapiFields.add("surveyStartedDate");
+ openapiFields.add("surveyCompletedDate");
+ openapiFields.add("surveyFinished");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ElementsInner2
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ElementsInner2.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in ElementsInner2 is not found in the empty JSON string", ElementsInner2.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!ElementsInner2.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ElementsInner2` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("distributionId") != null && !jsonObj.get("distributionId").isJsonNull()) && !jsonObj.get("distributionId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `distributionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionId").toString()));
+ }
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString()));
+ }
+ // validate the optional field `result`
+ if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) {
+ ResultEnum.validateJsonElement(jsonObj.get("result"));
+ }
+ // validate the optional field `bounceInfo`
+ if (jsonObj.get("bounceInfo") != null && !jsonObj.get("bounceInfo").isJsonNull()) {
+ BounceInfo.validateJsonElement(jsonObj.get("bounceInfo"));
+ }
+ if ((jsonObj.get("surveyId") != null && !jsonObj.get("surveyId").isJsonNull()) && !jsonObj.get("surveyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `surveyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("surveyId").toString()));
+ }
+ if ((jsonObj.get("lookupId") != null && !jsonObj.get("lookupId").isJsonNull()) && !jsonObj.get("lookupId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `lookupId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lookupId").toString()));
+ }
+ if ((jsonObj.get("responseId") != null && !jsonObj.get("responseId").isJsonNull()) && !jsonObj.get("responseId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `responseId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("responseId").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!ElementsInner2.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'ElementsInner2' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(ElementsInner2.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, ElementsInner2 value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public ElementsInner2 read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of ElementsInner2 given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of ElementsInner2
+ * @throws IOException if the JSON string is invalid with respect to ElementsInner2
+ */
+ public static ElementsInner2 fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, ElementsInner2.class);
+ }
+
+ /**
+ * Convert an instance of ElementsInner2 to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/FilterType.java b/src/main/java/pl/wtx/qualtrics/api/client/model/FilterType.java
deleted file mode 100644
index 71089d7..0000000
--- a/src/main/java/pl/wtx/qualtrics/api/client/model/FilterType.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Qualtrics API
- * This is the API specification for Qualtrics platform.
- *
- * The version of the OpenAPI document: 3.0.0
- *
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-
-
-package pl.wtx.qualtrics.api.client.model;
-
-import java.util.Objects;
-import com.google.gson.annotations.SerializedName;
-
-import java.io.IOException;
-import com.google.gson.TypeAdapter;
-import com.google.gson.JsonElement;
-import com.google.gson.annotations.JsonAdapter;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-
-/**
- * Gets or Sets FilterType
- */
-@JsonAdapter(FilterType.Adapter.class)
-public enum FilterType {
-
- EMAIL("email"),
-
- FIRST_NAME("firstName"),
-
- LAST_NAME("lastName"),
-
- LANGUAGE("language"),
-
- PHONE("phone"),
-
- EXT_REF("extRef"),
-
- CREATED("created"),
-
- LAST_MODIFIED("lastModified"),
-
- IN_LIST("inList"),
-
- INFO_FIELD_STATE("infoFieldState"),
-
- EMBEDDED_DATA("embeddedData");
-
- private String value;
-
- FilterType(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return String.valueOf(value);
- }
-
- public static FilterType fromValue(String value) {
- for (FilterType b : FilterType.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- throw new IllegalArgumentException("Unexpected value '" + value + "'");
- }
-
- public static class Adapter extends TypeAdapter {
- @Override
- public void write(final JsonWriter jsonWriter, final FilterType enumeration) throws IOException {
- jsonWriter.value(enumeration.getValue());
- }
-
- @Override
- public FilterType read(final JsonReader jsonReader) throws IOException {
- String value = jsonReader.nextString();
- return FilterType.fromValue(value);
- }
- }
-
- public static void validateJsonElement(JsonElement jsonElement) throws IOException {
- String value = jsonElement.getAsString();
- FilterType.fromValue(value);
- }
-}
-
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/GetContactHistoryResponse.java b/src/main/java/pl/wtx/qualtrics/api/client/model/GetContactHistoryResponse.java
new file mode 100644
index 0000000..14c92f8
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/GetContactHistoryResponse.java
@@ -0,0 +1,245 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import pl.wtx.qualtrics.api.client.model.Meta;
+import pl.wtx.qualtrics.api.client.model.Result18;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import pl.wtx.qualtrics.api.client.invoker.JSON;
+
+/**
+ * GetContactHistoryResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
+public class GetContactHistoryResponse {
+ public static final String SERIALIZED_NAME_RESULT = "result";
+ @SerializedName(SERIALIZED_NAME_RESULT)
+ @javax.annotation.Nonnull
+ private Result18 result;
+
+ public static final String SERIALIZED_NAME_META = "meta";
+ @SerializedName(SERIALIZED_NAME_META)
+ @javax.annotation.Nonnull
+ private Meta meta;
+
+ public GetContactHistoryResponse() {
+ }
+
+ public GetContactHistoryResponse result(@javax.annotation.Nonnull Result18 result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get result
+ * @return result
+ */
+ @javax.annotation.Nonnull
+ public Result18 getResult() {
+ return result;
+ }
+
+ public void setResult(@javax.annotation.Nonnull Result18 result) {
+ this.result = result;
+ }
+
+
+ public GetContactHistoryResponse meta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
+ return this;
+ }
+
+ /**
+ * Get meta
+ * @return meta
+ */
+ @javax.annotation.Nonnull
+ public Meta getMeta() {
+ return meta;
+ }
+
+ public void setMeta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GetContactHistoryResponse getContactHistoryResponse = (GetContactHistoryResponse) o;
+ return Objects.equals(this.result, getContactHistoryResponse.result) &&
+ Objects.equals(this.meta, getContactHistoryResponse.meta);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(result, meta);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GetContactHistoryResponse {\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" meta: ").append(toIndentedString(meta)).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 ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("result");
+ openapiFields.add("meta");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("result");
+ openapiRequiredFields.add("meta");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to GetContactHistoryResponse
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!GetContactHistoryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in GetContactHistoryResponse is not found in the empty JSON string", GetContactHistoryResponse.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!GetContactHistoryResponse.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetContactHistoryResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : GetContactHistoryResponse.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // validate the required field `result`
+ Result18.validateJsonElement(jsonObj.get("result"));
+ // validate the required field `meta`
+ Meta.validateJsonElement(jsonObj.get("meta"));
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!GetContactHistoryResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'GetContactHistoryResponse' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(GetContactHistoryResponse.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, GetContactHistoryResponse value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public GetContactHistoryResponse read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of GetContactHistoryResponse given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of GetContactHistoryResponse
+ * @throws IOException if the JSON string is invalid with respect to GetContactHistoryResponse
+ */
+ public static GetContactHistoryResponse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, GetContactHistoryResponse.class);
+ }
+
+ /**
+ * Convert an instance of GetContactHistoryResponse to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/GetMailingListContactResponse.java b/src/main/java/pl/wtx/qualtrics/api/client/model/GetMailingListContactResponse.java
new file mode 100644
index 0000000..88fc9d1
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/GetMailingListContactResponse.java
@@ -0,0 +1,245 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import pl.wtx.qualtrics.api.client.model.Meta;
+import pl.wtx.qualtrics.api.client.model.Result17;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import pl.wtx.qualtrics.api.client.invoker.JSON;
+
+/**
+ * GetMailingListContactResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
+public class GetMailingListContactResponse {
+ public static final String SERIALIZED_NAME_RESULT = "result";
+ @SerializedName(SERIALIZED_NAME_RESULT)
+ @javax.annotation.Nonnull
+ private Result17 result;
+
+ public static final String SERIALIZED_NAME_META = "meta";
+ @SerializedName(SERIALIZED_NAME_META)
+ @javax.annotation.Nonnull
+ private Meta meta;
+
+ public GetMailingListContactResponse() {
+ }
+
+ public GetMailingListContactResponse result(@javax.annotation.Nonnull Result17 result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get result
+ * @return result
+ */
+ @javax.annotation.Nonnull
+ public Result17 getResult() {
+ return result;
+ }
+
+ public void setResult(@javax.annotation.Nonnull Result17 result) {
+ this.result = result;
+ }
+
+
+ public GetMailingListContactResponse meta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
+ return this;
+ }
+
+ /**
+ * Get meta
+ * @return meta
+ */
+ @javax.annotation.Nonnull
+ public Meta getMeta() {
+ return meta;
+ }
+
+ public void setMeta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GetMailingListContactResponse getMailingListContactResponse = (GetMailingListContactResponse) o;
+ return Objects.equals(this.result, getMailingListContactResponse.result) &&
+ Objects.equals(this.meta, getMailingListContactResponse.meta);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(result, meta);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GetMailingListContactResponse {\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" meta: ").append(toIndentedString(meta)).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 ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("result");
+ openapiFields.add("meta");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("result");
+ openapiRequiredFields.add("meta");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to GetMailingListContactResponse
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!GetMailingListContactResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in GetMailingListContactResponse is not found in the empty JSON string", GetMailingListContactResponse.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!GetMailingListContactResponse.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetMailingListContactResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : GetMailingListContactResponse.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // validate the required field `result`
+ Result17.validateJsonElement(jsonObj.get("result"));
+ // validate the required field `meta`
+ Meta.validateJsonElement(jsonObj.get("meta"));
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!GetMailingListContactResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'GetMailingListContactResponse' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(GetMailingListContactResponse.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, GetMailingListContactResponse value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public GetMailingListContactResponse read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of GetMailingListContactResponse given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of GetMailingListContactResponse
+ * @throws IOException if the JSON string is invalid with respect to GetMailingListContactResponse
+ */
+ public static GetMailingListContactResponse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, GetMailingListContactResponse.class);
+ }
+
+ /**
+ * Convert an instance of GetMailingListContactResponse to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/pl/wtx/qualtrics/api/client/model/ListContactsInContactListResponse.java b/src/main/java/pl/wtx/qualtrics/api/client/model/ListContactsInContactListResponse.java
new file mode 100644
index 0000000..e3cc84d
--- /dev/null
+++ b/src/main/java/pl/wtx/qualtrics/api/client/model/ListContactsInContactListResponse.java
@@ -0,0 +1,245 @@
+/*
+ * Qualtrics API
+ * This is the API specification for Qualtrics platform.
+ *
+ * The version of the OpenAPI document: 3.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package pl.wtx.qualtrics.api.client.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import pl.wtx.qualtrics.api.client.model.Meta;
+import pl.wtx.qualtrics.api.client.model.Result16;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import pl.wtx.qualtrics.api.client.invoker.JSON;
+
+/**
+ * ListContactsInContactListResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0")
+public class ListContactsInContactListResponse {
+ public static final String SERIALIZED_NAME_RESULT = "result";
+ @SerializedName(SERIALIZED_NAME_RESULT)
+ @javax.annotation.Nonnull
+ private Result16 result;
+
+ public static final String SERIALIZED_NAME_META = "meta";
+ @SerializedName(SERIALIZED_NAME_META)
+ @javax.annotation.Nonnull
+ private Meta meta;
+
+ public ListContactsInContactListResponse() {
+ }
+
+ public ListContactsInContactListResponse result(@javax.annotation.Nonnull Result16 result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get result
+ * @return result
+ */
+ @javax.annotation.Nonnull
+ public Result16 getResult() {
+ return result;
+ }
+
+ public void setResult(@javax.annotation.Nonnull Result16 result) {
+ this.result = result;
+ }
+
+
+ public ListContactsInContactListResponse meta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
+ return this;
+ }
+
+ /**
+ * Get meta
+ * @return meta
+ */
+ @javax.annotation.Nonnull
+ public Meta getMeta() {
+ return meta;
+ }
+
+ public void setMeta(@javax.annotation.Nonnull Meta meta) {
+ this.meta = meta;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ListContactsInContactListResponse listContactsInContactListResponse = (ListContactsInContactListResponse) o;
+ return Objects.equals(this.result, listContactsInContactListResponse.result) &&
+ Objects.equals(this.meta, listContactsInContactListResponse.meta);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(result, meta);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ListContactsInContactListResponse {\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" meta: ").append(toIndentedString(meta)).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 ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("result");
+ openapiFields.add("meta");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("result");
+ openapiRequiredFields.add("meta");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ListContactsInContactListResponse
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ListContactsInContactListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in ListContactsInContactListResponse is not found in the empty JSON string", ListContactsInContactListResponse.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set