All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ziqni.admin.sdk.api.DefaultApiWs Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
/*
 * 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.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 DefaultApiWs {

    private final Duration memberVarReadTimeout;
    private final StreamingClient streamingClient;

    public DefaultApiWs(StreamingClient streamingClient, Duration readTimeout) {
    this.streamingClient = streamingClient;
    this.memberVarReadTimeout = readTimeout;
    }



            /**
            * NOT AVAILABLE IN CURRENT RELEASE
            * 
                * @param name  (required)
            * @throws ApiException if fails to make API call
            */
            public CompletableFuture deleteSpace(String name) {
                var request = new HashMap();
            var queryParam = new HashMap();
            queryParam.put("name", name);
            request.put("query",queryParam);

            
                        

            

            CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/deleteSpace", request);
            return result;
        }



            /**
            * 
            * 
                * @param subscriptionId  (optional)
            * @throws ApiException if fails to make API call
            */
            public CompletableFuture unsubscribeFromEntityChanges(String subscriptionId) {
                var request = new HashMap();
            var queryParam = new HashMap();
            queryParam.put("subscriptionId", subscriptionId);
            request.put("query",queryParam);

            
                        

            

            CompletableFuture result = this.streamingClient.sendWithApiCallback("/aapi/unsubscribeFromEntityChanges", 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 - 2024 Weber Informatics LLC | Privacy Policy