diff --git a/docs/SpaceFiltersApi.md b/docs/SpaceFiltersApi.md index 2969ff6a..3c2cf5a4 100644 --- a/docs/SpaceFiltersApi.md +++ b/docs/SpaceFiltersApi.md @@ -4,21 +4,21 @@ All URIs are relative to *https://api.segmentapis.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createFilter**](SpaceFiltersApi.md#createFilter) | **POST** /filters | Create Filter | +| [**createFilterForSpace**](SpaceFiltersApi.md#createFilterForSpace) | **POST** /filters | Create Filter for Space | | [**deleteFilterById**](SpaceFiltersApi.md#deleteFilterById) | **DELETE** /filters/{id} | Delete Filter By Id | | [**getFilterById**](SpaceFiltersApi.md#getFilterById) | **GET** /filters/{id} | Get Filter By Id | -| [**listFiltersByIntegrationId**](SpaceFiltersApi.md#listFiltersByIntegrationId) | **GET** /filters | List Filters By Integration Id | +| [**listFiltersForSpace**](SpaceFiltersApi.md#listFiltersForSpace) | **GET** /filters | List Filters for Space | | [**updateFilterById**](SpaceFiltersApi.md#updateFilterById) | **PATCH** /filters/{id} | Update Filter By Id | -## Operation: createFilter +## Operation: createFilterForSpace -> CreateFilter200Response createFilter(createFilterInput) +> CreateFilterForSpace200Response createFilterForSpace(createFilterForSpaceInput) -Create Filter +Create Filter for Space -Creates a filter. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Created` event in the [audit trail](/tag/Audit-Trail). +Creates a filter for a space. A space filter applies to events coming from all Sources connected to a space. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Created` event in the [audit trail](/tag/Audit-Trail). ### Example @@ -40,12 +40,12 @@ public class Example { token.setBearerToken("BEARER TOKEN"); SpaceFiltersApi apiInstance = new SpaceFiltersApi(defaultClient); - CreateFilterInput createFilterInput = new CreateFilterInput(); // CreateFilterInput | + CreateFilterForSpaceInput createFilterForSpaceInput = new CreateFilterForSpaceInput(); // CreateFilterForSpaceInput | try { - CreateFilter200Response result = apiInstance.createFilter(createFilterInput); + CreateFilterForSpace200Response result = apiInstance.createFilterForSpace(createFilterForSpaceInput); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SpaceFiltersApi#createFilter"); + System.err.println("Exception when calling SpaceFiltersApi#createFilterForSpace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -60,11 +60,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **createFilterInput** | [**CreateFilterInput**](CreateFilterInput.md)| | | +| **createFilterForSpaceInput** | [**CreateFilterForSpaceInput**](CreateFilterForSpaceInput.md)| | | ### Return type -[**CreateFilter200Response**](CreateFilter200Response.md) +[**CreateFilterForSpace200Response**](CreateFilterForSpace200Response.md) ### Authorization @@ -72,8 +72,8 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/vnd.segment.v1alpha+json -- **Accept**: application/vnd.segment.v1alpha+json, application/json +- **Content-Type**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json +- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json ### HTTP response details @@ -91,7 +91,7 @@ public class Example { Delete Filter By Id -Deletes a filter by id. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Deleted` event in the [audit trail](/tag/Audit-Trail). +Deletes a filter by id. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Deleted` event in the [audit trail](/tag/Audit-Trail). ### Example @@ -146,7 +146,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/vnd.segment.v1alpha+json, application/json +- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json ### HTTP response details @@ -164,7 +164,7 @@ public class Example { Get Filter By Id -Gets a filter by id. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. +Gets a filter by id. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. ### Example @@ -219,7 +219,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/vnd.segment.v1alpha+json, application/json +- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json ### HTTP response details @@ -231,13 +231,13 @@ public class Example { | **429** | Too many requests | - | -## Operation: listFiltersByIntegrationId +## Operation: listFiltersForSpace -> ListFiltersByIntegrationId200Response listFiltersByIntegrationId(integrationId, pagination) +> ListFiltersForSpace200Response listFiltersForSpace(integrationId, pagination) -List Filters By Integration Id +List Filters for Space -Lists filters by Integration id. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. +Lists filters for a space. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. ### Example @@ -259,13 +259,13 @@ public class Example { token.setBearerToken("BEARER TOKEN"); SpaceFiltersApi apiInstance = new SpaceFiltersApi(defaultClient); - String integrationId = ""; // String | The integration id used to fetch filters. This parameter exists in alpha. - ListFiltersPaginationInput pagination = new ListFiltersPaginationInput(); // ListFiltersPaginationInput | Pagination parameters. This parameter exists in alpha. + String integrationId = ""; // String | The Space Id for which to fetch filters This parameter exists in beta. + ListFiltersPaginationInput pagination = new ListFiltersPaginationInput(); // ListFiltersPaginationInput | Pagination parameters. This parameter exists in beta. try { - ListFiltersByIntegrationId200Response result = apiInstance.listFiltersByIntegrationId(integrationId, pagination); + ListFiltersForSpace200Response result = apiInstance.listFiltersForSpace(integrationId, pagination); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling SpaceFiltersApi#listFiltersByIntegrationId"); + System.err.println("Exception when calling SpaceFiltersApi#listFiltersForSpace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -280,12 +280,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **integrationId** | **String**| The integration id used to fetch filters. This parameter exists in alpha. | | -| **pagination** | [**ListFiltersPaginationInput**](.md)| Pagination parameters. This parameter exists in alpha. | [optional] | +| **integrationId** | **String**| The Space Id for which to fetch filters This parameter exists in beta. | | +| **pagination** | [**ListFiltersPaginationInput**](.md)| Pagination parameters. This parameter exists in beta. | [optional] | ### Return type -[**ListFiltersByIntegrationId200Response**](ListFiltersByIntegrationId200Response.md) +[**ListFiltersForSpace200Response**](ListFiltersForSpace200Response.md) ### Authorization @@ -294,7 +294,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/vnd.segment.v1alpha+json, application/json +- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json ### HTTP response details @@ -312,7 +312,7 @@ public class Example { Update Filter By Id -Updates a filter by id and replaces the existing filter. • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Updated` event in the [audit trail](/tag/Audit-Trail). +Updates a filter by id and replaces the existing filter. • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In order to successfully call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Filter Updated` event in the [audit trail](/tag/Audit-Trail). ### Example @@ -368,8 +368,8 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/vnd.segment.v1alpha+json -- **Accept**: application/vnd.segment.v1alpha+json, application/json +- **Content-Type**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json +- **Accept**: application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json, application/json ### HTTP response details diff --git a/src/main/java/com/segment/publicapi/JSON.java b/src/main/java/com/segment/publicapi/JSON.java index 09ec404d..f16a4cec 100644 --- a/src/main/java/com/segment/publicapi/JSON.java +++ b/src/main/java/com/segment/publicapi/JSON.java @@ -250,9 +250,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.CreateEdgeFunctionsAlphaOutput .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.segment.publicapi.models.CreateFilter200Response - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.CreateFilterForDestination200Response .CustomTypeAdapterFactory()); @@ -263,9 +260,14 @@ private static Class getClassByDiscriminator( new com.segment.publicapi.models.CreateFilterForDestinationV1Output .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.segment.publicapi.models.CreateFilterInput.CustomTypeAdapterFactory()); + new com.segment.publicapi.models.CreateFilterForSpace200Response + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.segment.publicapi.models.CreateFilterForSpaceInput + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.segment.publicapi.models.CreateFilterOutput.CustomTypeAdapterFactory()); + new com.segment.publicapi.models.CreateFilterForSpaceOutput + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.CreateFunction200Response .CustomTypeAdapterFactory()); @@ -908,10 +910,10 @@ private static Class getClassByDiscriminator( new com.segment.publicapi.models.ListDestinationsV1Output .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.segment.publicapi.models.ListFiltersByIntegrationId200Response + new com.segment.publicapi.models.ListFiltersForSpace200Response .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new com.segment.publicapi.models.ListFiltersByIntegrationIdOutput + new com.segment.publicapi.models.ListFiltersForSpaceOutput .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.segment.publicapi.models.ListFiltersFromDestination200Response diff --git a/src/main/java/com/segment/publicapi/api/SpaceFiltersApi.java b/src/main/java/com/segment/publicapi/api/SpaceFiltersApi.java index e49a37e6..c1180690 100644 --- a/src/main/java/com/segment/publicapi/api/SpaceFiltersApi.java +++ b/src/main/java/com/segment/publicapi/api/SpaceFiltersApi.java @@ -18,11 +18,11 @@ import com.segment.publicapi.ApiResponse; import com.segment.publicapi.Configuration; import com.segment.publicapi.Pair; -import com.segment.publicapi.models.CreateFilter200Response; -import com.segment.publicapi.models.CreateFilterInput; +import com.segment.publicapi.models.CreateFilterForSpace200Response; +import com.segment.publicapi.models.CreateFilterForSpaceInput; import com.segment.publicapi.models.DeleteFilterById200Response; import com.segment.publicapi.models.GetFilterById200Response; -import com.segment.publicapi.models.ListFiltersByIntegrationId200Response; +import com.segment.publicapi.models.ListFiltersForSpace200Response; import com.segment.publicapi.models.ListFiltersPaginationInput; import com.segment.publicapi.models.UpdateFilterById200Response; import com.segment.publicapi.models.UpdateFilterByIdInput; @@ -70,9 +70,9 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for createFilter + * Build call for createFilterForSpace * - * @param createFilterInput (required) + * @param createFilterForSpaceInput (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -85,8 +85,9 @@ public void setCustomBaseUrl(String customBaseUrl) { * 429 Too many requests - * */ - public okhttp3.Call createFilterCall( - CreateFilterInput createFilterInput, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createFilterForSpaceCall( + CreateFilterForSpaceInput createFilterForSpaceInput, final ApiCallback _callback) + throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] {}; @@ -100,7 +101,7 @@ public okhttp3.Call createFilterCall( basePath = null; } - Object localVarPostBody = createFilterInput; + Object localVarPostBody = createFilterForSpaceInput; // create path and map variables String localVarPath = "/filters"; @@ -112,14 +113,18 @@ public okhttp3.Call createFilterCall( Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/vnd.segment.v1alpha+json", "application/json" + "application/vnd.segment.v1beta+json", + "application/vnd.segment.v1alpha+json", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/vnd.segment.v1alpha+json"}; + final String[] localVarContentTypes = { + "application/vnd.segment.v1beta+json", "application/vnd.segment.v1alpha+json" + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -142,27 +147,29 @@ public okhttp3.Call createFilterCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call createFilterValidateBeforeCall( - CreateFilterInput createFilterInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createFilterInput' is set - if (createFilterInput == null) { + private okhttp3.Call createFilterForSpaceValidateBeforeCall( + CreateFilterForSpaceInput createFilterForSpaceInput, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createFilterForSpaceInput' is set + if (createFilterForSpaceInput == null) { throw new ApiException( - "Missing the required parameter 'createFilterInput' when calling" - + " createFilter(Async)"); + "Missing the required parameter 'createFilterForSpaceInput' when calling" + + " createFilterForSpace(Async)"); } - return createFilterCall(createFilterInput, _callback); + return createFilterForSpaceCall(createFilterForSpaceInput, _callback); } /** - * Create Filter Creates a filter. • This endpoint is in **Alpha** testing. Please submit any - * feedback by sending an email to friends@segment.com. • In order to successfully call this + * Create Filter for Space Creates a filter for a space. A space filter applies to events coming + * from all Sources connected to a space. • This endpoint is in **Beta** testing. Please submit + * any feedback by sending an email to friends@segment.com. • In order to successfully call this * endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please * reach out to your customer success manager for more information. • When called, this endpoint * may generate the `Filter Created` event in the [audit trail](/tag/Audit-Trail). * - * @param createFilterInput (required) - * @return CreateFilter200Response + * @param createFilterForSpaceInput (required) + * @return CreateFilterForSpace200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details @@ -174,22 +181,23 @@ private okhttp3.Call createFilterValidateBeforeCall( * 429 Too many requests - * */ - public CreateFilter200Response createFilter(CreateFilterInput createFilterInput) - throws ApiException { - ApiResponse localVarResp = - createFilterWithHttpInfo(createFilterInput); + public CreateFilterForSpace200Response createFilterForSpace( + CreateFilterForSpaceInput createFilterForSpaceInput) throws ApiException { + ApiResponse localVarResp = + createFilterForSpaceWithHttpInfo(createFilterForSpaceInput); return localVarResp.getData(); } /** - * Create Filter Creates a filter. • This endpoint is in **Alpha** testing. Please submit any - * feedback by sending an email to friends@segment.com. • In order to successfully call this + * Create Filter for Space Creates a filter for a space. A space filter applies to events coming + * from all Sources connected to a space. • This endpoint is in **Beta** testing. Please submit + * any feedback by sending an email to friends@segment.com. • In order to successfully call this * endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please * reach out to your customer success manager for more information. • When called, this endpoint * may generate the `Filter Created` event in the [audit trail](/tag/Audit-Trail). * - * @param createFilterInput (required) - * @return ApiResponse<CreateFilter200Response> + * @param createFilterForSpaceInput (required) + * @return ApiResponse<CreateFilterForSpace200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details @@ -201,22 +209,24 @@ public CreateFilter200Response createFilter(CreateFilterInput createFilterInput) * 429 Too many requests - * */ - public ApiResponse createFilterWithHttpInfo( - CreateFilterInput createFilterInput) throws ApiException { - okhttp3.Call localVarCall = createFilterValidateBeforeCall(createFilterInput, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse createFilterForSpaceWithHttpInfo( + CreateFilterForSpaceInput createFilterForSpaceInput) throws ApiException { + okhttp3.Call localVarCall = + createFilterForSpaceValidateBeforeCall(createFilterForSpaceInput, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Create Filter (asynchronously) Creates a filter. • This endpoint is in **Alpha** testing. - * Please submit any feedback by sending an email to friends@segment.com. • In order to + * Create Filter for Space (asynchronously) Creates a filter for a space. A space filter applies + * to events coming from all Sources connected to a space. • This endpoint is in **Beta** + * testing. Please submit any feedback by sending an email to friends@segment.com. • In order to * successfully call this endpoint, the specified Workspace needs to have the Space Filters * feature enabled. Please reach out to your customer success manager for more information. • * When called, this endpoint may generate the `Filter Created` event in the [audit * trail](/tag/Audit-Trail). * - * @param createFilterInput (required) + * @param createFilterForSpaceInput (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 @@ -230,13 +240,14 @@ public ApiResponse createFilterWithHttpInfo( * 429 Too many requests - * */ - public okhttp3.Call createFilterAsync( - CreateFilterInput createFilterInput, - final ApiCallback _callback) + public okhttp3.Call createFilterForSpaceAsync( + CreateFilterForSpaceInput createFilterForSpaceInput, + final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createFilterValidateBeforeCall(createFilterInput, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + okhttp3.Call localVarCall = + createFilterForSpaceValidateBeforeCall(createFilterForSpaceInput, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -286,7 +297,9 @@ public okhttp3.Call deleteFilterByIdCall(String id, final ApiCallback _callback) Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/vnd.segment.v1alpha+json", "application/json" + "application/vnd.segment.v1beta+json", + "application/vnd.segment.v1alpha+json", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -328,7 +341,7 @@ private okhttp3.Call deleteFilterByIdValidateBeforeCall(String id, final ApiCall } /** - * Delete Filter By Id Deletes a filter by id. • This endpoint is in **Alpha** testing. Please + * Delete Filter By Id Deletes a filter by id. • This endpoint is in **Beta** testing. Please * submit any feedback by sending an email to friends@segment.com. • In order to successfully * call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. * Please reach out to your customer success manager for more information. • When called, this @@ -354,7 +367,7 @@ public DeleteFilterById200Response deleteFilterById(String id) throws ApiExcepti } /** - * Delete Filter By Id Deletes a filter by id. • This endpoint is in **Alpha** testing. Please + * Delete Filter By Id Deletes a filter by id. • This endpoint is in **Beta** testing. Please * submit any feedback by sending an email to friends@segment.com. • In order to successfully * call this endpoint, the specified Workspace needs to have the Space Filters feature enabled. * Please reach out to your customer success manager for more information. • When called, this @@ -382,7 +395,7 @@ public ApiResponse deleteFilterByIdWithHttpInfo(Str } /** - * Delete Filter By Id (asynchronously) Deletes a filter by id. • This endpoint is in **Alpha** + * Delete Filter By Id (asynchronously) Deletes a filter by id. • This endpoint is in **Beta** * testing. Please submit any feedback by sending an email to friends@segment.com. • In order to * successfully call this endpoint, the specified Workspace needs to have the Space Filters * feature enabled. Please reach out to your customer success manager for more information. • @@ -458,7 +471,9 @@ public okhttp3.Call getFilterByIdCall(String id, final ApiCallback _callback) Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/vnd.segment.v1alpha+json", "application/json" + "application/vnd.segment.v1beta+json", + "application/vnd.segment.v1alpha+json", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -500,7 +515,7 @@ private okhttp3.Call getFilterByIdValidateBeforeCall(String id, final ApiCallbac } /** - * Get Filter By Id Gets a filter by id. • This endpoint is in **Alpha** testing. Please submit + * Get Filter By Id Gets a filter by id. • This endpoint is in **Beta** testing. Please submit * any feedback by sending an email to friends@segment.com. • In order to successfully call this * endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please * reach out to your customer success manager for more information. @@ -524,7 +539,7 @@ public GetFilterById200Response getFilterById(String id) throws ApiException { } /** - * Get Filter By Id Gets a filter by id. • This endpoint is in **Alpha** testing. Please submit + * Get Filter By Id Gets a filter by id. • This endpoint is in **Beta** testing. Please submit * any feedback by sending an email to friends@segment.com. • In order to successfully call this * endpoint, the specified Workspace needs to have the Space Filters feature enabled. Please * reach out to your customer success manager for more information. @@ -550,7 +565,7 @@ public ApiResponse getFilterByIdWithHttpInfo(String id } /** - * Get Filter By Id (asynchronously) Gets a filter by id. • This endpoint is in **Alpha** + * Get Filter By Id (asynchronously) Gets a filter by id. • This endpoint is in **Beta** * testing. Please submit any feedback by sending an email to friends@segment.com. • In order to * successfully call this endpoint, the specified Workspace needs to have the Space Filters * feature enabled. Please reach out to your customer success manager for more information. @@ -579,11 +594,11 @@ public okhttp3.Call getFilterByIdAsync( } /** - * Build call for listFiltersByIntegrationId + * Build call for listFiltersForSpace * - * @param integrationId The integration id used to fetch filters. This parameter exists in - * alpha. (required) - * @param pagination Pagination parameters. This parameter exists in alpha. (optional) + * @param integrationId The Space Id for which to fetch filters This parameter exists in beta. + * (required) + * @param pagination Pagination parameters. This parameter exists in beta. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -596,7 +611,7 @@ public okhttp3.Call getFilterByIdAsync( * 429 Too many requests - * */ - public okhttp3.Call listFiltersByIntegrationIdCall( + public okhttp3.Call listFiltersForSpaceCall( String integrationId, ListFiltersPaginationInput pagination, final ApiCallback _callback) @@ -635,7 +650,9 @@ public okhttp3.Call listFiltersByIntegrationIdCall( } final String[] localVarAccepts = { - "application/vnd.segment.v1alpha+json", "application/json" + "application/vnd.segment.v1beta+json", + "application/vnd.segment.v1alpha+json", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -665,7 +682,7 @@ public okhttp3.Call listFiltersByIntegrationIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call listFiltersByIntegrationIdValidateBeforeCall( + private okhttp3.Call listFiltersForSpaceValidateBeforeCall( String integrationId, ListFiltersPaginationInput pagination, final ApiCallback _callback) @@ -674,23 +691,22 @@ private okhttp3.Call listFiltersByIntegrationIdValidateBeforeCall( if (integrationId == null) { throw new ApiException( "Missing the required parameter 'integrationId' when calling" - + " listFiltersByIntegrationId(Async)"); + + " listFiltersForSpace(Async)"); } - return listFiltersByIntegrationIdCall(integrationId, pagination, _callback); + return listFiltersForSpaceCall(integrationId, pagination, _callback); } /** - * List Filters By Integration Id Lists filters by Integration id. • This endpoint is in - * **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • - * In order to successfully call this endpoint, the specified Workspace needs to have the Space - * Filters feature enabled. Please reach out to your customer success manager for more - * information. + * List Filters for Space Lists filters for a space. • This endpoint is in **Beta** testing. + * Please submit any feedback by sending an email to friends@segment.com. • In order to + * successfully call this endpoint, the specified Workspace needs to have the Space Filters + * feature enabled. Please reach out to your customer success manager for more information. * - * @param integrationId The integration id used to fetch filters. This parameter exists in - * alpha. (required) - * @param pagination Pagination parameters. This parameter exists in alpha. (optional) - * @return ListFiltersByIntegrationId200Response + * @param integrationId The Space Id for which to fetch filters This parameter exists in beta. + * (required) + * @param pagination Pagination parameters. This parameter exists in beta. (optional) + * @return ListFiltersForSpace200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details @@ -702,24 +718,23 @@ private okhttp3.Call listFiltersByIntegrationIdValidateBeforeCall( * 429 Too many requests - * */ - public ListFiltersByIntegrationId200Response listFiltersByIntegrationId( + public ListFiltersForSpace200Response listFiltersForSpace( String integrationId, ListFiltersPaginationInput pagination) throws ApiException { - ApiResponse localVarResp = - listFiltersByIntegrationIdWithHttpInfo(integrationId, pagination); + ApiResponse localVarResp = + listFiltersForSpaceWithHttpInfo(integrationId, pagination); return localVarResp.getData(); } /** - * List Filters By Integration Id Lists filters by Integration id. • This endpoint is in - * **Alpha** testing. Please submit any feedback by sending an email to friends@segment.com. • - * In order to successfully call this endpoint, the specified Workspace needs to have the Space - * Filters feature enabled. Please reach out to your customer success manager for more - * information. + * List Filters for Space Lists filters for a space. • This endpoint is in **Beta** testing. + * Please submit any feedback by sending an email to friends@segment.com. • In order to + * successfully call this endpoint, the specified Workspace needs to have the Space Filters + * feature enabled. Please reach out to your customer success manager for more information. * - * @param integrationId The integration id used to fetch filters. This parameter exists in - * alpha. (required) - * @param pagination Pagination parameters. This parameter exists in alpha. (optional) - * @return ApiResponse<ListFiltersByIntegrationId200Response> + * @param integrationId The Space Id for which to fetch filters This parameter exists in beta. + * (required) + * @param pagination Pagination parameters. This parameter exists in beta. (optional) + * @return ApiResponse<ListFiltersForSpace200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details @@ -731,27 +746,24 @@ public ListFiltersByIntegrationId200Response listFiltersByIntegrationId( * 429 Too many requests - * */ - public ApiResponse - listFiltersByIntegrationIdWithHttpInfo( - String integrationId, ListFiltersPaginationInput pagination) - throws ApiException { + public ApiResponse listFiltersForSpaceWithHttpInfo( + String integrationId, ListFiltersPaginationInput pagination) throws ApiException { okhttp3.Call localVarCall = - listFiltersByIntegrationIdValidateBeforeCall(integrationId, pagination, null); - Type localVarReturnType = - new TypeToken() {}.getType(); + listFiltersForSpaceValidateBeforeCall(integrationId, pagination, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * List Filters By Integration Id (asynchronously) Lists filters by Integration id. • This - * endpoint is in **Alpha** testing. Please submit any feedback by sending an email to - * friends@segment.com. • In order to successfully call this endpoint, the specified Workspace - * needs to have the Space Filters feature enabled. Please reach out to your customer success - * manager for more information. + * List Filters for Space (asynchronously) Lists filters for a space. • This endpoint is in + * **Beta** testing. Please submit any feedback by sending an email to friends@segment.com. • In + * order to successfully call this endpoint, the specified Workspace needs to have the Space + * Filters feature enabled. Please reach out to your customer success manager for more + * information. * - * @param integrationId The integration id used to fetch filters. This parameter exists in - * alpha. (required) - * @param pagination Pagination parameters. This parameter exists in alpha. (optional) + * @param integrationId The Space Id for which to fetch filters This parameter exists in beta. + * (required) + * @param pagination Pagination parameters. This parameter exists in beta. (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 @@ -765,16 +777,15 @@ public ListFiltersByIntegrationId200Response listFiltersByIntegrationId( * 429 Too many requests - * */ - public okhttp3.Call listFiltersByIntegrationIdAsync( + public okhttp3.Call listFiltersForSpaceAsync( String integrationId, ListFiltersPaginationInput pagination, - final ApiCallback _callback) + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - listFiltersByIntegrationIdValidateBeforeCall(integrationId, pagination, _callback); - Type localVarReturnType = - new TypeToken() {}.getType(); + listFiltersForSpaceValidateBeforeCall(integrationId, pagination, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -826,14 +837,18 @@ public okhttp3.Call updateFilterByIdCall( Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/vnd.segment.v1alpha+json", "application/json" + "application/vnd.segment.v1beta+json", + "application/vnd.segment.v1alpha+json", + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {"application/vnd.segment.v1alpha+json"}; + final String[] localVarContentTypes = { + "application/vnd.segment.v1beta+json", "application/vnd.segment.v1alpha+json" + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -877,7 +892,7 @@ private okhttp3.Call updateFilterByIdValidateBeforeCall( /** * Update Filter By Id Updates a filter by id and replaces the existing filter. • This endpoint - * is in **Alpha** testing. Please submit any feedback by sending an email to + * is in **Beta** testing. Please submit any feedback by sending an email to * friends@segment.com. • In order to successfully call this endpoint, the specified Workspace * needs to have the Space Filters feature enabled. Please reach out to your customer success * manager for more information. • When called, this endpoint may generate the `Filter @@ -906,7 +921,7 @@ public UpdateFilterById200Response updateFilterById( /** * Update Filter By Id Updates a filter by id and replaces the existing filter. • This endpoint - * is in **Alpha** testing. Please submit any feedback by sending an email to + * is in **Beta** testing. Please submit any feedback by sending an email to * friends@segment.com. • In order to successfully call this endpoint, the specified Workspace * needs to have the Space Filters feature enabled. Please reach out to your customer success * manager for more information. • When called, this endpoint may generate the `Filter @@ -936,7 +951,7 @@ public ApiResponse updateFilterByIdWithHttpInfo( /** * Update Filter By Id (asynchronously) Updates a filter by id and replaces the existing filter. - * • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to + * • This endpoint is in **Beta** testing. Please submit any feedback by sending an email to * friends@segment.com. • In order to successfully call this endpoint, the specified Workspace * needs to have the Space Filters feature enabled. Please reach out to your customer success * manager for more information. • When called, this endpoint may generate the `Filter diff --git a/src/main/java/com/segment/publicapi/models/CreateFilter200Response.java b/src/main/java/com/segment/publicapi/models/CreateFilterForSpace200Response.java similarity index 70% rename from src/main/java/com/segment/publicapi/models/CreateFilter200Response.java rename to src/main/java/com/segment/publicapi/models/CreateFilterForSpace200Response.java index 6afb6664..587158e9 100644 --- a/src/main/java/com/segment/publicapi/models/CreateFilter200Response.java +++ b/src/main/java/com/segment/publicapi/models/CreateFilterForSpace200Response.java @@ -27,16 +27,16 @@ import java.util.Objects; import java.util.Set; -/** CreateFilter200Response */ -public class CreateFilter200Response { +/** CreateFilterForSpace200Response */ +public class CreateFilterForSpace200Response { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private CreateFilterOutput data; + private CreateFilterForSpaceOutput data; - public CreateFilter200Response() {} + public CreateFilterForSpace200Response() {} - public CreateFilter200Response data(CreateFilterOutput data) { + public CreateFilterForSpace200Response data(CreateFilterForSpaceOutput data) { this.data = data; return this; @@ -48,11 +48,11 @@ public CreateFilter200Response data(CreateFilterOutput data) { * @return data */ @javax.annotation.Nullable - public CreateFilterOutput getData() { + public CreateFilterForSpaceOutput getData() { return data; } - public void setData(CreateFilterOutput data) { + public void setData(CreateFilterForSpaceOutput data) { this.data = data; } @@ -64,8 +64,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateFilter200Response createFilter200Response = (CreateFilter200Response) o; - return Objects.equals(this.data, createFilter200Response.data); + CreateFilterForSpace200Response createFilterForSpace200Response = + (CreateFilterForSpace200Response) o; + return Objects.equals(this.data, createFilterForSpace200Response.data); } @Override @@ -76,7 +77,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateFilter200Response {\n"); + sb.append("class CreateFilterForSpace200Response {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -109,35 +110,36 @@ 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 CreateFilter200Response + * @throws IOException if the JSON Element is invalid with respect to + * CreateFilterForSpace200Response */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateFilter200Response.openapiRequiredFields + if (!CreateFilterForSpace200Response.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in CreateFilter200Response is not found" - + " in the empty JSON string", - CreateFilter200Response.openapiRequiredFields.toString())); + "The required field(s) %s in CreateFilterForSpace200Response is not" + + " found in the empty JSON string", + CreateFilterForSpace200Response.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateFilter200Response.openapiFields.contains(entry.getKey())) { + if (!CreateFilterForSpace200Response.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `CreateFilter200Response` properties. JSON: %s", + + " `CreateFilterForSpace200Response` 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()) { - CreateFilterOutput.validateJsonElement(jsonObj.get("data")); + CreateFilterForSpaceOutput.validateJsonElement(jsonObj.get("data")); } } @@ -145,25 +147,27 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFilter200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFilter200Response' and its + if (!CreateFilterForSpace200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateFilterForSpace200Response' and its // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateFilter200Response.class)); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CreateFilterForSpace200Response.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, CreateFilter200Response value) + public void write(JsonWriter out, CreateFilterForSpace200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateFilter200Response read(JsonReader in) throws IOException { + public CreateFilterForSpace200Response read(JsonReader in) + throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -173,18 +177,19 @@ public CreateFilter200Response read(JsonReader in) throws IOException { } /** - * Create an instance of CreateFilter200Response given an JSON string + * Create an instance of CreateFilterForSpace200Response given an JSON string * * @param jsonString JSON string - * @return An instance of CreateFilter200Response - * @throws IOException if the JSON string is invalid with respect to CreateFilter200Response + * @return An instance of CreateFilterForSpace200Response + * @throws IOException if the JSON string is invalid with respect to + * CreateFilterForSpace200Response */ - public static CreateFilter200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFilter200Response.class); + public static CreateFilterForSpace200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateFilterForSpace200Response.class); } /** - * Convert an instance of CreateFilter200Response to an JSON string + * Convert an instance of CreateFilterForSpace200Response to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/segment/publicapi/models/CreateFilterInput.java b/src/main/java/com/segment/publicapi/models/CreateFilterForSpaceInput.java similarity index 82% rename from src/main/java/com/segment/publicapi/models/CreateFilterInput.java rename to src/main/java/com/segment/publicapi/models/CreateFilterForSpaceInput.java index 772e7c72..6f6f7693 100644 --- a/src/main/java/com/segment/publicapi/models/CreateFilterInput.java +++ b/src/main/java/com/segment/publicapi/models/CreateFilterForSpaceInput.java @@ -30,7 +30,7 @@ import java.util.Set; /** Input for CreateFilter. */ -public class CreateFilterInput { +public class CreateFilterForSpaceInput { public static final String SERIALIZED_NAME_INTEGRATION_ID = "integrationId"; @SerializedName(SERIALIZED_NAME_INTEGRATION_ID) @@ -71,16 +71,16 @@ public class CreateFilterInput { @SerializedName(SERIALIZED_NAME_ALLOW_PROPERTIES) private List allowProperties; - public CreateFilterInput() {} + public CreateFilterForSpaceInput() {} - public CreateFilterInput integrationId(String integrationId) { + public CreateFilterForSpaceInput integrationId(String integrationId) { this.integrationId = integrationId; return this; } /** - * The Integration id of the resource. + * The Space id to filer on. * * @return integrationId */ @@ -93,7 +93,7 @@ public void setIntegrationId(String integrationId) { this.integrationId = integrationId; } - public CreateFilterInput enabled(Boolean enabled) { + public CreateFilterForSpaceInput enabled(Boolean enabled) { this.enabled = enabled; return this; @@ -113,7 +113,7 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public CreateFilterInput name(String name) { + public CreateFilterForSpaceInput name(String name) { this.name = name; return this; @@ -133,7 +133,7 @@ public void setName(String name) { this.name = name; } - public CreateFilterInput description(String description) { + public CreateFilterForSpaceInput description(String description) { this.description = description; return this; @@ -153,7 +153,7 @@ public void setDescription(String description) { this.description = description; } - public CreateFilterInput _if(String _if) { + public CreateFilterForSpaceInput _if(String _if) { this._if = _if; return this; @@ -173,7 +173,7 @@ public void setIf(String _if) { this._if = _if; } - public CreateFilterInput drop(Boolean drop) { + public CreateFilterForSpaceInput drop(Boolean drop) { this.drop = drop; return this; @@ -193,13 +193,13 @@ public void setDrop(Boolean drop) { this.drop = drop; } - public CreateFilterInput dropProperties(List dropProperties) { + public CreateFilterForSpaceInput dropProperties(List dropProperties) { this.dropProperties = dropProperties; return this; } - public CreateFilterInput addDropPropertiesItem(String dropPropertiesItem) { + public CreateFilterForSpaceInput addDropPropertiesItem(String dropPropertiesItem) { if (this.dropProperties == null) { this.dropProperties = new ArrayList<>(); } @@ -221,13 +221,13 @@ public void setDropProperties(List dropProperties) { this.dropProperties = dropProperties; } - public CreateFilterInput allowProperties(List allowProperties) { + public CreateFilterForSpaceInput allowProperties(List allowProperties) { this.allowProperties = allowProperties; return this; } - public CreateFilterInput addAllowPropertiesItem(String allowPropertiesItem) { + public CreateFilterForSpaceInput addAllowPropertiesItem(String allowPropertiesItem) { if (this.allowProperties == null) { this.allowProperties = new ArrayList<>(); } @@ -257,15 +257,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateFilterInput createFilterInput = (CreateFilterInput) o; - return Objects.equals(this.integrationId, createFilterInput.integrationId) - && Objects.equals(this.enabled, createFilterInput.enabled) - && Objects.equals(this.name, createFilterInput.name) - && Objects.equals(this.description, createFilterInput.description) - && Objects.equals(this._if, createFilterInput._if) - && Objects.equals(this.drop, createFilterInput.drop) - && Objects.equals(this.dropProperties, createFilterInput.dropProperties) - && Objects.equals(this.allowProperties, createFilterInput.allowProperties); + CreateFilterForSpaceInput createFilterForSpaceInput = (CreateFilterForSpaceInput) o; + return Objects.equals(this.integrationId, createFilterForSpaceInput.integrationId) + && Objects.equals(this.enabled, createFilterForSpaceInput.enabled) + && Objects.equals(this.name, createFilterForSpaceInput.name) + && Objects.equals(this.description, createFilterForSpaceInput.description) + && Objects.equals(this._if, createFilterForSpaceInput._if) + && Objects.equals(this.drop, createFilterForSpaceInput.drop) + && Objects.equals(this.dropProperties, createFilterForSpaceInput.dropProperties) + && Objects.equals(this.allowProperties, createFilterForSpaceInput.allowProperties); } @Override @@ -284,7 +284,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateFilterInput {\n"); + sb.append("class CreateFilterForSpaceInput {\n"); sb.append(" integrationId: ").append(toIndentedString(integrationId)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -334,34 +334,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 CreateFilterInput + * @throws IOException if the JSON Element is invalid with respect to CreateFilterForSpaceInput */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateFilterInput.openapiRequiredFields + if (!CreateFilterForSpaceInput.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in CreateFilterInput is not found in the" - + " empty JSON string", - CreateFilterInput.openapiRequiredFields.toString())); + "The required field(s) %s in CreateFilterForSpaceInput is not found" + + " in the empty JSON string", + CreateFilterForSpaceInput.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateFilterInput.openapiFields.contains(entry.getKey())) { + if (!CreateFilterForSpaceInput.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `CreateFilterInput` properties. JSON: %s", + + " `CreateFilterForSpaceInput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateFilterInput.openapiRequiredFields) { + for (String requiredField : CreateFilterForSpaceInput.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException( String.format( @@ -425,24 +425,25 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFilterInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFilterInput' and its subtypes + if (!CreateFilterForSpaceInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateFilterForSpaceInput' and its + // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateFilterInput.class)); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateFilterForSpaceInput.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, CreateFilterInput value) + public void write(JsonWriter out, CreateFilterForSpaceInput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateFilterInput read(JsonReader in) throws IOException { + public CreateFilterForSpaceInput read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -452,18 +453,18 @@ public CreateFilterInput read(JsonReader in) throws IOException { } /** - * Create an instance of CreateFilterInput given an JSON string + * Create an instance of CreateFilterForSpaceInput given an JSON string * * @param jsonString JSON string - * @return An instance of CreateFilterInput - * @throws IOException if the JSON string is invalid with respect to CreateFilterInput + * @return An instance of CreateFilterForSpaceInput + * @throws IOException if the JSON string is invalid with respect to CreateFilterForSpaceInput */ - public static CreateFilterInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFilterInput.class); + public static CreateFilterForSpaceInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateFilterForSpaceInput.class); } /** - * Convert an instance of CreateFilterInput to an JSON string + * Convert an instance of CreateFilterForSpaceInput to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/segment/publicapi/models/CreateFilterOutput.java b/src/main/java/com/segment/publicapi/models/CreateFilterForSpaceOutput.java similarity index 77% rename from src/main/java/com/segment/publicapi/models/CreateFilterOutput.java rename to src/main/java/com/segment/publicapi/models/CreateFilterForSpaceOutput.java index b15d2c92..56b87d51 100644 --- a/src/main/java/com/segment/publicapi/models/CreateFilterOutput.java +++ b/src/main/java/com/segment/publicapi/models/CreateFilterForSpaceOutput.java @@ -28,15 +28,15 @@ import java.util.Set; /** Output for CreateFilter. */ -public class CreateFilterOutput { +public class CreateFilterForSpaceOutput { public static final String SERIALIZED_NAME_FILTER = "filter"; @SerializedName(SERIALIZED_NAME_FILTER) private Filter filter; - public CreateFilterOutput() {} + public CreateFilterForSpaceOutput() {} - public CreateFilterOutput filter(Filter filter) { + public CreateFilterForSpaceOutput filter(Filter filter) { this.filter = filter; return this; @@ -64,8 +64,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateFilterOutput createFilterOutput = (CreateFilterOutput) o; - return Objects.equals(this.filter, createFilterOutput.filter); + CreateFilterForSpaceOutput createFilterForSpaceOutput = (CreateFilterForSpaceOutput) o; + return Objects.equals(this.filter, createFilterForSpaceOutput.filter); } @Override @@ -76,7 +76,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateFilterOutput {\n"); + sb.append("class CreateFilterForSpaceOutput {\n"); sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); sb.append("}"); return sb.toString(); @@ -110,34 +110,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 CreateFilterOutput + * @throws IOException if the JSON Element is invalid with respect to CreateFilterForSpaceOutput */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CreateFilterOutput.openapiRequiredFields + if (!CreateFilterForSpaceOutput.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in CreateFilterOutput is not found in the" - + " empty JSON string", - CreateFilterOutput.openapiRequiredFields.toString())); + "The required field(s) %s in CreateFilterForSpaceOutput is not" + + " found in the empty JSON string", + CreateFilterForSpaceOutput.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CreateFilterOutput.openapiFields.contains(entry.getKey())) { + if (!CreateFilterForSpaceOutput.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `CreateFilterOutput` properties. JSON: %s", + + " `CreateFilterForSpaceOutput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateFilterOutput.openapiRequiredFields) { + for (String requiredField : CreateFilterForSpaceOutput.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { throw new IllegalArgumentException( String.format( @@ -154,24 +154,25 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateFilterOutput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateFilterOutput' and its subtypes + if (!CreateFilterForSpaceOutput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateFilterForSpaceOutput' and its + // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(CreateFilterOutput.class)); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateFilterForSpaceOutput.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, CreateFilterOutput value) + public void write(JsonWriter out, CreateFilterForSpaceOutput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CreateFilterOutput read(JsonReader in) throws IOException { + public CreateFilterForSpaceOutput read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -181,18 +182,18 @@ public CreateFilterOutput read(JsonReader in) throws IOException { } /** - * Create an instance of CreateFilterOutput given an JSON string + * Create an instance of CreateFilterForSpaceOutput given an JSON string * * @param jsonString JSON string - * @return An instance of CreateFilterOutput - * @throws IOException if the JSON string is invalid with respect to CreateFilterOutput + * @return An instance of CreateFilterForSpaceOutput + * @throws IOException if the JSON string is invalid with respect to CreateFilterForSpaceOutput */ - public static CreateFilterOutput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateFilterOutput.class); + public static CreateFilterForSpaceOutput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateFilterForSpaceOutput.class); } /** - * Convert an instance of CreateFilterOutput to an JSON string + * Convert an instance of CreateFilterForSpaceOutput to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/segment/publicapi/models/ListFiltersByIntegrationId200Response.java b/src/main/java/com/segment/publicapi/models/ListFiltersForSpace200Response.java similarity index 68% rename from src/main/java/com/segment/publicapi/models/ListFiltersByIntegrationId200Response.java rename to src/main/java/com/segment/publicapi/models/ListFiltersForSpace200Response.java index e7eb25f8..fec1030f 100644 --- a/src/main/java/com/segment/publicapi/models/ListFiltersByIntegrationId200Response.java +++ b/src/main/java/com/segment/publicapi/models/ListFiltersForSpace200Response.java @@ -27,16 +27,16 @@ import java.util.Objects; import java.util.Set; -/** ListFiltersByIntegrationId200Response */ -public class ListFiltersByIntegrationId200Response { +/** ListFiltersForSpace200Response */ +public class ListFiltersForSpace200Response { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private ListFiltersByIntegrationIdOutput data; + private ListFiltersForSpaceOutput data; - public ListFiltersByIntegrationId200Response() {} + public ListFiltersForSpace200Response() {} - public ListFiltersByIntegrationId200Response data(ListFiltersByIntegrationIdOutput data) { + public ListFiltersForSpace200Response data(ListFiltersForSpaceOutput data) { this.data = data; return this; @@ -48,11 +48,11 @@ public ListFiltersByIntegrationId200Response data(ListFiltersByIntegrationIdOutp * @return data */ @javax.annotation.Nullable - public ListFiltersByIntegrationIdOutput getData() { + public ListFiltersForSpaceOutput getData() { return data; } - public void setData(ListFiltersByIntegrationIdOutput data) { + public void setData(ListFiltersForSpaceOutput data) { this.data = data; } @@ -64,9 +64,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListFiltersByIntegrationId200Response listFiltersByIntegrationId200Response = - (ListFiltersByIntegrationId200Response) o; - return Objects.equals(this.data, listFiltersByIntegrationId200Response.data); + ListFiltersForSpace200Response listFiltersForSpace200Response = + (ListFiltersForSpace200Response) o; + return Objects.equals(this.data, listFiltersForSpace200Response.data); } @Override @@ -77,7 +77,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListFiltersByIntegrationId200Response {\n"); + sb.append("class ListFiltersForSpace200Response {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -111,37 +111,35 @@ private String toIndentedString(Object o) { * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to - * ListFiltersByIntegrationId200Response + * ListFiltersForSpace200Response */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ListFiltersByIntegrationId200Response.openapiRequiredFields + if (!ListFiltersForSpace200Response.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in ListFiltersByIntegrationId200Response" - + " is not found in the empty JSON string", - ListFiltersByIntegrationId200Response.openapiRequiredFields - .toString())); + "The required field(s) %s in ListFiltersForSpace200Response is not" + + " found in the empty JSON string", + ListFiltersForSpace200Response.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ListFiltersByIntegrationId200Response.openapiFields.contains(entry.getKey())) { + if (!ListFiltersForSpace200Response.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `ListFiltersByIntegrationId200Response` properties. JSON:" - + " %s", + + " `ListFiltersForSpace200Response` 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()) { - ListFiltersByIntegrationIdOutput.validateJsonElement(jsonObj.get("data")); + ListFiltersForSpaceOutput.validateJsonElement(jsonObj.get("data")); } } @@ -149,27 +147,26 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListFiltersByIntegrationId200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListFiltersByIntegrationId200Response' - // and its subtypes + if (!ListFiltersForSpace200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListFiltersForSpace200Response' and its + // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = + final TypeAdapter thisAdapter = gson.getDelegateAdapter( - this, TypeToken.get(ListFiltersByIntegrationId200Response.class)); + this, TypeToken.get(ListFiltersForSpace200Response.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write( - JsonWriter out, ListFiltersByIntegrationId200Response value) + public void write(JsonWriter out, ListFiltersForSpace200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ListFiltersByIntegrationId200Response read(JsonReader in) + public ListFiltersForSpace200Response read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); @@ -180,20 +177,19 @@ public ListFiltersByIntegrationId200Response read(JsonReader in) } /** - * Create an instance of ListFiltersByIntegrationId200Response given an JSON string + * Create an instance of ListFiltersForSpace200Response given an JSON string * * @param jsonString JSON string - * @return An instance of ListFiltersByIntegrationId200Response + * @return An instance of ListFiltersForSpace200Response * @throws IOException if the JSON string is invalid with respect to - * ListFiltersByIntegrationId200Response + * ListFiltersForSpace200Response */ - public static ListFiltersByIntegrationId200Response fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, ListFiltersByIntegrationId200Response.class); + public static ListFiltersForSpace200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListFiltersForSpace200Response.class); } /** - * Convert an instance of ListFiltersByIntegrationId200Response to an JSON string + * Convert an instance of ListFiltersForSpace200Response to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/segment/publicapi/models/ListFiltersByIntegrationIdOutput.java b/src/main/java/com/segment/publicapi/models/ListFiltersForSpaceOutput.java similarity index 76% rename from src/main/java/com/segment/publicapi/models/ListFiltersByIntegrationIdOutput.java rename to src/main/java/com/segment/publicapi/models/ListFiltersForSpaceOutput.java index abd423a0..6105815e 100644 --- a/src/main/java/com/segment/publicapi/models/ListFiltersByIntegrationIdOutput.java +++ b/src/main/java/com/segment/publicapi/models/ListFiltersForSpaceOutput.java @@ -31,7 +31,7 @@ import java.util.Set; /** Output for ListFiltersByIntegrationId. */ -public class ListFiltersByIntegrationIdOutput { +public class ListFiltersForSpaceOutput { public static final String SERIALIZED_NAME_FILTERS = "filters"; @SerializedName(SERIALIZED_NAME_FILTERS) @@ -42,15 +42,15 @@ public class ListFiltersByIntegrationIdOutput { @SerializedName(SERIALIZED_NAME_PAGINATION) private ListFiltersPaginationOutput pagination; - public ListFiltersByIntegrationIdOutput() {} + public ListFiltersForSpaceOutput() {} - public ListFiltersByIntegrationIdOutput filters(List filters) { + public ListFiltersForSpaceOutput filters(List filters) { this.filters = filters; return this; } - public ListFiltersByIntegrationIdOutput addFiltersItem(Filter filtersItem) { + public ListFiltersForSpaceOutput addFiltersItem(Filter filtersItem) { if (this.filters == null) { this.filters = new ArrayList<>(); } @@ -72,7 +72,7 @@ public void setFilters(List filters) { this.filters = filters; } - public ListFiltersByIntegrationIdOutput pagination(ListFiltersPaginationOutput pagination) { + public ListFiltersForSpaceOutput pagination(ListFiltersPaginationOutput pagination) { this.pagination = pagination; return this; @@ -100,10 +100,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListFiltersByIntegrationIdOutput listFiltersByIntegrationIdOutput = - (ListFiltersByIntegrationIdOutput) o; - return Objects.equals(this.filters, listFiltersByIntegrationIdOutput.filters) - && Objects.equals(this.pagination, listFiltersByIntegrationIdOutput.pagination); + ListFiltersForSpaceOutput listFiltersForSpaceOutput = (ListFiltersForSpaceOutput) o; + return Objects.equals(this.filters, listFiltersForSpaceOutput.filters) + && Objects.equals(this.pagination, listFiltersForSpaceOutput.pagination); } @Override @@ -114,7 +113,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListFiltersByIntegrationIdOutput {\n"); + sb.append("class ListFiltersForSpaceOutput {\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); sb.append("}"); @@ -149,29 +148,28 @@ 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 - * ListFiltersByIntegrationIdOutput + * @throws IOException if the JSON Element is invalid with respect to ListFiltersForSpaceOutput */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ListFiltersByIntegrationIdOutput.openapiRequiredFields + if (!ListFiltersForSpaceOutput.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in ListFiltersByIntegrationIdOutput is" - + " not found in the empty JSON string", - ListFiltersByIntegrationIdOutput.openapiRequiredFields.toString())); + "The required field(s) %s in ListFiltersForSpaceOutput is not found" + + " in the empty JSON string", + ListFiltersForSpaceOutput.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ListFiltersByIntegrationIdOutput.openapiFields.contains(entry.getKey())) { + if (!ListFiltersForSpaceOutput.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `ListFiltersByIntegrationIdOutput` properties. JSON: %s", + + " `ListFiltersForSpaceOutput` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } @@ -205,27 +203,25 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListFiltersByIntegrationIdOutput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListFiltersByIntegrationIdOutput' and - // its subtypes + if (!ListFiltersForSpaceOutput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListFiltersForSpaceOutput' and its + // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(ListFiltersByIntegrationIdOutput.class)); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ListFiltersForSpaceOutput.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, ListFiltersByIntegrationIdOutput value) + public void write(JsonWriter out, ListFiltersForSpaceOutput value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ListFiltersByIntegrationIdOutput read(JsonReader in) - throws IOException { + public ListFiltersForSpaceOutput read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -235,19 +231,18 @@ public ListFiltersByIntegrationIdOutput read(JsonReader in) } /** - * Create an instance of ListFiltersByIntegrationIdOutput given an JSON string + * Create an instance of ListFiltersForSpaceOutput given an JSON string * * @param jsonString JSON string - * @return An instance of ListFiltersByIntegrationIdOutput - * @throws IOException if the JSON string is invalid with respect to - * ListFiltersByIntegrationIdOutput + * @return An instance of ListFiltersForSpaceOutput + * @throws IOException if the JSON string is invalid with respect to ListFiltersForSpaceOutput */ - public static ListFiltersByIntegrationIdOutput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListFiltersByIntegrationIdOutput.class); + public static ListFiltersForSpaceOutput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListFiltersForSpaceOutput.class); } /** - * Convert an instance of ListFiltersByIntegrationIdOutput to an JSON string + * Convert an instance of ListFiltersForSpaceOutput to an JSON string * * @return JSON string */