|
36 | 36 | import com.segment.publicapi.models.ListAudiencesPaginationInput;
|
37 | 37 | import com.segment.publicapi.models.PaginationInput;
|
38 | 38 | import com.segment.publicapi.models.RemoveAudienceFromSpace200Response;
|
| 39 | +import com.segment.publicapi.models.RemoveAudienceScheduleFromAudience200Response; |
39 | 40 | import com.segment.publicapi.models.UpdateAudienceForSpace200Response;
|
40 | 41 | import com.segment.publicapi.models.UpdateAudienceForSpaceBetaInput;
|
41 | 42 | import com.segment.publicapi.models.UpdateAudienceScheduleForAudience200Response;
|
@@ -2473,6 +2474,217 @@ public okhttp3.Call removeAudienceFromSpaceAsync(
|
2473 | 2474 | return localVarCall;
|
2474 | 2475 | }
|
2475 | 2476 |
|
| 2477 | + /** |
| 2478 | + * Build call for removeAudienceScheduleFromAudience |
| 2479 | + * |
| 2480 | + * @param spaceId (required) |
| 2481 | + * @param id (required) |
| 2482 | + * @param scheduleId (required) |
| 2483 | + * @param _callback Callback for upload/download progress |
| 2484 | + * @return Call to execute |
| 2485 | + * @throws ApiException If fail to serialize the request body object |
| 2486 | + * @http.response.details |
| 2487 | + * <table summary="Response Details" border="1"> |
| 2488 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 2489 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 2490 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 2491 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 2492 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 2493 | + * </table> |
| 2494 | + */ |
| 2495 | + public okhttp3.Call removeAudienceScheduleFromAudienceCall( |
| 2496 | + String spaceId, String id, String scheduleId, final ApiCallback _callback) |
| 2497 | + throws ApiException { |
| 2498 | + String basePath = null; |
| 2499 | + // Operation Servers |
| 2500 | + String[] localBasePaths = new String[] {}; |
| 2501 | + |
| 2502 | + // Determine Base Path to Use |
| 2503 | + if (localCustomBaseUrl != null) { |
| 2504 | + basePath = localCustomBaseUrl; |
| 2505 | + } else if (localBasePaths.length > 0) { |
| 2506 | + basePath = localBasePaths[localHostIndex]; |
| 2507 | + } else { |
| 2508 | + basePath = null; |
| 2509 | + } |
| 2510 | + |
| 2511 | + Object localVarPostBody = null; |
| 2512 | + |
| 2513 | + // create path and map variables |
| 2514 | + String localVarPath = |
| 2515 | + "/spaces/{spaceId}/audiences/{id}/schedules/{scheduleId}" |
| 2516 | + .replace( |
| 2517 | + "{" + "spaceId" + "}", |
| 2518 | + localVarApiClient.escapeString(spaceId.toString())) |
| 2519 | + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) |
| 2520 | + .replace( |
| 2521 | + "{" + "scheduleId" + "}", |
| 2522 | + localVarApiClient.escapeString(scheduleId.toString())); |
| 2523 | + |
| 2524 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 2525 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 2526 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 2527 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 2528 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 2529 | + |
| 2530 | + final String[] localVarAccepts = { |
| 2531 | + "application/vnd.segment.v1alpha+json", "application/json" |
| 2532 | + }; |
| 2533 | + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); |
| 2534 | + if (localVarAccept != null) { |
| 2535 | + localVarHeaderParams.put("Accept", localVarAccept); |
| 2536 | + } |
| 2537 | + |
| 2538 | + final String[] localVarContentTypes = {}; |
| 2539 | + final String localVarContentType = |
| 2540 | + localVarApiClient.selectHeaderContentType(localVarContentTypes); |
| 2541 | + if (localVarContentType != null) { |
| 2542 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 2543 | + } |
| 2544 | + |
| 2545 | + String[] localVarAuthNames = new String[] {"token"}; |
| 2546 | + return localVarApiClient.buildCall( |
| 2547 | + basePath, |
| 2548 | + localVarPath, |
| 2549 | + "DELETE", |
| 2550 | + localVarQueryParams, |
| 2551 | + localVarCollectionQueryParams, |
| 2552 | + localVarPostBody, |
| 2553 | + localVarHeaderParams, |
| 2554 | + localVarCookieParams, |
| 2555 | + localVarFormParams, |
| 2556 | + localVarAuthNames, |
| 2557 | + _callback); |
| 2558 | + } |
| 2559 | + |
| 2560 | + @SuppressWarnings("rawtypes") |
| 2561 | + private okhttp3.Call removeAudienceScheduleFromAudienceValidateBeforeCall( |
| 2562 | + String spaceId, String id, String scheduleId, final ApiCallback _callback) |
| 2563 | + throws ApiException { |
| 2564 | + // verify the required parameter 'spaceId' is set |
| 2565 | + if (spaceId == null) { |
| 2566 | + throw new ApiException( |
| 2567 | + "Missing the required parameter 'spaceId' when calling" |
| 2568 | + + " removeAudienceScheduleFromAudience(Async)"); |
| 2569 | + } |
| 2570 | + |
| 2571 | + // verify the required parameter 'id' is set |
| 2572 | + if (id == null) { |
| 2573 | + throw new ApiException( |
| 2574 | + "Missing the required parameter 'id' when calling" |
| 2575 | + + " removeAudienceScheduleFromAudience(Async)"); |
| 2576 | + } |
| 2577 | + |
| 2578 | + // verify the required parameter 'scheduleId' is set |
| 2579 | + if (scheduleId == null) { |
| 2580 | + throw new ApiException( |
| 2581 | + "Missing the required parameter 'scheduleId' when calling" |
| 2582 | + + " removeAudienceScheduleFromAudience(Async)"); |
| 2583 | + } |
| 2584 | + |
| 2585 | + return removeAudienceScheduleFromAudienceCall(spaceId, id, scheduleId, _callback); |
| 2586 | + } |
| 2587 | + |
| 2588 | + /** |
| 2589 | + * Remove Audience Schedule from Audience Deletes an audience schedule for a Linked Audience |
| 2590 | + * (audienceType = LINKED). • This endpoint is in **Alpha** testing. Please submit any |
| 2591 | + * feedback by sending an email to [email protected]. • In order to successfully call this |
| 2592 | + * endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach |
| 2593 | + * out to your customer success manager for more information. |
| 2594 | + * |
| 2595 | + * @param spaceId (required) |
| 2596 | + * @param id (required) |
| 2597 | + * @param scheduleId (required) |
| 2598 | + * @return RemoveAudienceScheduleFromAudience200Response |
| 2599 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the |
| 2600 | + * response body |
| 2601 | + * @http.response.details |
| 2602 | + * <table summary="Response Details" border="1"> |
| 2603 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 2604 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 2605 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 2606 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 2607 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 2608 | + * </table> |
| 2609 | + */ |
| 2610 | + public RemoveAudienceScheduleFromAudience200Response removeAudienceScheduleFromAudience( |
| 2611 | + String spaceId, String id, String scheduleId) throws ApiException { |
| 2612 | + ApiResponse<RemoveAudienceScheduleFromAudience200Response> localVarResp = |
| 2613 | + removeAudienceScheduleFromAudienceWithHttpInfo(spaceId, id, scheduleId); |
| 2614 | + return localVarResp.getData(); |
| 2615 | + } |
| 2616 | + |
| 2617 | + /** |
| 2618 | + * Remove Audience Schedule from Audience Deletes an audience schedule for a Linked Audience |
| 2619 | + * (audienceType = LINKED). • This endpoint is in **Alpha** testing. Please submit any |
| 2620 | + * feedback by sending an email to [email protected]. • In order to successfully call this |
| 2621 | + * endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach |
| 2622 | + * out to your customer success manager for more information. |
| 2623 | + * |
| 2624 | + * @param spaceId (required) |
| 2625 | + * @param id (required) |
| 2626 | + * @param scheduleId (required) |
| 2627 | + * @return ApiResponse<RemoveAudienceScheduleFromAudience200Response> |
| 2628 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the |
| 2629 | + * response body |
| 2630 | + * @http.response.details |
| 2631 | + * <table summary="Response Details" border="1"> |
| 2632 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 2633 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 2634 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 2635 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 2636 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 2637 | + * </table> |
| 2638 | + */ |
| 2639 | + public ApiResponse<RemoveAudienceScheduleFromAudience200Response> |
| 2640 | + removeAudienceScheduleFromAudienceWithHttpInfo( |
| 2641 | + String spaceId, String id, String scheduleId) throws ApiException { |
| 2642 | + okhttp3.Call localVarCall = |
| 2643 | + removeAudienceScheduleFromAudienceValidateBeforeCall(spaceId, id, scheduleId, null); |
| 2644 | + Type localVarReturnType = |
| 2645 | + new TypeToken<RemoveAudienceScheduleFromAudience200Response>() {}.getType(); |
| 2646 | + return localVarApiClient.execute(localVarCall, localVarReturnType); |
| 2647 | + } |
| 2648 | + |
| 2649 | + /** |
| 2650 | + * Remove Audience Schedule from Audience (asynchronously) Deletes an audience schedule for a |
| 2651 | + * Linked Audience (audienceType = LINKED). • This endpoint is in **Alpha** testing. Please |
| 2652 | + * submit any feedback by sending an email to [email protected]. • In order to successfully |
| 2653 | + * call this endpoint, the specified Workspace needs to have the Audience feature enabled. |
| 2654 | + * Please reach out to your customer success manager for more information. |
| 2655 | + * |
| 2656 | + * @param spaceId (required) |
| 2657 | + * @param id (required) |
| 2658 | + * @param scheduleId (required) |
| 2659 | + * @param _callback The callback to be executed when the API call finishes |
| 2660 | + * @return The request call |
| 2661 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body |
| 2662 | + * object |
| 2663 | + * @http.response.details |
| 2664 | + * <table summary="Response Details" border="1"> |
| 2665 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 2666 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 2667 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 2668 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 2669 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 2670 | + * </table> |
| 2671 | + */ |
| 2672 | + public okhttp3.Call removeAudienceScheduleFromAudienceAsync( |
| 2673 | + String spaceId, |
| 2674 | + String id, |
| 2675 | + String scheduleId, |
| 2676 | + final ApiCallback<RemoveAudienceScheduleFromAudience200Response> _callback) |
| 2677 | + throws ApiException { |
| 2678 | + |
| 2679 | + okhttp3.Call localVarCall = |
| 2680 | + removeAudienceScheduleFromAudienceValidateBeforeCall( |
| 2681 | + spaceId, id, scheduleId, _callback); |
| 2682 | + Type localVarReturnType = |
| 2683 | + new TypeToken<RemoveAudienceScheduleFromAudience200Response>() {}.getType(); |
| 2684 | + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
| 2685 | + return localVarCall; |
| 2686 | + } |
| 2687 | + |
2476 | 2688 | /**
|
2477 | 2689 | * Build call for updateAudienceForSpace
|
2478 | 2690 | *
|
|
0 commit comments