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.
/*
* Svix API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.1.1
*
*
* 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.svix.internal.api;
import com.svix.internal.ApiCallback;
import com.svix.internal.ApiClient;
import com.svix.internal.ApiException;
import com.svix.internal.ApiResponse;
import com.svix.internal.Configuration;
import com.svix.internal.Pair;
import com.svix.internal.ProgressRequestBody;
import com.svix.internal.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.svix.models.HTTPValidationError;
import com.svix.models.HttpErrorOut;
import com.svix.models.ListResponseMessageOut;
import com.svix.models.MessageAttemptOut;
import com.svix.models.MessageEventsOut;
import com.svix.models.MessageIn;
import com.svix.models.MessageOut;
import com.svix.models.MessageRawPayloadOut;
import com.svix.models.MessageSubscriberAuthTokenOut;
import java.time.OffsetDateTime;
import java.util.Set;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class MessageApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public MessageApi() {
this(Configuration.getDefaultApiClient());
}
public MessageApi(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;
}
/**
* Build call for createMessageAttemptForEndpoint
* @param appId The app's ID or UID (required)
* @param endpointId The ep's ID or UID (required)
* @param messageIn (required)
* @param idempotencyKey The request's idempotency key (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call createMessageAttemptForEndpointCall(String appId, String endpointId, MessageIn messageIn, String idempotencyKey, final ApiCallback _callback) 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 = messageIn;
// create path and map variables
String localVarPath = "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "endpoint_id" + "}", localVarApiClient.escapeString(endpointId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createMessageAttemptForEndpointValidateBeforeCall(String appId, String endpointId, MessageIn messageIn, String idempotencyKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling createMessageAttemptForEndpoint(Async)");
}
// verify the required parameter 'endpointId' is set
if (endpointId == null) {
throw new ApiException("Missing the required parameter 'endpointId' when calling createMessageAttemptForEndpoint(Async)");
}
// verify the required parameter 'messageIn' is set
if (messageIn == null) {
throw new ApiException("Missing the required parameter 'messageIn' when calling createMessageAttemptForEndpoint(Async)");
}
return createMessageAttemptForEndpointCall(appId, endpointId, messageIn, idempotencyKey, _callback);
}
/**
* Create Message Attempt For Endpoint
* Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned. FIXME: use MessageIn for expediency, even though the `application` parameter is unused. Since this endpoint isn't publicly documented anyway, it should be fine
* @param appId The app's ID or UID (required)
* @param endpointId The ep's ID or UID (required)
* @param messageIn (required)
* @param idempotencyKey The request's idempotency key (optional)
* @return MessageAttemptOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageAttemptOut createMessageAttemptForEndpoint(String appId, String endpointId, MessageIn messageIn, String idempotencyKey) throws ApiException {
ApiResponse localVarResp = createMessageAttemptForEndpointWithHttpInfo(appId, endpointId, messageIn, idempotencyKey);
return localVarResp.getData();
}
/**
* Create Message Attempt For Endpoint
* Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned. FIXME: use MessageIn for expediency, even though the `application` parameter is unused. Since this endpoint isn't publicly documented anyway, it should be fine
* @param appId The app's ID or UID (required)
* @param endpointId The ep's ID or UID (required)
* @param messageIn (required)
* @param idempotencyKey The request's idempotency key (optional)
* @return ApiResponse<MessageAttemptOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse createMessageAttemptForEndpointWithHttpInfo(String appId, String endpointId, MessageIn messageIn, String idempotencyKey) throws ApiException {
okhttp3.Call localVarCall = createMessageAttemptForEndpointValidateBeforeCall(appId, endpointId, messageIn, idempotencyKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create Message Attempt For Endpoint (asynchronously)
* Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned. FIXME: use MessageIn for expediency, even though the `application` parameter is unused. Since this endpoint isn't publicly documented anyway, it should be fine
* @param appId The app's ID or UID (required)
* @param endpointId The ep's ID or UID (required)
* @param messageIn (required)
* @param idempotencyKey The request's idempotency key (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 object
* @http.response.details
Status Code
Description
Response Headers
201
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call createMessageAttemptForEndpointAsync(String appId, String endpointId, MessageIn messageIn, String idempotencyKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createMessageAttemptForEndpointValidateBeforeCall(appId, endpointId, messageIn, idempotencyKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1EventsPublic
* @param appId The app's ID (required)
* @param sinkId The ep's ID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventType Filters messages sent with this event type (optional). (optional)
* @param channel Filters messages sent with this channel (optional). (optional)
* @param after (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1EventsPublicCall(String appId, String sinkId, Integer limit, String iterator, String eventType, String channel, OffsetDateTime after, final ApiCallback _callback) 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/v1/app/{app_id}/events/{sink_id}"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "sink_id" + "}", localVarApiClient.escapeString(sinkId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (iterator != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("iterator", iterator));
}
if (eventType != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("event_type", eventType));
}
if (channel != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("channel", channel));
}
if (after != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
}
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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1EventsPublicValidateBeforeCall(String appId, String sinkId, Integer limit, String iterator, String eventType, String channel, OffsetDateTime after, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1EventsPublic(Async)");
}
// verify the required parameter 'sinkId' is set
if (sinkId == null) {
throw new ApiException("Missing the required parameter 'sinkId' when calling v1EventsPublic(Async)");
}
return v1EventsPublicCall(appId, sinkId, limit, iterator, eventType, channel, after, _callback);
}
/**
* Public Events
* Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.
* @param appId The app's ID (required)
* @param sinkId The ep's ID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventType Filters messages sent with this event type (optional). (optional)
* @param channel Filters messages sent with this channel (optional). (optional)
* @param after (optional)
* @return MessageEventsOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageEventsOut v1EventsPublic(String appId, String sinkId, Integer limit, String iterator, String eventType, String channel, OffsetDateTime after) throws ApiException {
ApiResponse localVarResp = v1EventsPublicWithHttpInfo(appId, sinkId, limit, iterator, eventType, channel, after);
return localVarResp.getData();
}
/**
* Public Events
* Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.
* @param appId The app's ID (required)
* @param sinkId The ep's ID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventType Filters messages sent with this event type (optional). (optional)
* @param channel Filters messages sent with this channel (optional). (optional)
* @param after (optional)
* @return ApiResponse<MessageEventsOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1EventsPublicWithHttpInfo(String appId, String sinkId, Integer limit, String iterator, String eventType, String channel, OffsetDateTime after) throws ApiException {
okhttp3.Call localVarCall = v1EventsPublicValidateBeforeCall(appId, sinkId, limit, iterator, eventType, channel, after, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Public Events (asynchronously)
* Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.
* @param appId The app's ID (required)
* @param sinkId The ep's ID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventType Filters messages sent with this event type (optional). (optional)
* @param channel Filters messages sent with this channel (optional). (optional)
* @param after (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 object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1EventsPublicAsync(String appId, String sinkId, Integer limit, String iterator, String eventType, String channel, OffsetDateTime after, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1EventsPublicValidateBeforeCall(appId, sinkId, limit, iterator, eventType, channel, after, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageCreate
* @param appId The app's ID or UID (required)
* @param messageIn (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param idempotencyKey The request's idempotency key (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
202
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
413
Payload too large
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageCreateCall(String appId, MessageIn messageIn, Boolean withContent, String idempotencyKey, final ApiCallback _callback) 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 = messageIn;
// create path and map variables
String localVarPath = "/api/v1/app/{app_id}/msg"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (withContent != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_content", withContent));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageCreateValidateBeforeCall(String appId, MessageIn messageIn, Boolean withContent, String idempotencyKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageCreate(Async)");
}
// verify the required parameter 'messageIn' is set
if (messageIn == null) {
throw new ApiException("Missing the required parameter 'messageIn' when calling v1MessageCreate(Async)");
}
return v1MessageCreateCall(appId, messageIn, withContent, idempotencyKey, _callback);
}
/**
* Create Message
* Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for the application, a 409 conflict error will be returned. The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema. The `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.
* @param appId The app's ID or UID (required)
* @param messageIn (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param idempotencyKey The request's idempotency key (optional)
* @return MessageOut
* @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
202
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
413
Payload too large
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageOut v1MessageCreate(String appId, MessageIn messageIn, Boolean withContent, String idempotencyKey) throws ApiException {
ApiResponse localVarResp = v1MessageCreateWithHttpInfo(appId, messageIn, withContent, idempotencyKey);
return localVarResp.getData();
}
/**
* Create Message
* Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for the application, a 409 conflict error will be returned. The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema. The `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.
* @param appId The app's ID or UID (required)
* @param messageIn (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param idempotencyKey The request's idempotency key (optional)
* @return ApiResponse<MessageOut>
* @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
202
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
413
Payload too large
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageCreateWithHttpInfo(String appId, MessageIn messageIn, Boolean withContent, String idempotencyKey) throws ApiException {
okhttp3.Call localVarCall = v1MessageCreateValidateBeforeCall(appId, messageIn, withContent, idempotencyKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create Message (asynchronously)
* Creates a new message and dispatches it to all of the application's endpoints. The `eventId` is an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the same `eventId` already exists for the application, a 409 conflict error will be returned. The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema. The `payload` property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.
* @param appId The app's ID or UID (required)
* @param messageIn (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param idempotencyKey The request's idempotency key (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 object
* @http.response.details
Status Code
Description
Response Headers
202
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
413
Payload too large
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageCreateAsync(String appId, MessageIn messageIn, Boolean withContent, String idempotencyKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageCreateValidateBeforeCall(appId, messageIn, withContent, idempotencyKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageEvents
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageEventsCall(String appId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after, final ApiCallback _callback) 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/v1/app/{app_id}/events"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (iterator != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("iterator", iterator));
}
if (eventTypes != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "event_types", eventTypes));
}
if (channels != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "channels", channels));
}
if (after != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
}
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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageEventsValidateBeforeCall(String appId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageEvents(Async)");
}
return v1MessageEventsCall(appId, limit, iterator, eventTypes, channels, after, _callback);
}
/**
* Message Events
* Reads the stream of created messages for an application
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (optional)
* @return MessageEventsOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageEventsOut v1MessageEvents(String appId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after) throws ApiException {
ApiResponse localVarResp = v1MessageEventsWithHttpInfo(appId, limit, iterator, eventTypes, channels, after);
return localVarResp.getData();
}
/**
* Message Events
* Reads the stream of created messages for an application
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (optional)
* @return ApiResponse<MessageEventsOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageEventsWithHttpInfo(String appId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after) throws ApiException {
okhttp3.Call localVarCall = v1MessageEventsValidateBeforeCall(appId, limit, iterator, eventTypes, channels, after, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Message Events (asynchronously)
* Reads the stream of created messages for an application
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (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 object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageEventsAsync(String appId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageEventsValidateBeforeCall(appId, limit, iterator, eventTypes, channels, after, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageEventsSubscription
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageEventsSubscriptionCall(String appId, String subscriptionId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after, final ApiCallback _callback) 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/v1/app/{app_id}/events/subscription/{subscription_id}"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "subscription_id" + "}", localVarApiClient.escapeString(subscriptionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (iterator != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("iterator", iterator));
}
if (eventTypes != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "event_types", eventTypes));
}
if (channels != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "channels", channels));
}
if (after != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
}
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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageEventsSubscriptionValidateBeforeCall(String appId, String subscriptionId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageEventsSubscription(Async)");
}
// verify the required parameter 'subscriptionId' is set
if (subscriptionId == null) {
throw new ApiException("Missing the required parameter 'subscriptionId' when calling v1MessageEventsSubscription(Async)");
}
return v1MessageEventsSubscriptionCall(appId, subscriptionId, limit, iterator, eventTypes, channels, after, _callback);
}
/**
* Message Events Subscription
* Reads the stream of created messages for an application, but using server-managed iterator tracking.
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (optional)
* @return MessageEventsOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageEventsOut v1MessageEventsSubscription(String appId, String subscriptionId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after) throws ApiException {
ApiResponse localVarResp = v1MessageEventsSubscriptionWithHttpInfo(appId, subscriptionId, limit, iterator, eventTypes, channels, after);
return localVarResp.getData();
}
/**
* Message Events Subscription
* Reads the stream of created messages for an application, but using server-managed iterator tracking.
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (optional)
* @return ApiResponse<MessageEventsOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageEventsSubscriptionWithHttpInfo(String appId, String subscriptionId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after) throws ApiException {
okhttp3.Call localVarCall = v1MessageEventsSubscriptionValidateBeforeCall(appId, subscriptionId, limit, iterator, eventTypes, channels, after, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Message Events Subscription (asynchronously)
* Reads the stream of created messages for an application, but using server-managed iterator tracking.
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param channels Filter response based on the event type (optional)
* @param after (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 object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageEventsSubscriptionAsync(String appId, String subscriptionId, Integer limit, String iterator, Set eventTypes, Set channels, OffsetDateTime after, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageEventsSubscriptionValidateBeforeCall(appId, subscriptionId, limit, iterator, eventTypes, channels, after, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageEventsSubscriptionCreateToken
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param idempotencyKey The request's idempotency key (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageEventsSubscriptionCreateTokenCall(String appId, String subscriptionId, String idempotencyKey, final ApiCallback _callback) 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/v1/app/{app_id}/events/subscription/{subscription_id}/create-token"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "subscription_id" + "}", localVarApiClient.escapeString(subscriptionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageEventsSubscriptionCreateTokenValidateBeforeCall(String appId, String subscriptionId, String idempotencyKey, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageEventsSubscriptionCreateToken(Async)");
}
// verify the required parameter 'subscriptionId' is set
if (subscriptionId == null) {
throw new ApiException("Missing the required parameter 'subscriptionId' when calling v1MessageEventsSubscriptionCreateToken(Async)");
}
return v1MessageEventsSubscriptionCreateTokenCall(appId, subscriptionId, idempotencyKey, _callback);
}
/**
* Message Events Create Token
* Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param idempotencyKey The request's idempotency key (optional)
* @return MessageSubscriberAuthTokenOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageSubscriberAuthTokenOut v1MessageEventsSubscriptionCreateToken(String appId, String subscriptionId, String idempotencyKey) throws ApiException {
ApiResponse localVarResp = v1MessageEventsSubscriptionCreateTokenWithHttpInfo(appId, subscriptionId, idempotencyKey);
return localVarResp.getData();
}
/**
* Message Events Create Token
* Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param idempotencyKey The request's idempotency key (optional)
* @return ApiResponse<MessageSubscriberAuthTokenOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageEventsSubscriptionCreateTokenWithHttpInfo(String appId, String subscriptionId, String idempotencyKey) throws ApiException {
okhttp3.Call localVarCall = v1MessageEventsSubscriptionCreateTokenValidateBeforeCall(appId, subscriptionId, idempotencyKey, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Message Events Create Token (asynchronously)
* Creates an auth token that can be used with the `v1.message.events-subscription` endpoint
* @param appId The app's ID or UID (required)
* @param subscriptionId The esub's ID or UID (required)
* @param idempotencyKey The request's idempotency key (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 object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageEventsSubscriptionCreateTokenAsync(String appId, String subscriptionId, String idempotencyKey, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageEventsSubscriptionCreateTokenValidateBeforeCall(appId, subscriptionId, idempotencyKey, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageExpungeContent
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @param _callback Callback for upload/download progress
* @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
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageExpungeContentCall(String appId, String msgId, final ApiCallback _callback) 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/v1/app/{app_id}/msg/{msg_id}/content"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "msg_id" + "}", localVarApiClient.escapeString(msgId.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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageExpungeContentValidateBeforeCall(String appId, String msgId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageExpungeContent(Async)");
}
// verify the required parameter 'msgId' is set
if (msgId == null) {
throw new ApiException("Missing the required parameter 'msgId' when calling v1MessageExpungeContent(Async)");
}
return v1MessageExpungeContentCall(appId, msgId, _callback);
}
/**
* Delete message payload
* Delete the given message's payload. Useful in cases when a message was accidentally sent with sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @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
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public void v1MessageExpungeContent(String appId, String msgId) throws ApiException {
v1MessageExpungeContentWithHttpInfo(appId, msgId);
}
/**
* Delete message payload
* Delete the given message's payload. Useful in cases when a message was accidentally sent with sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @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
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageExpungeContentWithHttpInfo(String appId, String msgId) throws ApiException {
okhttp3.Call localVarCall = v1MessageExpungeContentValidateBeforeCall(appId, msgId, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete message payload (asynchronously)
* Delete the given message's payload. Useful in cases when a message was accidentally sent with sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (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 object
* @http.response.details
Status Code
Description
Response Headers
204
no content
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageExpungeContentAsync(String appId, String msgId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageExpungeContentValidateBeforeCall(appId, msgId, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for v1MessageGet
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageGetCall(String appId, String msgId, Boolean withContent, final ApiCallback _callback) 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/v1/app/{app_id}/msg/{msg_id}"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "msg_id" + "}", localVarApiClient.escapeString(msgId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (withContent != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_content", withContent));
}
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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageGetValidateBeforeCall(String appId, String msgId, Boolean withContent, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageGet(Async)");
}
// verify the required parameter 'msgId' is set
if (msgId == null) {
throw new ApiException("Missing the required parameter 'msgId' when calling v1MessageGet(Async)");
}
return v1MessageGetCall(appId, msgId, withContent, _callback);
}
/**
* Get Message
* Get a message by its ID or eventID.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @return MessageOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageOut v1MessageGet(String appId, String msgId, Boolean withContent) throws ApiException {
ApiResponse localVarResp = v1MessageGetWithHttpInfo(appId, msgId, withContent);
return localVarResp.getData();
}
/**
* Get Message
* Get a message by its ID or eventID.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @return ApiResponse<MessageOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageGetWithHttpInfo(String appId, String msgId, Boolean withContent) throws ApiException {
okhttp3.Call localVarCall = v1MessageGetValidateBeforeCall(appId, msgId, withContent, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Message (asynchronously)
* Get a message by its ID or eventID.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageGetAsync(String appId, String msgId, Boolean withContent, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageGetValidateBeforeCall(appId, msgId, withContent, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageGetRawPayload
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageGetRawPayloadCall(String appId, String msgId, final ApiCallback _callback) 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/v1/app/{app_id}/msg/{msg_id}/raw"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "msg_id" + "}", localVarApiClient.escapeString(msgId.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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageGetRawPayloadValidateBeforeCall(String appId, String msgId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageGetRawPayload(Async)");
}
// verify the required parameter 'msgId' is set
if (msgId == null) {
throw new ApiException("Missing the required parameter 'msgId' when calling v1MessageGetRawPayload(Async)");
}
return v1MessageGetRawPayloadCall(appId, msgId, _callback);
}
/**
* Get Raw Message Payload
* Get a message raw payload by its ID or eventID.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @return MessageRawPayloadOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public MessageRawPayloadOut v1MessageGetRawPayload(String appId, String msgId) throws ApiException {
ApiResponse localVarResp = v1MessageGetRawPayloadWithHttpInfo(appId, msgId);
return localVarResp.getData();
}
/**
* Get Raw Message Payload
* Get a message raw payload by its ID or eventID.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (required)
* @return ApiResponse<MessageRawPayloadOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageGetRawPayloadWithHttpInfo(String appId, String msgId) throws ApiException {
okhttp3.Call localVarCall = v1MessageGetRawPayloadValidateBeforeCall(appId, msgId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Raw Message Payload (asynchronously)
* Get a message raw payload by its ID or eventID.
* @param appId The app's ID or UID (required)
* @param msgId The msg's ID or UID (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 object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageGetRawPayloadAsync(String appId, String msgId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = v1MessageGetRawPayloadValidateBeforeCall(appId, msgId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for v1MessageList
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param channel Filter response based on the channel (optional)
* @param before Only include items created before a certain date (optional)
* @param after Only include items created after a certain date (optional)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param tag Filter messages matching the provided tag (optional)
* @param eventTypes Filter response based on the event type (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public okhttp3.Call v1MessageListCall(String appId, Integer limit, String iterator, String channel, OffsetDateTime before, OffsetDateTime after, Boolean withContent, String tag, Set eventTypes, final ApiCallback _callback) 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/v1/app/{app_id}/msg"
.replace("{" + "app_id" + "}", localVarApiClient.escapeString(appId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (iterator != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("iterator", iterator));
}
if (channel != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("channel", channel));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
if (after != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after));
}
if (withContent != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_content", withContent));
}
if (tag != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("tag", tag));
}
if (eventTypes != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "event_types", eventTypes));
}
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[] { "HTTPBearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call v1MessageListValidateBeforeCall(String appId, Integer limit, String iterator, String channel, OffsetDateTime before, OffsetDateTime after, Boolean withContent, String tag, Set eventTypes, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException("Missing the required parameter 'appId' when calling v1MessageList(Async)");
}
return v1MessageListCall(appId, limit, iterator, channel, before, after, withContent, tag, eventTypes, _callback);
}
/**
* List Messages
* List all of the application's messages. The `before` and `after` parameters let you filter all items created before or after a certain date. These can be used alongside an iterator to paginate over results within a certain window. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param channel Filter response based on the channel (optional)
* @param before Only include items created before a certain date (optional)
* @param after Only include items created after a certain date (optional)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param tag Filter messages matching the provided tag (optional)
* @param eventTypes Filter response based on the event type (optional)
* @return ListResponseMessageOut
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ListResponseMessageOut v1MessageList(String appId, Integer limit, String iterator, String channel, OffsetDateTime before, OffsetDateTime after, Boolean withContent, String tag, Set eventTypes) throws ApiException {
ApiResponse localVarResp = v1MessageListWithHttpInfo(appId, limit, iterator, channel, before, after, withContent, tag, eventTypes);
return localVarResp.getData();
}
/**
* List Messages
* List all of the application's messages. The `before` and `after` parameters let you filter all items created before or after a certain date. These can be used alongside an iterator to paginate over results within a certain window. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param channel Filter response based on the channel (optional)
* @param before Only include items created before a certain date (optional)
* @param after Only include items created after a certain date (optional)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param tag Filter messages matching the provided tag (optional)
* @param eventTypes Filter response based on the event type (optional)
* @return ApiResponse<ListResponseMessageOut>
* @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
-
400
Bad request
-
401
Unauthorized
-
403
Forbidden
-
404
Not Found
-
409
Conflict
-
422
Validation Error
-
429
Too Many Requests
-
*/
public ApiResponse v1MessageListWithHttpInfo(String appId, Integer limit, String iterator, String channel, OffsetDateTime before, OffsetDateTime after, Boolean withContent, String tag, Set eventTypes) throws ApiException {
okhttp3.Call localVarCall = v1MessageListValidateBeforeCall(appId, limit, iterator, channel, before, after, withContent, tag, eventTypes, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* List Messages (asynchronously)
* List all of the application's messages. The `before` and `after` parameters let you filter all items created before or after a certain date. These can be used alongside an iterator to paginate over results within a certain window. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
* @param appId The app's ID or UID (required)
* @param limit Limit the number of returned items (optional)
* @param iterator The iterator returned from a prior invocation (optional)
* @param channel Filter response based on the channel (optional)
* @param before Only include items created before a certain date (optional)
* @param after Only include items created after a certain date (optional)
* @param withContent When `true` message payloads are included in the response (optional, default to true)
* @param tag Filter messages matching the provided tag (optional)
* @param eventTypes Filter response based on the event type (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 object
* @http.response.details