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

sh.ory.hydra.api.MetadataApi Maven / Gradle / Ivy

/*
 * Ory Oathkeeper API
 * Documentation for all of Ory Oathkeeper's APIs. 
 *
 * The version of the OpenAPI document: v1.11.6
 * 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 sh.ory.hydra.api;

import sh.ory.hydra.ApiCallback;
import sh.ory.hydra.ApiClient;
import sh.ory.hydra.ApiException;
import sh.ory.hydra.ApiResponse;
import sh.ory.hydra.Configuration;
import sh.ory.hydra.Pair;
import sh.ory.hydra.ProgressRequestBody;
import sh.ory.hydra.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import sh.ory.hydra.model.GenericError;
import sh.ory.hydra.model.InlineResponse200;
import sh.ory.hydra.model.InlineResponse2001;
import sh.ory.hydra.model.InlineResponse503;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MetadataApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public MetadataApi() {
        this(Configuration.getDefaultApiClient());
    }

    public MetadataApi(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 getVersion
     * @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 Returns the Ory Hydra version. -
*/ public okhttp3.Call getVersionCall(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 = "/version"; 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[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getVersionValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getVersionCall(_callback); return localVarCall; } /** * Return Running Software Version. * This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @return InlineResponse2001 * @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 Returns the Ory Hydra version. -
*/ public InlineResponse2001 getVersion() throws ApiException { ApiResponse localVarResp = getVersionWithHttpInfo(); return localVarResp.getData(); } /** * Return Running Software Version. * This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @return ApiResponse<InlineResponse2001> * @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 Returns the Ory Hydra version. -
*/ public ApiResponse getVersionWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getVersionValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Return Running Software Version. (asynchronously) * This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @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 Returns the Ory Hydra version. -
*/ public okhttp3.Call getVersionAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getVersionValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for isAlive * @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 Ory Hydra is ready to accept connections. -
500 genericError -
*/ public okhttp3.Call isAliveCall(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 = "/health/alive"; 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[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call isAliveValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = isAliveCall(_callback); return localVarCall; } /** * Check HTTP Server Status * This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @return InlineResponse200 * @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 Ory Hydra is ready to accept connections. -
500 genericError -
*/ public InlineResponse200 isAlive() throws ApiException { ApiResponse localVarResp = isAliveWithHttpInfo(); return localVarResp.getData(); } /** * Check HTTP Server Status * This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @return ApiResponse<InlineResponse200> * @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 Ory Hydra is ready to accept connections. -
500 genericError -
*/ public ApiResponse isAliveWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = isAliveValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check HTTP Server Status (asynchronously) * This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @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 Ory Hydra is ready to accept connections. -
500 genericError -
*/ public okhttp3.Call isAliveAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = isAliveValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for isReady * @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 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ public okhttp3.Call isReadyCall(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 = "/health/ready"; 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[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call isReadyValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = isReadyCall(_callback); return localVarCall; } /** * Check HTTP Server and Database Status * This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. * @return InlineResponse200 * @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 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ public InlineResponse200 isReady() throws ApiException { ApiResponse localVarResp = isReadyWithHttpInfo(); return localVarResp.getData(); } /** * Check HTTP Server and Database Status * This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. * @return ApiResponse<InlineResponse200> * @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 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ public ApiResponse isReadyWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = isReadyValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check HTTP Server and Database Status (asynchronously) * This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. * @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 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ public okhttp3.Call isReadyAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = isReadyValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy