Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* FINBOURNE Notifications API
*
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.finbourne.notifications.api;
import com.finbourne.notifications.ApiCallback;
import com.finbourne.notifications.ApiClient;
import com.finbourne.notifications.ApiException;
import com.finbourne.notifications.ApiResponse;
import com.finbourne.notifications.Configuration;
import com.finbourne.notifications.Pair;
import com.finbourne.notifications.ProgressRequestBody;
import com.finbourne.notifications.ProgressResponseBody;
import com.finbourne.notifications.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.notifications.model.CreateNotificationRequest;
import com.finbourne.notifications.model.LusidProblemDetails;
import com.finbourne.notifications.model.LusidValidationProblemDetails;
import com.finbourne.notifications.model.Notification;
import com.finbourne.notifications.model.ResourceListOfNotification;
import com.finbourne.notifications.model.UpdateNotificationRequest;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class NotificationsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public NotificationsApi() {
this(Configuration.getDefaultApiClient());
}
public NotificationsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
private okhttp3.Call createNotificationCall(String scope, String code, CreateNotificationRequest createNotificationRequest, final ApiCallback _callback) throws ApiException {
return createNotificationCall(scope, code, createNotificationRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call createNotificationCall(String scope, String code, CreateNotificationRequest createNotificationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = createNotificationRequest;
// create path and map variables
String localVarPath = "/api/subscriptions/{scope}/{code}/notifications"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json",
"application/json",
"text/json",
"application/*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createNotificationValidateBeforeCall(String scope, String code, CreateNotificationRequest createNotificationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling createNotification(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling createNotification(Async)");
}
// verify the required parameter 'createNotificationRequest' is set
if (createNotificationRequest == null) {
throw new ApiException("Missing the required parameter 'createNotificationRequest' when calling createNotification(Async)");
}
return createNotificationCall(scope, code, createNotificationRequest, _callback, opts);
}
private ApiResponse createNotificationWithHttpInfo(String scope, String code, CreateNotificationRequest createNotificationRequest) throws ApiException {
okhttp3.Call localVarCall = createNotificationValidateBeforeCall(scope, code, createNotificationRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createNotificationWithHttpInfo(String scope, String code, CreateNotificationRequest createNotificationRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createNotificationValidateBeforeCall(scope, code, createNotificationRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createNotificationAsync(String scope, String code, CreateNotificationRequest createNotificationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createNotificationValidateBeforeCall(scope, code, createNotificationRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createNotificationAsync(String scope, String code, CreateNotificationRequest createNotificationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createNotificationValidateBeforeCall(scope, code, createNotificationRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateNotificationRequest {
private final String scope;
private final String code;
private final CreateNotificationRequest createNotificationRequest;
private APIcreateNotificationRequest(String scope, String code, CreateNotificationRequest createNotificationRequest) {
this.scope = scope;
this.code = code;
this.createNotificationRequest = createNotificationRequest;
}
/**
* Build call for createNotification
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createNotificationCall(scope, code, createNotificationRequest, _callback);
}
/**
* Execute createNotification request
* @return Notification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Notification execute() throws ApiException {
ApiResponse localVarResp = createNotificationWithHttpInfo(scope, code, createNotificationRequest);
return localVarResp.getData();
}
/**
* Execute createNotification request. Use any specified configuration options to override any other configuration for this request only.
* @return Notification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public Notification execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createNotificationWithHttpInfo(scope, code, createNotificationRequest, opts);
return localVarResp.getData();
}
/**
* Execute createNotification request with HTTP info returned
* @return ApiResponse<Notification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return createNotificationWithHttpInfo(scope, code, createNotificationRequest);
}
/**
* Execute createNotification request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Notification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createNotificationWithHttpInfo(scope, code, createNotificationRequest, opts);
}
/**
* Execute createNotification request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createNotificationAsync(scope, code, createNotificationRequest, _callback);
}
/**
* Execute createNotification request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createNotificationAsync(scope, code, createNotificationRequest, _callback, opts);
}
}
/**
* [EXPERIMENTAL] CreateNotification: Add a Notification to a Subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @param createNotificationRequest The data to create a notification (required)
* @return APIcreateNotificationRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreateNotificationRequest createNotification(String scope, String code, CreateNotificationRequest createNotificationRequest) {
return new APIcreateNotificationRequest(scope, code, createNotificationRequest);
}
private okhttp3.Call deleteNotificationCall(String scope, String code, String id, final ApiCallback _callback) throws ApiException {
return deleteNotificationCall(scope, code, id, _callback, new ConfigurationOptions());
}
private okhttp3.Call deleteNotificationCall(String scope, String code, String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/subscriptions/{scope}/{code}/notifications/{id}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()))
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteNotificationValidateBeforeCall(String scope, String code, String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling deleteNotification(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling deleteNotification(Async)");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling deleteNotification(Async)");
}
return deleteNotificationCall(scope, code, id, _callback, opts);
}
private ApiResponse deleteNotificationWithHttpInfo(String scope, String code, String id) throws ApiException {
okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(scope, code, id, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deleteNotificationWithHttpInfo(String scope, String code, String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(scope, code, id, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deleteNotificationAsync(String scope, String code, String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(scope, code, id, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deleteNotificationAsync(String scope, String code, String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteNotificationValidateBeforeCall(scope, code, id, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeleteNotificationRequest {
private final String scope;
private final String code;
private final String id;
private APIdeleteNotificationRequest(String scope, String code, String id) {
this.scope = scope;
this.code = code;
this.id = id;
}
/**
* Build call for deleteNotification
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deleteNotificationCall(scope, code, id, _callback);
}
/**
* Execute deleteNotification request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public void execute() throws ApiException {
deleteNotificationWithHttpInfo(scope, code, id);
}
/**
* Execute deleteNotification request
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public void execute(ConfigurationOptions opts) throws ApiException {
deleteNotificationWithHttpInfo(scope, code, id, opts);
}
/**
* Execute deleteNotification request with HTTP info returned
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deleteNotificationWithHttpInfo(scope, code, id);
}
/**
* Execute deleteNotification request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deleteNotificationWithHttpInfo(scope, code, id, opts);
}
/**
* Execute deleteNotification request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deleteNotificationAsync(scope, code, id, _callback);
}
/**
* Execute deleteNotification request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deleteNotificationAsync(scope, code, id, _callback, opts);
}
}
/**
* [EXPERIMENTAL] DeleteNotification: Delete a notification for a given subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @param id The unique identifier of the notification (required)
* @return APIdeleteNotificationRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public APIdeleteNotificationRequest deleteNotification(String scope, String code, String id) {
return new APIdeleteNotificationRequest(scope, code, id);
}
private okhttp3.Call getNotificationCall(String scope, String code, String id, final ApiCallback _callback) throws ApiException {
return getNotificationCall(scope, code, id, _callback, new ConfigurationOptions());
}
private okhttp3.Call getNotificationCall(String scope, String code, String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/subscriptions/{scope}/{code}/notifications/{id}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()))
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getNotificationValidateBeforeCall(String scope, String code, String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling getNotification(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling getNotification(Async)");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getNotification(Async)");
}
return getNotificationCall(scope, code, id, _callback, opts);
}
private ApiResponse getNotificationWithHttpInfo(String scope, String code, String id) throws ApiException {
okhttp3.Call localVarCall = getNotificationValidateBeforeCall(scope, code, id, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getNotificationWithHttpInfo(String scope, String code, String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getNotificationValidateBeforeCall(scope, code, id, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getNotificationAsync(String scope, String code, String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getNotificationValidateBeforeCall(scope, code, id, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getNotificationAsync(String scope, String code, String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getNotificationValidateBeforeCall(scope, code, id, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetNotificationRequest {
private final String scope;
private final String code;
private final String id;
private APIgetNotificationRequest(String scope, String code, String id) {
this.scope = scope;
this.code = code;
this.id = id;
}
/**
* Build call for getNotification
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getNotificationCall(scope, code, id, _callback);
}
/**
* Execute getNotification request
* @return Notification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public Notification execute() throws ApiException {
ApiResponse localVarResp = getNotificationWithHttpInfo(scope, code, id);
return localVarResp.getData();
}
/**
* Execute getNotification request. Use any specified configuration options to override any other configuration for this request only.
* @return Notification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public Notification execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getNotificationWithHttpInfo(scope, code, id, opts);
return localVarResp.getData();
}
/**
* Execute getNotification request with HTTP info returned
* @return ApiResponse<Notification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getNotificationWithHttpInfo(scope, code, id);
}
/**
* Execute getNotification request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Notification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getNotificationWithHttpInfo(scope, code, id, opts);
}
/**
* Execute getNotification request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getNotificationAsync(scope, code, id, _callback);
}
/**
* Execute getNotification request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getNotificationAsync(scope, code, id, _callback, opts);
}
}
/**
* [EXPERIMENTAL] GetNotification: Get a notification on a subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @param id The unique identifier of the notification (required)
* @return APIgetNotificationRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public APIgetNotificationRequest getNotification(String scope, String code, String id) {
return new APIgetNotificationRequest(scope, code, id);
}
private okhttp3.Call listNotificationsCall(String scope, String code, final ApiCallback _callback) throws ApiException {
return listNotificationsCall(scope, code, _callback, new ConfigurationOptions());
}
private okhttp3.Call listNotificationsCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/subscriptions/{scope}/{code}/notifications"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listNotificationsValidateBeforeCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling listNotifications(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling listNotifications(Async)");
}
return listNotificationsCall(scope, code, _callback, opts);
}
private ApiResponse listNotificationsWithHttpInfo(String scope, String code) throws ApiException {
okhttp3.Call localVarCall = listNotificationsValidateBeforeCall(scope, code, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse listNotificationsWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listNotificationsValidateBeforeCall(scope, code, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listNotificationsAsync(String scope, String code, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listNotificationsValidateBeforeCall(scope, code, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call listNotificationsAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = listNotificationsValidateBeforeCall(scope, code, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistNotificationsRequest {
private final String scope;
private final String code;
private APIlistNotificationsRequest(String scope, String code) {
this.scope = scope;
this.code = code;
}
/**
* Build call for listNotifications
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listNotificationsCall(scope, code, _callback);
}
/**
* Execute listNotifications request
* @return ResourceListOfNotification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public ResourceListOfNotification execute() throws ApiException {
ApiResponse localVarResp = listNotificationsWithHttpInfo(scope, code);
return localVarResp.getData();
}
/**
* Execute listNotifications request. Use any specified configuration options to override any other configuration for this request only.
* @return ResourceListOfNotification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public ResourceListOfNotification execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = listNotificationsWithHttpInfo(scope, code, opts);
return localVarResp.getData();
}
/**
* Execute listNotifications request with HTTP info returned
* @return ApiResponse<ResourceListOfNotification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return listNotificationsWithHttpInfo(scope, code);
}
/**
* Execute listNotifications request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<ResourceListOfNotification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return listNotificationsWithHttpInfo(scope, code, opts);
}
/**
* Execute listNotifications request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return listNotificationsAsync(scope, code, _callback);
}
/**
* Execute listNotifications request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return listNotificationsAsync(scope, code, _callback, opts);
}
}
/**
* [EXPERIMENTAL] ListNotifications: List all notifications on a subscription.
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @return APIlistNotificationsRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notifications exists with the provided filter(s)
-
0
Error response
-
*/
public APIlistNotificationsRequest listNotifications(String scope, String code) {
return new APIlistNotificationsRequest(scope, code);
}
private okhttp3.Call updateNotificationCall(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest, final ApiCallback _callback) throws ApiException {
return updateNotificationCall(scope, code, id, updateNotificationRequest, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateNotificationCall(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = updateNotificationRequest;
// create path and map variables
String localVarPath = "/api/subscriptions/{scope}/{code}/notifications/{id}"
.replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString()))
.replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString()))
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json-patch+json",
"application/json",
"text/json",
"application/*+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateNotificationValidateBeforeCall(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'scope' is set
if (scope == null) {
throw new ApiException("Missing the required parameter 'scope' when calling updateNotification(Async)");
}
// verify the required parameter 'code' is set
if (code == null) {
throw new ApiException("Missing the required parameter 'code' when calling updateNotification(Async)");
}
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling updateNotification(Async)");
}
// verify the required parameter 'updateNotificationRequest' is set
if (updateNotificationRequest == null) {
throw new ApiException("Missing the required parameter 'updateNotificationRequest' when calling updateNotification(Async)");
}
return updateNotificationCall(scope, code, id, updateNotificationRequest, _callback, opts);
}
private ApiResponse updateNotificationWithHttpInfo(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest) throws ApiException {
okhttp3.Call localVarCall = updateNotificationValidateBeforeCall(scope, code, id, updateNotificationRequest, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateNotificationWithHttpInfo(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateNotificationValidateBeforeCall(scope, code, id, updateNotificationRequest, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateNotificationAsync(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateNotificationValidateBeforeCall(scope, code, id, updateNotificationRequest, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateNotificationAsync(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateNotificationValidateBeforeCall(scope, code, id, updateNotificationRequest, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateNotificationRequest {
private final String scope;
private final String code;
private final String id;
private final UpdateNotificationRequest updateNotificationRequest;
private APIupdateNotificationRequest(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest) {
this.scope = scope;
this.code = code;
this.id = id;
this.updateNotificationRequest = updateNotificationRequest;
}
/**
* Build call for updateNotification
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return updateNotificationCall(scope, code, id, updateNotificationRequest, _callback);
}
/**
* Execute updateNotification request
* @return Notification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public Notification execute() throws ApiException {
ApiResponse localVarResp = updateNotificationWithHttpInfo(scope, code, id, updateNotificationRequest);
return localVarResp.getData();
}
/**
* Execute updateNotification request. Use any specified configuration options to override any other configuration for this request only.
* @return Notification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public Notification execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateNotificationWithHttpInfo(scope, code, id, updateNotificationRequest, opts);
return localVarResp.getData();
}
/**
* Execute updateNotification request with HTTP info returned
* @return ApiResponse<Notification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return updateNotificationWithHttpInfo(scope, code, id, updateNotificationRequest);
}
/**
* Execute updateNotification request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<Notification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateNotificationWithHttpInfo(scope, code, id, updateNotificationRequest, opts);
}
/**
* Execute updateNotification request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return updateNotificationAsync(scope, code, id, updateNotificationRequest, _callback);
}
/**
* Execute updateNotification request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateNotificationAsync(scope, code, id, updateNotificationRequest, _callback, opts);
}
}
/**
* [EXPERIMENTAL] UpdateNotification: Update a Notification for a Subscription
*
* @param scope The scope that identifies a subscription (required)
* @param code The code that identifies a subscription (required)
* @param id The unique identifier of the notification (required)
* @param updateNotificationRequest The data to update a notification (required)
* @return APIupdateNotificationRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No notification exists in current scope
-
0
Error response
-
*/
public APIupdateNotificationRequest updateNotification(String scope, String code, String id, UpdateNotificationRequest updateNotificationRequest) {
return new APIupdateNotificationRequest(scope, code, id, updateNotificationRequest);
}
}