|
24 | 24 | import com.segment.publicapi.models.CreateAudienceBetaInput;
|
25 | 25 | import com.segment.publicapi.models.CreateAudiencePreview200Response;
|
26 | 26 | import com.segment.publicapi.models.CreateAudiencePreviewBetaInput;
|
| 27 | +import com.segment.publicapi.models.ForceExecuteAudienceRun200Response; |
27 | 28 | import com.segment.publicapi.models.GetAudience200Response;
|
28 | 29 | import com.segment.publicapi.models.GetAudiencePreview200Response;
|
29 | 30 | import com.segment.publicapi.models.GetAudienceScheduleFromSpaceAndAudience200Response;
|
@@ -740,6 +741,204 @@ public okhttp3.Call createAudiencePreviewAsync(
|
740 | 741 | return localVarCall;
|
741 | 742 | }
|
742 | 743 |
|
| 744 | + /** |
| 745 | + * Build call for forceExecuteAudienceRun |
| 746 | + * |
| 747 | + * @param spaceId (required) |
| 748 | + * @param audienceId (required) |
| 749 | + * @param _callback Callback for upload/download progress |
| 750 | + * @return Call to execute |
| 751 | + * @throws ApiException If fail to serialize the request body object |
| 752 | + * @http.response.details |
| 753 | + * <table summary="Response Details" border="1"> |
| 754 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 755 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 756 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 757 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 758 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 759 | + * </table> |
| 760 | + */ |
| 761 | + public okhttp3.Call forceExecuteAudienceRunCall( |
| 762 | + String spaceId, String audienceId, final ApiCallback _callback) throws ApiException { |
| 763 | + String basePath = null; |
| 764 | + // Operation Servers |
| 765 | + String[] localBasePaths = new String[] {}; |
| 766 | + |
| 767 | + // Determine Base Path to Use |
| 768 | + if (localCustomBaseUrl != null) { |
| 769 | + basePath = localCustomBaseUrl; |
| 770 | + } else if (localBasePaths.length > 0) { |
| 771 | + basePath = localBasePaths[localHostIndex]; |
| 772 | + } else { |
| 773 | + basePath = null; |
| 774 | + } |
| 775 | + |
| 776 | + Object localVarPostBody = null; |
| 777 | + |
| 778 | + // create path and map variables |
| 779 | + String localVarPath = |
| 780 | + "/spaces/{spaceId}/audiences/{audienceId}/runs" |
| 781 | + .replace( |
| 782 | + "{" + "spaceId" + "}", |
| 783 | + localVarApiClient.escapeString(spaceId.toString())) |
| 784 | + .replace( |
| 785 | + "{" + "audienceId" + "}", |
| 786 | + localVarApiClient.escapeString(audienceId.toString())); |
| 787 | + |
| 788 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 789 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 790 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 791 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 792 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 793 | + |
| 794 | + final String[] localVarAccepts = { |
| 795 | + "application/vnd.segment.v1alpha+json", "application/json" |
| 796 | + }; |
| 797 | + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); |
| 798 | + if (localVarAccept != null) { |
| 799 | + localVarHeaderParams.put("Accept", localVarAccept); |
| 800 | + } |
| 801 | + |
| 802 | + final String[] localVarContentTypes = {}; |
| 803 | + final String localVarContentType = |
| 804 | + localVarApiClient.selectHeaderContentType(localVarContentTypes); |
| 805 | + if (localVarContentType != null) { |
| 806 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 807 | + } |
| 808 | + |
| 809 | + String[] localVarAuthNames = new String[] {"token"}; |
| 810 | + return localVarApiClient.buildCall( |
| 811 | + basePath, |
| 812 | + localVarPath, |
| 813 | + "POST", |
| 814 | + localVarQueryParams, |
| 815 | + localVarCollectionQueryParams, |
| 816 | + localVarPostBody, |
| 817 | + localVarHeaderParams, |
| 818 | + localVarCookieParams, |
| 819 | + localVarFormParams, |
| 820 | + localVarAuthNames, |
| 821 | + _callback); |
| 822 | + } |
| 823 | + |
| 824 | + @SuppressWarnings("rawtypes") |
| 825 | + private okhttp3.Call forceExecuteAudienceRunValidateBeforeCall( |
| 826 | + String spaceId, String audienceId, final ApiCallback _callback) throws ApiException { |
| 827 | + // verify the required parameter 'spaceId' is set |
| 828 | + if (spaceId == null) { |
| 829 | + throw new ApiException( |
| 830 | + "Missing the required parameter 'spaceId' when calling" |
| 831 | + + " forceExecuteAudienceRun(Async)"); |
| 832 | + } |
| 833 | + |
| 834 | + // verify the required parameter 'audienceId' is set |
| 835 | + if (audienceId == null) { |
| 836 | + throw new ApiException( |
| 837 | + "Missing the required parameter 'audienceId' when calling" |
| 838 | + + " forceExecuteAudienceRun(Async)"); |
| 839 | + } |
| 840 | + |
| 841 | + return forceExecuteAudienceRunCall(spaceId, audienceId, _callback); |
| 842 | + } |
| 843 | + |
| 844 | + /** |
| 845 | + * Force Execute Audience Run The ability to force execute a run for an Audience is limited to |
| 846 | + * Linked Audiences (audienceType = `LINKED`). • This endpoint is in **Alpha** |
| 847 | + * testing. Please submit any feedback by sending an email to [email protected]. • In order to |
| 848 | + * successfully call this endpoint, the specified Workspace needs to have the Audience feature |
| 849 | + * enabled. Please reach out to your customer success manager for more information. • When |
| 850 | + * called, this endpoint may generate the `Audience Run Forced` event in the [audit |
| 851 | + * trail](/tag/Audit-Trail). |
| 852 | + * |
| 853 | + * @param spaceId (required) |
| 854 | + * @param audienceId (required) |
| 855 | + * @return ForceExecuteAudienceRun200Response |
| 856 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the |
| 857 | + * response body |
| 858 | + * @http.response.details |
| 859 | + * <table summary="Response Details" border="1"> |
| 860 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 861 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 862 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 863 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 864 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 865 | + * </table> |
| 866 | + */ |
| 867 | + public ForceExecuteAudienceRun200Response forceExecuteAudienceRun( |
| 868 | + String spaceId, String audienceId) throws ApiException { |
| 869 | + ApiResponse<ForceExecuteAudienceRun200Response> localVarResp = |
| 870 | + forceExecuteAudienceRunWithHttpInfo(spaceId, audienceId); |
| 871 | + return localVarResp.getData(); |
| 872 | + } |
| 873 | + |
| 874 | + /** |
| 875 | + * Force Execute Audience Run The ability to force execute a run for an Audience is limited to |
| 876 | + * Linked Audiences (audienceType = `LINKED`). • This endpoint is in **Alpha** |
| 877 | + * testing. Please submit any feedback by sending an email to [email protected]. • In order to |
| 878 | + * successfully call this endpoint, the specified Workspace needs to have the Audience feature |
| 879 | + * enabled. Please reach out to your customer success manager for more information. • When |
| 880 | + * called, this endpoint may generate the `Audience Run Forced` event in the [audit |
| 881 | + * trail](/tag/Audit-Trail). |
| 882 | + * |
| 883 | + * @param spaceId (required) |
| 884 | + * @param audienceId (required) |
| 885 | + * @return ApiResponse<ForceExecuteAudienceRun200Response> |
| 886 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the |
| 887 | + * response body |
| 888 | + * @http.response.details |
| 889 | + * <table summary="Response Details" border="1"> |
| 890 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 891 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 892 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 893 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 894 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 895 | + * </table> |
| 896 | + */ |
| 897 | + public ApiResponse<ForceExecuteAudienceRun200Response> forceExecuteAudienceRunWithHttpInfo( |
| 898 | + String spaceId, String audienceId) throws ApiException { |
| 899 | + okhttp3.Call localVarCall = |
| 900 | + forceExecuteAudienceRunValidateBeforeCall(spaceId, audienceId, null); |
| 901 | + Type localVarReturnType = new TypeToken<ForceExecuteAudienceRun200Response>() {}.getType(); |
| 902 | + return localVarApiClient.execute(localVarCall, localVarReturnType); |
| 903 | + } |
| 904 | + |
| 905 | + /** |
| 906 | + * Force Execute Audience Run (asynchronously) The ability to force execute a run for an |
| 907 | + * Audience is limited to Linked Audiences (audienceType = `LINKED`). • This |
| 908 | + * endpoint is in **Alpha** testing. Please submit any feedback by sending an email to |
| 909 | + * [email protected]. • In order to successfully call this endpoint, the specified Workspace |
| 910 | + * needs to have the Audience feature enabled. Please reach out to your customer success manager |
| 911 | + * for more information. • When called, this endpoint may generate the `Audience Run |
| 912 | + * Forced` event in the [audit trail](/tag/Audit-Trail). |
| 913 | + * |
| 914 | + * @param spaceId (required) |
| 915 | + * @param audienceId (required) |
| 916 | + * @param _callback The callback to be executed when the API call finishes |
| 917 | + * @return The request call |
| 918 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body |
| 919 | + * object |
| 920 | + * @http.response.details |
| 921 | + * <table summary="Response Details" border="1"> |
| 922 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 923 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 924 | + * <tr><td> 404 </td><td> Resource not found </td><td> - </td></tr> |
| 925 | + * <tr><td> 422 </td><td> Validation failure </td><td> - </td></tr> |
| 926 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 927 | + * </table> |
| 928 | + */ |
| 929 | + public okhttp3.Call forceExecuteAudienceRunAsync( |
| 930 | + String spaceId, |
| 931 | + String audienceId, |
| 932 | + final ApiCallback<ForceExecuteAudienceRun200Response> _callback) |
| 933 | + throws ApiException { |
| 934 | + |
| 935 | + okhttp3.Call localVarCall = |
| 936 | + forceExecuteAudienceRunValidateBeforeCall(spaceId, audienceId, _callback); |
| 937 | + Type localVarReturnType = new TypeToken<ForceExecuteAudienceRun200Response>() {}.getType(); |
| 938 | + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
| 939 | + return localVarCall; |
| 940 | + } |
| 941 | + |
743 | 942 | /**
|
744 | 943 | * Build call for getAudience
|
745 | 944 | *
|
|
0 commit comments