2727
2828import javax .validation .constraints .*;
2929
30+ import com .volcengine .mcs .model .BanAlertIPCallbackRequest ;
31+ import com .volcengine .mcs .model .BanAlertIPCallbackResponse ;
3032import com .volcengine .mcs .model .GetAlarmSyncTaskRequest ;
3133import com .volcengine .mcs .model .GetAlarmSyncTaskResponse ;
3234import com .volcengine .mcs .model .GetApiV1AlarmDetailRequest ;
5355import com .volcengine .mcs .model .PostApiV1AssetDescribeDetailResponse ;
5456import com .volcengine .mcs .model .PostApiV1OverviewDescribeAssetInfoRequest ;
5557import com .volcengine .mcs .model .PostApiV1OverviewDescribeAssetInfoResponse ;
58+ import com .volcengine .mcs .model .RiskStatusUpdateBySoarRequest ;
59+ import com .volcengine .mcs .model .RiskStatusUpdateBySoarResponse ;
5660
5761import java .lang .reflect .Type ;
5862import java .util .ArrayList ;
@@ -79,6 +83,130 @@ public void setApiClient(ApiClient apiClient) {
7983 this .apiClient = apiClient ;
8084 }
8185
86+ /**
87+ * Build call for banAlertIPCallback
88+ * @param body (required)
89+ * @param progressListener Progress listener
90+ * @param progressRequestListener Progress request listener
91+ * @return Call to execute
92+ * @throws ApiException If fail to serialize the request body object
93+ */
94+ public com .squareup .okhttp .Call banAlertIPCallbackCall (BanAlertIPCallbackRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
95+ Object localVarPostBody = body ;
96+
97+ // create path and map variables
98+ String localVarPath = "/BanAlertIPCallback/2023-05-01/mcs/post/application_json/" ;
99+
100+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
101+ List <Pair > localVarCollectionQueryParams = new ArrayList <Pair >();
102+
103+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
104+
105+ Map <String , Object > localVarFormParams = new HashMap <String , Object >();
106+
107+ final String [] localVarAccepts = {
108+ "application/json"
109+ };
110+ final String localVarAccept = apiClient .selectHeaderAccept (localVarAccepts );
111+ if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
112+
113+ final String [] localVarContentTypes = {
114+ "text/plain"
115+ };
116+ final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
117+ localVarHeaderParams .put ("Content-Type" , localVarContentType );
118+
119+ if (progressListener != null ) {
120+ apiClient .getHttpClient ().networkInterceptors ().add (new com .squareup .okhttp .Interceptor () {
121+ @ Override
122+ public com .squareup .okhttp .Response intercept (com .squareup .okhttp .Interceptor .Chain chain ) throws IOException {
123+ com .squareup .okhttp .Response originalResponse = chain .proceed (chain .request ());
124+ return originalResponse .newBuilder ()
125+ .body (new ProgressResponseBody (originalResponse .body (), progressListener ))
126+ .build ();
127+ }
128+ });
129+ }
130+
131+ String [] localVarAuthNames = new String [] { "volcengineSign" };
132+ return apiClient .buildCall (localVarPath , "POST" , localVarQueryParams , localVarCollectionQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
133+ }
134+
135+ @ SuppressWarnings ("rawtypes" )
136+ private com .squareup .okhttp .Call banAlertIPCallbackValidateBeforeCall (BanAlertIPCallbackRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
137+ // verify the required parameter 'body' is set
138+ if (body == null ) {
139+ throw new ApiException ("Missing the required parameter 'body' when calling banAlertIPCallback(Async)" );
140+ }
141+
142+ com .squareup .okhttp .Call call = banAlertIPCallbackCall (body , progressListener , progressRequestListener );
143+ return call ;
144+
145+
146+
147+
148+
149+ }
150+
151+ /**
152+ *
153+ *
154+ * @param body (required)
155+ * @return BanAlertIPCallbackResponse
156+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
157+ */
158+ public BanAlertIPCallbackResponse banAlertIPCallback (BanAlertIPCallbackRequest body ) throws ApiException {
159+ ApiResponse <BanAlertIPCallbackResponse > resp = banAlertIPCallbackWithHttpInfo (body );
160+ return resp .getData ();
161+ }
162+
163+ /**
164+ *
165+ *
166+ * @param body (required)
167+ * @return ApiResponse<BanAlertIPCallbackResponse>
168+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
169+ */
170+ public ApiResponse <BanAlertIPCallbackResponse > banAlertIPCallbackWithHttpInfo ( @ NotNull BanAlertIPCallbackRequest body ) throws ApiException {
171+ com .squareup .okhttp .Call call = banAlertIPCallbackValidateBeforeCall (body , null , null );
172+ Type localVarReturnType = new TypeToken <BanAlertIPCallbackResponse >(){}.getType ();
173+ return apiClient .execute (call , localVarReturnType );
174+ }
175+
176+ /**
177+ * (asynchronously)
178+ *
179+ * @param body (required)
180+ * @param callback The callback to be executed when the API call finishes
181+ * @return The request call
182+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
183+ */
184+ public com .squareup .okhttp .Call banAlertIPCallbackAsync (BanAlertIPCallbackRequest body , final ApiCallback <BanAlertIPCallbackResponse > callback ) throws ApiException {
185+
186+ ProgressResponseBody .ProgressListener progressListener = null ;
187+ ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
188+
189+ if (callback != null ) {
190+ progressListener = new ProgressResponseBody .ProgressListener () {
191+ @ Override
192+ public void update (long bytesRead , long contentLength , boolean done ) {
193+ callback .onDownloadProgress (bytesRead , contentLength , done );
194+ }
195+ };
196+
197+ progressRequestListener = new ProgressRequestBody .ProgressRequestListener () {
198+ @ Override
199+ public void onRequestProgress (long bytesWritten , long contentLength , boolean done ) {
200+ callback .onUploadProgress (bytesWritten , contentLength , done );
201+ }
202+ };
203+ }
204+
205+ com .squareup .okhttp .Call call = banAlertIPCallbackValidateBeforeCall (body , progressListener , progressRequestListener );
206+ Type localVarReturnType = new TypeToken <BanAlertIPCallbackResponse >(){}.getType ();
207+ apiClient .executeAsync (call , localVarReturnType , callback );
208+ return call ;
209+ }
82210 /**
83211 * Build call for getAlarmSyncTask
84212 * @param body (required)
@@ -1691,4 +1819,128 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
16911819 apiClient .executeAsync (call , localVarReturnType , callback );
16921820 return call ;
16931821 }
1822+ /**
1823+ * Build call for riskStatusUpdateBySoar
1824+ * @param body (required)
1825+ * @param progressListener Progress listener
1826+ * @param progressRequestListener Progress request listener
1827+ * @return Call to execute
1828+ * @throws ApiException If fail to serialize the request body object
1829+ */
1830+ public com .squareup .okhttp .Call riskStatusUpdateBySoarCall (RiskStatusUpdateBySoarRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
1831+ Object localVarPostBody = body ;
1832+
1833+ // create path and map variables
1834+ String localVarPath = "/RiskStatusUpdateBySoar/2023-05-01/mcs/post/application_json/" ;
1835+
1836+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
1837+ List <Pair > localVarCollectionQueryParams = new ArrayList <Pair >();
1838+
1839+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
1840+
1841+ Map <String , Object > localVarFormParams = new HashMap <String , Object >();
1842+
1843+ final String [] localVarAccepts = {
1844+ "application/json"
1845+ };
1846+ final String localVarAccept = apiClient .selectHeaderAccept (localVarAccepts );
1847+ if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
1848+
1849+ final String [] localVarContentTypes = {
1850+ "text/plain"
1851+ };
1852+ final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
1853+ localVarHeaderParams .put ("Content-Type" , localVarContentType );
1854+
1855+ if (progressListener != null ) {
1856+ apiClient .getHttpClient ().networkInterceptors ().add (new com .squareup .okhttp .Interceptor () {
1857+ @ Override
1858+ public com .squareup .okhttp .Response intercept (com .squareup .okhttp .Interceptor .Chain chain ) throws IOException {
1859+ com .squareup .okhttp .Response originalResponse = chain .proceed (chain .request ());
1860+ return originalResponse .newBuilder ()
1861+ .body (new ProgressResponseBody (originalResponse .body (), progressListener ))
1862+ .build ();
1863+ }
1864+ });
1865+ }
1866+
1867+ String [] localVarAuthNames = new String [] { "volcengineSign" };
1868+ return apiClient .buildCall (localVarPath , "POST" , localVarQueryParams , localVarCollectionQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
1869+ }
1870+
1871+ @ SuppressWarnings ("rawtypes" )
1872+ private com .squareup .okhttp .Call riskStatusUpdateBySoarValidateBeforeCall (RiskStatusUpdateBySoarRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
1873+ // verify the required parameter 'body' is set
1874+ if (body == null ) {
1875+ throw new ApiException ("Missing the required parameter 'body' when calling riskStatusUpdateBySoar(Async)" );
1876+ }
1877+
1878+ com .squareup .okhttp .Call call = riskStatusUpdateBySoarCall (body , progressListener , progressRequestListener );
1879+ return call ;
1880+
1881+
1882+
1883+
1884+
1885+ }
1886+
1887+ /**
1888+ *
1889+ *
1890+ * @param body (required)
1891+ * @return RiskStatusUpdateBySoarResponse
1892+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1893+ */
1894+ public RiskStatusUpdateBySoarResponse riskStatusUpdateBySoar (RiskStatusUpdateBySoarRequest body ) throws ApiException {
1895+ ApiResponse <RiskStatusUpdateBySoarResponse > resp = riskStatusUpdateBySoarWithHttpInfo (body );
1896+ return resp .getData ();
1897+ }
1898+
1899+ /**
1900+ *
1901+ *
1902+ * @param body (required)
1903+ * @return ApiResponse<RiskStatusUpdateBySoarResponse>
1904+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1905+ */
1906+ public ApiResponse <RiskStatusUpdateBySoarResponse > riskStatusUpdateBySoarWithHttpInfo ( @ NotNull RiskStatusUpdateBySoarRequest body ) throws ApiException {
1907+ com .squareup .okhttp .Call call = riskStatusUpdateBySoarValidateBeforeCall (body , null , null );
1908+ Type localVarReturnType = new TypeToken <RiskStatusUpdateBySoarResponse >(){}.getType ();
1909+ return apiClient .execute (call , localVarReturnType );
1910+ }
1911+
1912+ /**
1913+ * (asynchronously)
1914+ *
1915+ * @param body (required)
1916+ * @param callback The callback to be executed when the API call finishes
1917+ * @return The request call
1918+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
1919+ */
1920+ public com .squareup .okhttp .Call riskStatusUpdateBySoarAsync (RiskStatusUpdateBySoarRequest body , final ApiCallback <RiskStatusUpdateBySoarResponse > callback ) throws ApiException {
1921+
1922+ ProgressResponseBody .ProgressListener progressListener = null ;
1923+ ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
1924+
1925+ if (callback != null ) {
1926+ progressListener = new ProgressResponseBody .ProgressListener () {
1927+ @ Override
1928+ public void update (long bytesRead , long contentLength , boolean done ) {
1929+ callback .onDownloadProgress (bytesRead , contentLength , done );
1930+ }
1931+ };
1932+
1933+ progressRequestListener = new ProgressRequestBody .ProgressRequestListener () {
1934+ @ Override
1935+ public void onRequestProgress (long bytesWritten , long contentLength , boolean done ) {
1936+ callback .onUploadProgress (bytesWritten , contentLength , done );
1937+ }
1938+ };
1939+ }
1940+
1941+ com .squareup .okhttp .Call call = riskStatusUpdateBySoarValidateBeforeCall (body , progressListener , progressRequestListener );
1942+ Type localVarReturnType = new TypeToken <RiskStatusUpdateBySoarResponse >(){}.getType ();
1943+ apiClient .executeAsync (call , localVarReturnType , callback );
1944+ return call ;
1945+ }
16941946}
0 commit comments