oud.kafka-instance-sdk.1.0.2.source-code.ApiClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kafka-instance-sdk Show documentation
Show all versions of kafka-instance-sdk Show documentation
Kafka instance SDK for RHOAS API supports interaction with individual Kafka instances
The newest version!
package com.openshift.cloud.api.kas.auth;
import com.microsoft.kiota.ApiClientBuilder;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.serialization.FormParseNodeFactory;
import com.microsoft.kiota.serialization.FormSerializationWriterFactory;
import com.microsoft.kiota.serialization.JsonParseNodeFactory;
import com.microsoft.kiota.serialization.JsonSerializationWriterFactory;
import com.microsoft.kiota.serialization.ParseNodeFactoryRegistry;
import com.microsoft.kiota.serialization.SerializationWriterFactoryRegistry;
import com.microsoft.kiota.serialization.TextParseNodeFactory;
import com.microsoft.kiota.serialization.TextSerializationWriterFactory;
import com.openshift.cloud.api.kas.auth.api.ApiRequestBuilder;
import java.util.HashMap;
import java.util.Objects;
/**
* The main entry point of the SDK, exposes the configuration and the fluent API.
*/
public class ApiClient {
/** The api property */
@javax.annotation.Nonnull
public ApiRequestBuilder api() {
return new ApiRequestBuilder(pathParameters, requestAdapter);
}
/** Path parameters for the request */
private HashMap pathParameters;
/** The request adapter to use to execute the requests. */
private RequestAdapter requestAdapter;
/** Url template to use to build the URL for the current request builder */
private String urlTemplate;
/**
* Instantiates a new ApiClient and sets the default values.
* @param requestAdapter The request adapter to use to execute the requests.
* @return a void
*/
@javax.annotation.Nullable
public ApiClient(@javax.annotation.Nonnull final RequestAdapter requestAdapter) {
Objects.requireNonNull(requestAdapter);
this.pathParameters = new HashMap<>();
this.urlTemplate = "{+baseurl}";
this.requestAdapter = requestAdapter;
ApiClientBuilder.registerDefaultSerializer(JsonSerializationWriterFactory.class);
ApiClientBuilder.registerDefaultSerializer(TextSerializationWriterFactory.class);
ApiClientBuilder.registerDefaultSerializer(FormSerializationWriterFactory.class);
ApiClientBuilder.registerDefaultDeserializer(JsonParseNodeFactory.class);
ApiClientBuilder.registerDefaultDeserializer(FormParseNodeFactory.class);
ApiClientBuilder.registerDefaultDeserializer(TextParseNodeFactory.class);
}
}