com.ziqni.admin.sdk.api.ConsumersApiWs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ziqni-admin-sdk Show documentation
Show all versions of ziqni-admin-sdk Show documentation
ZIQNI Admin SDK Java Client
/*
* ZIQNI Admin API
* Ziqni Application Services are used to manage and configure spaces.
*
* The version of the OpenAPI document: 3.0.1
* 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.ziqni.admin.sdk.api;
import javax.ws.rs.core.GenericType;
import com.ziqni.admin.sdk.streaming.StreamingClient;
import com.ziqni.admin.sdk.streaming.EventHandler;
import com.ziqni.admin.sdk.streaming.handlers.CallbackConsumer;
import com.ziqni.admin.sdk.ApiException;
import org.springframework.messaging.simp.stomp.StompHeaders;
import com.ziqni.admin.sdk.model.CreateKafkaConnectionRequest;
import com.ziqni.admin.sdk.model.CreateRabbitMqConnectionRequest;
import com.ziqni.admin.sdk.model.CreateSqsConnectionRequest;
import com.ziqni.admin.sdk.model.KafkaConnectionResponse;
import com.ziqni.admin.sdk.model.ModelApiResponse;
import com.ziqni.admin.sdk.model.QueryRequest;
import com.ziqni.admin.sdk.model.RabbitMqConnectionResponse;
import com.ziqni.admin.sdk.model.SqsConnectionResponse;
import com.ziqni.admin.sdk.model.UpdateConnectionStateRequest;
import com.ziqni.admin.sdk.model.UpdateKafkaConnectionRequest;
import com.ziqni.admin.sdk.model.UpdateRabbitMqConnectionRequest;
import com.ziqni.admin.sdk.model.UpdateSqsConnectionRequest;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ziqni.admin.sdk.model.*;
import java.time.Duration;
import java.util.*;
//asyncNative:true
import java.util.concurrent.CompletableFuture;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.util.function.BiConsumer;
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ConsumersApiWs {
private final Duration memberVarReadTimeout;
private final StreamingClient streamingClient;
public ConsumersApiWs(StreamingClient streamingClient, Duration readTimeout) {
this.streamingClient = streamingClient;
this.memberVarReadTimeout = readTimeout;
}
/**
*
* Create a new Kafka Consumer Connection in the Ziqni system
* @param body Create a Kafka Consumer Connection in the Ziqni system (required)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture createKafkaConnections(CreateKafkaConnectionRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/createKafkaConnections", request);
return result;
}
/**
*
* Create a new RabbitMq Consumer Connection in the Ziqni system
* @param body Create a RabbitMq Consumer Connection in the Ziqni system (required)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture createRabbitMQConnections(CreateRabbitMqConnectionRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/createRabbitMQConnections", request);
return result;
}
/**
*
* Create a new SQS Consumer Connection in the Ziqni system
* @param body Create a SQS Consumer Connection in the Ziqni system (required)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture createSqsConnections(CreateSqsConnectionRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/createSqsConnections", request);
return result;
}
/**
*
* Delete the Kafka Consumer Connection for a given identifier specified
* @param id The unique identifiers of the resources (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture deleteKafkaConnections(List id) {
var request = new HashMap();
var queryParam = new HashMap();
queryParam.put("id", id);
request.put("query",queryParam);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteKafkaConnections", request);
return result;
}
/**
*
* Delete a Kafka Connection or a list of Kafka Connections from Ziqni by unique Connection ID's or any other POST body parameters using the POST method
* @param body Delete a Kafka Connection or a list of Kafka Connections from Ziqni by unique Connection ID's or any other POST body parameters using the POST method (optional)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture deleteKafkaConnectionsByQuery(QueryRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteKafkaConnectionsByQuery", request);
return result;
}
/**
*
* Delete the RabbitMq Consumer Connection for a given identifier specified
* @param id The unique identifiers of the resources (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture deleteRabbitMQConnections(List id) {
var request = new HashMap();
var queryParam = new HashMap();
queryParam.put("id", id);
request.put("query",queryParam);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteRabbitMQConnections", request);
return result;
}
/**
*
* Delete a RabbitMQ Connection or a list of RabbitMQ Connections from Ziqni by unique Connection ID's or any other POST body parameters using the POST method
* @param body Delete a RabbitMQ Connection or a list of RabbitMQ Connections from Ziqni by unique Connection ID's or any other POST body parameters using the POST method (optional)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture deleteRabbitMQConnectionsByQuery(QueryRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteRabbitMQConnectionsByQuery", request);
return result;
}
/**
*
* Delete the SQS Consumer Connection for a given identifier specified
* @param id The unique identifiers of the resources (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture deleteSqsConnections(List id) {
var request = new HashMap();
var queryParam = new HashMap();
queryParam.put("id", id);
request.put("query",queryParam);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteSqsConnections", request);
return result;
}
/**
*
* Delete a SQS Connection or a list of SQS Connections from Ziqni by unique Connection ID's or any other POST body parameters using the POST method
* @param body Delete a SQS Connection or a list of SQS Connections from Ziqni by unique Connection ID's or any other POST body parameters using the POST method (optional)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture deleteSqsConnectionsByQuery(QueryRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteSqsConnectionsByQuery", request);
return result;
}
/**
*
* Return a list of Kafka Consumer Connections
* @param id The unique identifiers of the resources (optional
* @param limit Limit the returned total records found (optional)
* @param skip Skip the returned records found and return the next batch of records (optional)
* @return CompletableFuture<KafkaConnectionResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture getKafkaConnections(List id, Integer limit, Integer skip) {
var request = new HashMap();
var queryParam = new HashMap();
queryParam.put("id", id);
queryParam.put("limit", limit);
queryParam.put("skip", skip);
request.put("query",queryParam);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/getKafkaConnections", request);
return result;
}
/**
*
* Retrieve a Kafka Connection or a list of Kafka Connections from Ziqni by unique Connection ID's or any other Post body parameters using the POST method
* @param body Retrieve a Kafka Connection or a list of Kafka Connections from Ziqni by unique Connection ID's or any other Post body parameters using the POST method (optional)
* @return CompletableFuture<KafkaConnectionResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture getKafkaConnectionsByQuery(QueryRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/getKafkaConnectionsByQuery", request);
return result;
}
/**
*
* Return a list of RabbitMq Consumer Connections
* @param id The unique identifiers of the resources (optional
* @param limit Limit the returned total records found (optional)
* @param skip Skip the returned records found and return the next batch of records (optional)
* @return CompletableFuture<RabbitMqConnectionResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture getRabbitMQConnections(List id, Integer limit, Integer skip) {
var request = new HashMap();
var queryParam = new HashMap();
queryParam.put("id", id);
queryParam.put("limit", limit);
queryParam.put("skip", skip);
request.put("query",queryParam);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/getRabbitMQConnections", request);
return result;
}
/**
*
* Retrieve a RabbitMQ Connection or a list of RabbitMQ Connections from Ziqni by unique Connection ID's or any other Post body parameters using the POST method
* @param body Retrieve a RabbitMQ Connection or a list of RabbitMQ Connections from Ziqni by unique Connection ID's or any other Post body parameters using the POST method (optional)
* @return CompletableFuture<RabbitMqConnectionResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture getRabbitMQConnectionsByQuery(QueryRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/getRabbitMQConnectionsByQuery", request);
return result;
}
/**
*
* Return a list of SQS Consumer Connections
* @param id The unique identifiers of the resources (optional
* @param limit Limit the returned total records found (optional)
* @param skip Skip the returned records found and return the next batch of records (optional)
* @return CompletableFuture<SqsConnectionResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture getSqsConnections(List id, Integer limit, Integer skip) {
var request = new HashMap();
var queryParam = new HashMap();
queryParam.put("id", id);
queryParam.put("limit", limit);
queryParam.put("skip", skip);
request.put("query",queryParam);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/getSqsConnections", request);
return result;
}
/**
*
* Retrieve a SQS Connection or a list of SQS Connections from Ziqni by unique Connection ID's or any other Post body parameters using the POST method
* @param body Retrieve a SQS Connection or a list of SQS Connections from Ziqni by unique Connection ID's or any other Post body parameters using the POST method (optional)
* @return CompletableFuture<SqsConnectionResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture getSqsConnectionsByQuery(QueryRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/getSqsConnectionsByQuery", request);
return result;
}
/**
* Update connection status
* Update the state of a Consumer using the POST method
* @param body Update the state of a Consumer using the POST method (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateConnectionsState(List body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateConnectionsState", request);
return result;
}
/**
*
* Update an existing Kafka Consumer Connection in the Ziqni system
* @param body Update the Kafka Consumer Connection details in the Ziqni system (required)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateKafkaConnections(UpdateKafkaConnectionRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateKafkaConnections", request);
return result;
}
/**
*
* Update the state of a Kafka Connection using the POST method
* @param body Update the state of a Kafka Connection using the POST method (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateKafkaConnectionsState(List body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateKafkaConnectionsState", request);
return result;
}
/**
*
* Update an existing RabbitMq Consumer Connection in the Ziqni system
* @param body Update the RabbitMq Consumer Connection details in the Ziqni system (required)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateRabbitMQConnections(UpdateRabbitMqConnectionRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateRabbitMQConnections", request);
return result;
}
/**
*
* Update the state of a RabbitMQ Connection using the POST method
* @param body Update the state of a RabbitMQ Connection using the POST method (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateRabbitMQConnectionsState(List body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateRabbitMQConnectionsState", request);
return result;
}
/**
*
* Update an existing SQS Consumer Connection in the Ziqni system
* @param body Update the SQS Consumer Connection details in the Ziqni system (required)
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateSqsConnections(UpdateSqsConnectionRequest body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateSqsConnections", request);
return result;
}
/**
*
* Update the state of an SQS Connection using the POST method
* @param body Update the state of an SQS Connection using the POST method (optional
* @return CompletableFuture<ModelApiResponse>
* @throws ApiException if fails to make API call
*/
public CompletableFuture updateSqsConnectionsState(List body) {
var request = new HashMap();
request.put("body",body);
CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/updateSqsConnectionsState", request);
return result;
}
private ApiException getApiException(String operationId, HttpResponse response) {
String message = formatExceptionMessage(operationId, response.statusCode(), response.body());
return new ApiException(response.statusCode(), message, response.headers(), response.body());
}
private String formatExceptionMessage(String operationId, int statusCode, String body) {
if (body == null || body.isEmpty()) {
body = "[no body]";
}
return operationId + " call failed with: " + statusCode + " - " + body;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy