diff --git a/README.md b/README.md index 4db1b961..d1ea5c18 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods. See the next sections for more information on how to use the Segment Public API Java SDK. -Latest API and SDK version: 53.1.0 +Latest API and SDK version: 53.2.0 ## Requirements @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.segment.publicapi segment-publicapi - 53.1.0 + 53.2.0 compile ``` @@ -44,7 +44,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.segment.publicapi:segment-publicapi:53.1.0" + implementation "com.segment.publicapi:segment-publicapi:53.2.0" } ``` @@ -58,7 +58,7 @@ mvn clean package Then manually install the following JARs: -* `target/segment-publicapi-53.1.0.jar` +* `target/segment-publicapi-53.2.0.jar` * `target/lib/*.jar` You are now ready to start making calls to Public API! diff --git a/docs/ReverseEtlApi.md b/docs/ReverseEtlApi.md index d22678eb..e2ce6a57 100644 --- a/docs/ReverseEtlApi.md +++ b/docs/ReverseEtlApi.md @@ -9,6 +9,7 @@ All URIs are relative to *https://api.segmentapis.com* | [**deleteReverseEtlModel**](ReverseEtlApi.md#deleteReverseEtlModel) | **DELETE** /reverse-etl-models/{modelId} | Delete Reverse Etl Model | | [**getReverseETLSyncStatus**](ReverseEtlApi.md#getReverseETLSyncStatus) | **GET** /reverse-etl-models/{modelId}/syncs/{syncId} | Get Reverse ETL Sync Status | | [**getReverseEtlModel**](ReverseEtlApi.md#getReverseEtlModel) | **GET** /reverse-etl-models/{modelId} | Get Reverse Etl Model | +| [**listReverseETLSyncStatusesFromModelAndSubscriptionId**](ReverseEtlApi.md#listReverseETLSyncStatusesFromModelAndSubscriptionId) | **GET** /reverse-etl-models/{modelId}/subscriptionId/{subscriptionId}/syncs | List Reverse ETL Sync Statuses from Model And Subscription Id | | [**listReverseEtlModels**](ReverseEtlApi.md#listReverseEtlModels) | **GET** /reverse-etl-models | List Reverse Etl Models | | [**updateReverseEtlModel**](ReverseEtlApi.md#updateReverseEtlModel) | **PATCH** /reverse-etl-models/{modelId} | Update Reverse Etl Model | @@ -381,6 +382,85 @@ public class Example { | **429** | Too many requests | - | +## Operation: listReverseETLSyncStatusesFromModelAndSubscriptionId + +> ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response listReverseETLSyncStatusesFromModelAndSubscriptionId(modelId, subscriptionId, count, cursor) + +List Reverse ETL Sync Statuses from Model And Subscription Id + +Get the sync statuses for a Reverse ETL mapping subscription. The sync status includes all detailed information about the sync - sync status, duration, details about the extract and load phase if applicable, etc. The default page count is 10, and then the next page can be fetched by passing the `cursor` query parameter. + +### Example + +```java +// Import classes: +import com.segment.publicapi.ApiClient; +import com.segment.publicapi.ApiException; +import com.segment.publicapi.Configuration; +import com.segment.publicapi.auth.*; +import com.segment.publicapi.models.*; +import com.segment.publicapi.api.ReverseEtlApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP bearer authorization: token + HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token"); + token.setBearerToken("BEARER TOKEN"); + + ReverseEtlApi apiInstance = new ReverseEtlApi(defaultClient); + String modelId = "modelId"; // String | + String subscriptionId = "subscriptionId"; // String | + BigDecimal count = new BigDecimal(78); // BigDecimal | The number of items to retrieve in a page, between 1 and 100. Default is 10 This parameter exists in alpha. + String cursor = "cursor_example"; // String | The page to request. Acceptable values to use are from the `current`, `next`, and `previous` keys. This parameter exists in alpha. + try { + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response result = apiInstance.listReverseETLSyncStatusesFromModelAndSubscriptionId(modelId, subscriptionId, count, cursor); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReverseEtlApi#listReverseETLSyncStatusesFromModelAndSubscriptionId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **modelId** | **String**| | | +| **subscriptionId** | **String**| | | +| **count** | **BigDecimal**| The number of items to retrieve in a page, between 1 and 100. Default is 10 This parameter exists in alpha. | [optional] | +| **cursor** | **String**| The page to request. Acceptable values to use are from the `current`, `next`, and `previous` keys. This parameter exists in alpha. | [optional] | + +### Return type + +[**ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response**](ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.segment.v1alpha+json, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **404** | Resource not found | - | +| **422** | Validation failure | - | +| **429** | Too many requests | - | + + ## Operation: listReverseEtlModels > ListReverseEtlModels200Response listReverseEtlModels(pagination) diff --git a/pom.xml b/pom.xml index a031f1da..8b1039c3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ segment-publicapi jar segment-publicapi - 53.1.0 + 53.2.0 https://segment.com/docs/api/public-api/ Segment Public API diff --git a/src/main/java/com/segment/publicapi/ApiClient.java b/src/main/java/com/segment/publicapi/ApiClient.java index 2eb34e13..a7c98b99 100644 --- a/src/main/java/com/segment/publicapi/ApiClient.java +++ b/src/main/java/com/segment/publicapi/ApiClient.java @@ -123,7 +123,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("Public API SDK 53.1.0 (Java)"); + setUserAgent("Public API SDK 53.2.0 (Java)"); authentications = new HashMap(); } diff --git a/src/main/java/com/segment/publicapi/Configuration.java b/src/main/java/com/segment/publicapi/Configuration.java index f3bb69e2..ee2e89fc 100644 --- a/src/main/java/com/segment/publicapi/Configuration.java +++ b/src/main/java/com/segment/publicapi/Configuration.java @@ -12,7 +12,7 @@ package com.segment.publicapi; public class Configuration { - public static final String VERSION = "53.1.0"; + public static final String VERSION = "53.2.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/segment/publicapi/JSON.java b/src/main/java/com/segment/publicapi/JSON.java index 83d0ff97..320f0044 100644 --- a/src/main/java/com/segment/publicapi/JSON.java +++ b/src/main/java/com/segment/publicapi/JSON.java @@ -949,6 +949,14 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.ListRegulationsFromSourceV1Output .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.segment.publicapi.models + .ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.segment.publicapi.models + .ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.ListReverseEtlModels200Response .CustomTypeAdapterFactory()); @@ -1286,7 +1294,7 @@ private static Class getClassByDiscriminator( new com.segment.publicapi.models.ReverseETLManualSyncJobOutput .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.segment.publicapi.models.ReverseETLSyncOutput.CustomTypeAdapterFactory()); + new com.segment.publicapi.models.ReverseETLSyncStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.ReverseEtlModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( diff --git a/src/main/java/com/segment/publicapi/api/ReverseEtlApi.java b/src/main/java/com/segment/publicapi/api/ReverseEtlApi.java index 68f252c9..d72ea549 100644 --- a/src/main/java/com/segment/publicapi/api/ReverseEtlApi.java +++ b/src/main/java/com/segment/publicapi/api/ReverseEtlApi.java @@ -25,11 +25,13 @@ import com.segment.publicapi.models.DeleteReverseEtlModel200Response; import com.segment.publicapi.models.GetReverseETLSyncStatus200Response; import com.segment.publicapi.models.GetReverseEtlModel200Response; +import com.segment.publicapi.models.ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response; import com.segment.publicapi.models.ListReverseEtlModels200Response; import com.segment.publicapi.models.PaginationInput; import com.segment.publicapi.models.UpdateReverseEtlModel200Response; import com.segment.publicapi.models.UpdateReverseEtlModelInput; import java.lang.reflect.Type; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -955,6 +957,251 @@ public okhttp3.Call getReverseEtlModelAsync( return localVarCall; } + /** + * Build call for listReverseETLSyncStatusesFromModelAndSubscriptionId + * + * @param modelId (required) + * @param subscriptionId (required) + * @param count The number of items to retrieve in a page, between 1 and 100. Default is 10 This + * parameter exists in alpha. (optional) + * @param cursor The page to request. Acceptable values to use are from the `current`, + * `next`, and `previous` keys. This parameter exists in alpha. + * (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 + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
+ */ + public okhttp3.Call listReverseETLSyncStatusesFromModelAndSubscriptionIdCall( + String modelId, + String subscriptionId, + BigDecimal count, + String cursor, + 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 = + "/reverse-etl-models/{modelId}/subscriptionId/{subscriptionId}/syncs" + .replace( + "{" + "modelId" + "}", + localVarApiClient.escapeString(modelId.toString())) + .replace( + "{" + "subscriptionId" + "}", + localVarApiClient.escapeString(subscriptionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (count != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", count)); + } + + if (cursor != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); + } + + final String[] localVarAccepts = { + "application/vnd.segment.v1alpha+json", "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[] {"token"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listReverseETLSyncStatusesFromModelAndSubscriptionIdValidateBeforeCall( + String modelId, + String subscriptionId, + BigDecimal count, + String cursor, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'modelId' is set + if (modelId == null) { + throw new ApiException( + "Missing the required parameter 'modelId' when calling" + + " listReverseETLSyncStatusesFromModelAndSubscriptionId(Async)"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { + throw new ApiException( + "Missing the required parameter 'subscriptionId' when calling" + + " listReverseETLSyncStatusesFromModelAndSubscriptionId(Async)"); + } + + return listReverseETLSyncStatusesFromModelAndSubscriptionIdCall( + modelId, subscriptionId, count, cursor, _callback); + } + + /** + * List Reverse ETL Sync Statuses from Model And Subscription Id Get the sync statuses for a + * Reverse ETL mapping subscription. The sync status includes all detailed information about the + * sync - sync status, duration, details about the extract and load phase if applicable, etc. + * The default page count is 10, and then the next page can be fetched by passing the + * `cursor` query parameter. + * + * @param modelId (required) + * @param subscriptionId (required) + * @param count The number of items to retrieve in a page, between 1 and 100. Default is 10 This + * parameter exists in alpha. (optional) + * @param cursor The page to request. Acceptable values to use are from the `current`, + * `next`, and `previous` keys. This parameter exists in alpha. + * (optional) + * @return ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
+ */ + public ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + listReverseETLSyncStatusesFromModelAndSubscriptionId( + String modelId, String subscriptionId, BigDecimal count, String cursor) + throws ApiException { + ApiResponse localVarResp = + listReverseETLSyncStatusesFromModelAndSubscriptionIdWithHttpInfo( + modelId, subscriptionId, count, cursor); + return localVarResp.getData(); + } + + /** + * List Reverse ETL Sync Statuses from Model And Subscription Id Get the sync statuses for a + * Reverse ETL mapping subscription. The sync status includes all detailed information about the + * sync - sync status, duration, details about the extract and load phase if applicable, etc. + * The default page count is 10, and then the next page can be fetched by passing the + * `cursor` query parameter. + * + * @param modelId (required) + * @param subscriptionId (required) + * @param count The number of items to retrieve in a page, between 1 and 100. Default is 10 This + * parameter exists in alpha. (optional) + * @param cursor The page to request. Acceptable values to use are from the `current`, + * `next`, and `previous` keys. This parameter exists in alpha. + * (optional) + * @return ApiResponse<ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
+ */ + public ApiResponse + listReverseETLSyncStatusesFromModelAndSubscriptionIdWithHttpInfo( + String modelId, String subscriptionId, BigDecimal count, String cursor) + throws ApiException { + okhttp3.Call localVarCall = + listReverseETLSyncStatusesFromModelAndSubscriptionIdValidateBeforeCall( + modelId, subscriptionId, count, cursor, null); + Type localVarReturnType = + new TypeToken< + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response>() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Reverse ETL Sync Statuses from Model And Subscription Id (asynchronously) Get the sync + * statuses for a Reverse ETL mapping subscription. The sync status includes all detailed + * information about the sync - sync status, duration, details about the extract and load phase + * if applicable, etc. The default page count is 10, and then the next page can be fetched by + * passing the `cursor` query parameter. + * + * @param modelId (required) + * @param subscriptionId (required) + * @param count The number of items to retrieve in a page, between 1 and 100. Default is 10 This + * parameter exists in alpha. (optional) + * @param cursor The page to request. Acceptable values to use are from the `current`, + * `next`, and `previous` keys. This parameter exists in alpha. + * (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 + * + * + * + * + * + * + *
Status Code Description Response Headers
200 OK -
404 Resource not found -
422 Validation failure -
429 Too many requests -
+ */ + public okhttp3.Call listReverseETLSyncStatusesFromModelAndSubscriptionIdAsync( + String modelId, + String subscriptionId, + BigDecimal count, + String cursor, + final ApiCallback + _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listReverseETLSyncStatusesFromModelAndSubscriptionIdValidateBeforeCall( + modelId, subscriptionId, count, cursor, _callback); + Type localVarReturnType = + new TypeToken< + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response>() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** * Build call for listReverseEtlModels * diff --git a/src/main/java/com/segment/publicapi/models/GetReverseETLSyncStatusOutput.java b/src/main/java/com/segment/publicapi/models/GetReverseETLSyncStatusOutput.java index c72328cc..67e794a4 100644 --- a/src/main/java/com/segment/publicapi/models/GetReverseETLSyncStatusOutput.java +++ b/src/main/java/com/segment/publicapi/models/GetReverseETLSyncStatusOutput.java @@ -32,12 +32,12 @@ public class GetReverseETLSyncStatusOutput { public static final String SERIALIZED_NAME_REVERSE_E_T_L_SYNC_STATUS = "reverseETLSyncStatus"; @SerializedName(SERIALIZED_NAME_REVERSE_E_T_L_SYNC_STATUS) - private ReverseETLSyncOutput reverseETLSyncStatus; + private ReverseETLSyncStatus reverseETLSyncStatus; public GetReverseETLSyncStatusOutput() {} public GetReverseETLSyncStatusOutput reverseETLSyncStatus( - ReverseETLSyncOutput reverseETLSyncStatus) { + ReverseETLSyncStatus reverseETLSyncStatus) { this.reverseETLSyncStatus = reverseETLSyncStatus; return this; @@ -49,11 +49,11 @@ public GetReverseETLSyncStatusOutput reverseETLSyncStatus( * @return reverseETLSyncStatus */ @javax.annotation.Nonnull - public ReverseETLSyncOutput getReverseETLSyncStatus() { + public ReverseETLSyncStatus getReverseETLSyncStatus() { return reverseETLSyncStatus; } - public void setReverseETLSyncStatus(ReverseETLSyncOutput reverseETLSyncStatus) { + public void setReverseETLSyncStatus(ReverseETLSyncStatus reverseETLSyncStatus) { this.reverseETLSyncStatus = reverseETLSyncStatus; } @@ -153,7 +153,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `reverseETLSyncStatus` - ReverseETLSyncOutput.validateJsonElement(jsonObj.get("reverseETLSyncStatus")); + ReverseETLSyncStatus.validateJsonElement(jsonObj.get("reverseETLSyncStatus")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/segment/publicapi/models/ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.java b/src/main/java/com/segment/publicapi/models/ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.java new file mode 100644 index 00000000..40229b70 --- /dev/null +++ b/src/main/java/com/segment/publicapi/models/ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.java @@ -0,0 +1,225 @@ +/* + * Segment Public API + * The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API. + * + * Contact: friends@segment.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.segment.publicapi.models; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.segment.publicapi.JSON; +import java.io.IOException; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response */ +public class ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response { + public static final String SERIALIZED_NAME_DATA = "data"; + + @SerializedName(SERIALIZED_NAME_DATA) + private ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput data; + + public ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response() {} + + public ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response data( + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput data) { + + this.data = data; + return this; + } + + /** + * Get data + * + * @return data + */ + @javax.annotation.Nullable + public ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput getData() { + return data; + } + + public void setData(ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput data) { + this.data = data; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + listReverseETLSyncStatusesFromModelAndSubscriptionId200Response = + (ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response) o; + return Objects.equals( + this.data, listReverseETLSyncStatusesFromModelAndSubscriptionId200Response.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).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("data"); + + // 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 + * ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + .openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response" + + " is not found in the empty JSON string", + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + .openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.openapiFields + .contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response`" + + " properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.validateJsonElement( + jsonObj.get("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.class + .isAssignableFrom(type.getRawType())) { + return null; // this class only serializes + // 'ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter + thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + .class)); + + return (TypeAdapter) + new TypeAdapter< + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response>() { + @Override + public void write( + JsonWriter out, + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response read( + JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response given + * an JSON string + * + * @param jsonString JSON string + * @return An instance of ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + * @throws IOException if the JSON string is invalid with respect to + * ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response + */ + public static ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response fromJson( + String jsonString) throws IOException { + return JSON.getGson() + .fromJson( + jsonString, + ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response.class); + } + + /** + * Convert an instance of ListReverseETLSyncStatusesFromModelAndSubscriptionId200Response to an + * JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/src/main/java/com/segment/publicapi/models/ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.java b/src/main/java/com/segment/publicapi/models/ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.java new file mode 100644 index 00000000..766d64a1 --- /dev/null +++ b/src/main/java/com/segment/publicapi/models/ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.java @@ -0,0 +1,292 @@ +/* + * Segment Public API + * The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API. + * + * Contact: friends@segment.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.segment.publicapi.models; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.segment.publicapi.JSON; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** The reverse ETL sync statuses that were looked up. */ +public class ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput { + public static final String SERIALIZED_NAME_SYNC_STATUSES = "syncStatuses"; + + @SerializedName(SERIALIZED_NAME_SYNC_STATUSES) + private List syncStatuses = new ArrayList<>(); + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + + @SerializedName(SERIALIZED_NAME_PAGINATION) + private PaginationOutput pagination; + + public ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput() {} + + public ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput syncStatuses( + List syncStatuses) { + + this.syncStatuses = syncStatuses; + return this; + } + + public ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput addSyncStatusesItem( + ReverseETLSyncStatus syncStatusesItem) { + if (this.syncStatuses == null) { + this.syncStatuses = new ArrayList<>(); + } + this.syncStatuses.add(syncStatusesItem); + return this; + } + + /** + * The reverse ETL sync statuses that were looked up of the subscriptionId. + * + * @return syncStatuses + */ + @javax.annotation.Nonnull + public List getSyncStatuses() { + return syncStatuses; + } + + public void setSyncStatuses(List syncStatuses) { + this.syncStatuses = syncStatuses; + } + + public ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput pagination( + PaginationOutput pagination) { + + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * + * @return pagination + */ + @javax.annotation.Nullable + public PaginationOutput getPagination() { + return pagination; + } + + public void setPagination(PaginationOutput pagination) { + this.pagination = pagination; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + listReverseETLSyncStatusesFromModelAndSubscriptionIdOutput = + (ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput) o; + return Objects.equals( + this.syncStatuses, + listReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.syncStatuses) + && Objects.equals( + this.pagination, + listReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.pagination); + } + + @Override + public int hashCode() { + return Objects.hash(syncStatuses, pagination); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput {\n"); + sb.append(" syncStatuses: ").append(toIndentedString(syncStatuses)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).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("syncStatuses"); + openapiFields.add("pagination"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("syncStatuses"); + } + + /** + * 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 + * ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput" + + " is not found in the empty JSON string", + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + .openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput`" + + " properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.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(); + // ensure the json data is an array + if (!jsonObj.get("syncStatuses").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `syncStatuses` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("syncStatuses").toString())); + } + + JsonArray jsonArraysyncStatuses = jsonObj.getAsJsonArray("syncStatuses"); + // validate the required field `syncStatuses` (array) + for (int i = 0; i < jsonArraysyncStatuses.size(); i++) { + ReverseETLSyncStatus.validateJsonElement(jsonArraysyncStatuses.get(i)); + } + ; + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationOutput.validateJsonElement(jsonObj.get("pagination")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter + thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get( + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + .class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput read( + JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput given an + * JSON string + * + * @param jsonString JSON string + * @return An instance of ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + * @throws IOException if the JSON string is invalid with respect to + * ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput + */ + public static ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput fromJson( + String jsonString) throws IOException { + return JSON.getGson() + .fromJson( + jsonString, + ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput.class); + } + + /** + * Convert an instance of ListReverseETLSyncStatusesFromModelAndSubscriptionIdOutput to an JSON + * string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/src/main/java/com/segment/publicapi/models/ReverseETLSyncOutput.java b/src/main/java/com/segment/publicapi/models/ReverseETLSyncStatus.java similarity index 88% rename from src/main/java/com/segment/publicapi/models/ReverseETLSyncOutput.java rename to src/main/java/com/segment/publicapi/models/ReverseETLSyncStatus.java index 6943ed2d..e6626b2a 100644 --- a/src/main/java/com/segment/publicapi/models/ReverseETLSyncOutput.java +++ b/src/main/java/com/segment/publicapi/models/ReverseETLSyncStatus.java @@ -28,7 +28,7 @@ import java.util.Set; /** Defines the result of getting the sync status of a RETL connection. */ -public class ReverseETLSyncOutput { +public class ReverseETLSyncStatus { public static final String SERIALIZED_NAME_SYNC_ID = "syncId"; @SerializedName(SERIALIZED_NAME_SYNC_ID) @@ -84,9 +84,9 @@ public class ReverseETLSyncOutput { @SerializedName(SERIALIZED_NAME_ERROR_CODE) private String errorCode; - public ReverseETLSyncOutput() {} + public ReverseETLSyncStatus() {} - public ReverseETLSyncOutput syncId(String syncId) { + public ReverseETLSyncStatus syncId(String syncId) { this.syncId = syncId; return this; @@ -106,7 +106,7 @@ public void setSyncId(String syncId) { this.syncId = syncId; } - public ReverseETLSyncOutput modelId(String modelId) { + public ReverseETLSyncStatus modelId(String modelId) { this.modelId = modelId; return this; @@ -126,7 +126,7 @@ public void setModelId(String modelId) { this.modelId = modelId; } - public ReverseETLSyncOutput sourceId(String sourceId) { + public ReverseETLSyncStatus sourceId(String sourceId) { this.sourceId = sourceId; return this; @@ -146,7 +146,7 @@ public void setSourceId(String sourceId) { this.sourceId = sourceId; } - public ReverseETLSyncOutput syncStatus(String syncStatus) { + public ReverseETLSyncStatus syncStatus(String syncStatus) { this.syncStatus = syncStatus; return this; @@ -166,7 +166,7 @@ public void setSyncStatus(String syncStatus) { this.syncStatus = syncStatus; } - public ReverseETLSyncOutput duration(String duration) { + public ReverseETLSyncStatus duration(String duration) { this.duration = duration; return this; @@ -186,7 +186,7 @@ public void setDuration(String duration) { this.duration = duration; } - public ReverseETLSyncOutput startedAt(String startedAt) { + public ReverseETLSyncStatus startedAt(String startedAt) { this.startedAt = startedAt; return this; @@ -206,7 +206,7 @@ public void setStartedAt(String startedAt) { this.startedAt = startedAt; } - public ReverseETLSyncOutput finishedAt(String finishedAt) { + public ReverseETLSyncStatus finishedAt(String finishedAt) { this.finishedAt = finishedAt; return this; @@ -226,7 +226,7 @@ public void setFinishedAt(String finishedAt) { this.finishedAt = finishedAt; } - public ReverseETLSyncOutput extractPhase(SyncExtractPhase extractPhase) { + public ReverseETLSyncStatus extractPhase(SyncExtractPhase extractPhase) { this.extractPhase = extractPhase; return this; @@ -246,7 +246,7 @@ public void setExtractPhase(SyncExtractPhase extractPhase) { this.extractPhase = extractPhase; } - public ReverseETLSyncOutput loadPhase(SyncLoadPhase loadPhase) { + public ReverseETLSyncStatus loadPhase(SyncLoadPhase loadPhase) { this.loadPhase = loadPhase; return this; @@ -266,7 +266,7 @@ public void setLoadPhase(SyncLoadPhase loadPhase) { this.loadPhase = loadPhase; } - public ReverseETLSyncOutput error(String error) { + public ReverseETLSyncStatus error(String error) { this.error = error; return this; @@ -286,7 +286,7 @@ public void setError(String error) { this.error = error; } - public ReverseETLSyncOutput errorCode(String errorCode) { + public ReverseETLSyncStatus errorCode(String errorCode) { this.errorCode = errorCode; return this; @@ -314,18 +314,18 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReverseETLSyncOutput reverseETLSyncOutput = (ReverseETLSyncOutput) o; - return Objects.equals(this.syncId, reverseETLSyncOutput.syncId) - && Objects.equals(this.modelId, reverseETLSyncOutput.modelId) - && Objects.equals(this.sourceId, reverseETLSyncOutput.sourceId) - && Objects.equals(this.syncStatus, reverseETLSyncOutput.syncStatus) - && Objects.equals(this.duration, reverseETLSyncOutput.duration) - && Objects.equals(this.startedAt, reverseETLSyncOutput.startedAt) - && Objects.equals(this.finishedAt, reverseETLSyncOutput.finishedAt) - && Objects.equals(this.extractPhase, reverseETLSyncOutput.extractPhase) - && Objects.equals(this.loadPhase, reverseETLSyncOutput.loadPhase) - && Objects.equals(this.error, reverseETLSyncOutput.error) - && Objects.equals(this.errorCode, reverseETLSyncOutput.errorCode); + ReverseETLSyncStatus reverseETLSyncStatus = (ReverseETLSyncStatus) o; + return Objects.equals(this.syncId, reverseETLSyncStatus.syncId) + && Objects.equals(this.modelId, reverseETLSyncStatus.modelId) + && Objects.equals(this.sourceId, reverseETLSyncStatus.sourceId) + && Objects.equals(this.syncStatus, reverseETLSyncStatus.syncStatus) + && Objects.equals(this.duration, reverseETLSyncStatus.duration) + && Objects.equals(this.startedAt, reverseETLSyncStatus.startedAt) + && Objects.equals(this.finishedAt, reverseETLSyncStatus.finishedAt) + && Objects.equals(this.extractPhase, reverseETLSyncStatus.extractPhase) + && Objects.equals(this.loadPhase, reverseETLSyncStatus.loadPhase) + && Objects.equals(this.error, reverseETLSyncStatus.error) + && Objects.equals(this.errorCode, reverseETLSyncStatus.errorCode); } @Override @@ -347,7 +347,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReverseETLSyncOutput {\n"); + sb.append("class ReverseETLSyncStatus {\n"); sb.append(" syncId: ").append(toIndentedString(syncId)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); @@ -406,34 +406,34 @@ 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 ReverseETLSyncOutput + * @throws IOException if the JSON Element is invalid with respect to ReverseETLSyncStatus */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ReverseETLSyncOutput.openapiRequiredFields + if (!ReverseETLSyncStatus.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in ReverseETLSyncOutput is not found in" + "The required field(s) %s in ReverseETLSyncStatus is not found in" + " the empty JSON string", - ReverseETLSyncOutput.openapiRequiredFields.toString())); + ReverseETLSyncStatus.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ReverseETLSyncOutput.openapiFields.contains(entry.getKey())) { + if (!ReverseETLSyncStatus.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `ReverseETLSyncOutput` properties. JSON: %s", + + " `ReverseETLSyncStatus` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReverseETLSyncOutput.openapiRequiredFields) { + for (String requiredField : ReverseETLSyncStatus.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException( String.format( @@ -522,24 +522,24 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReverseETLSyncOutput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReverseETLSyncOutput' and its subtypes + if (!ReverseETLSyncStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReverseETLSyncStatus' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReverseETLSyncOutput.class)); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ReverseETLSyncStatus.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, ReverseETLSyncOutput value) + public void write(JsonWriter out, ReverseETLSyncStatus value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ReverseETLSyncOutput read(JsonReader in) throws IOException { + public ReverseETLSyncStatus read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -549,18 +549,18 @@ public ReverseETLSyncOutput read(JsonReader in) throws IOException { } /** - * Create an instance of ReverseETLSyncOutput given an JSON string + * Create an instance of ReverseETLSyncStatus given an JSON string * * @param jsonString JSON string - * @return An instance of ReverseETLSyncOutput - * @throws IOException if the JSON string is invalid with respect to ReverseETLSyncOutput + * @return An instance of ReverseETLSyncStatus + * @throws IOException if the JSON string is invalid with respect to ReverseETLSyncStatus */ - public static ReverseETLSyncOutput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReverseETLSyncOutput.class); + public static ReverseETLSyncStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReverseETLSyncStatus.class); } /** - * Convert an instance of ReverseETLSyncOutput to an JSON string + * Convert an instance of ReverseETLSyncStatus to an JSON string * * @return JSON string */