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

com.finbourne.scheduler.api.ImagesApi Maven / Gradle / Ivy

There is a newer version: 2.0.85
Show newest version
/*
 * FINBOURNE Scheduler API
 *
 * 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.finbourne.scheduler.api;

import com.finbourne.scheduler.ApiCallback;
import com.finbourne.scheduler.ApiClient;
import com.finbourne.scheduler.ApiException;
import com.finbourne.scheduler.ApiResponse;
import com.finbourne.scheduler.Configuration;
import com.finbourne.scheduler.Pair;
import com.finbourne.scheduler.ProgressRequestBody;
import com.finbourne.scheduler.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import java.io.File;
import com.finbourne.scheduler.model.Image;
import com.finbourne.scheduler.model.LusidProblemDetails;
import com.finbourne.scheduler.model.LusidValidationProblemDetails;
import com.finbourne.scheduler.model.ResourceListOfImageSummary;
import com.finbourne.scheduler.model.ResourceListOfRepository;
import com.finbourne.scheduler.model.UploadImageInstructions;
import com.finbourne.scheduler.model.UploadImageRequest;

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

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

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

    public ImagesApi(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;
    }

    private okhttp3.Call deleteImageCall(String name, 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/images/{name}"
            .replace("{" + "name" + "}", localVarApiClient.escapeString(name.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[] { "oauth2" };
        return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call deleteImageValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'name' is set
        if (name == null) {
            throw new ApiException("Missing the required parameter 'name' when calling deleteImage(Async)");
        }

        return deleteImageCall(name, _callback);

    }


    private ApiResponse deleteImageWithHttpInfo(String name) throws ApiException {
        okhttp3.Call localVarCall = deleteImageValidateBeforeCall(name, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call deleteImageAsync(String name, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = deleteImageValidateBeforeCall(name, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIdeleteImageRequest {
        private final String name;

        private APIdeleteImageRequest(String name) {
            this.name = name;
        }

        /**
         * Build call for deleteImage
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No image with this name and tag exists -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteImageCall(name, _callback); } /** * Execute deleteImage request * @return String * @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 Success -
400 The details of the input related failure -
404 No image with this name and tag exists -
0 Error response -
*/ public String execute() throws ApiException { ApiResponse localVarResp = deleteImageWithHttpInfo(name); return localVarResp.getData(); } /** * Execute deleteImage request with HTTP info returned * @return ApiResponse<String> * @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 Success -
400 The details of the input related failure -
404 No image with this name and tag exists -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteImageWithHttpInfo(name); } /** * Execute deleteImage request (asynchronously) * @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 Success -
400 The details of the input related failure -
404 No image with this name and tag exists -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteImageAsync(name, _callback); } } /** * [EXPERIMENTAL] DeleteImage: Delete a Docker Image * * @param name The name and tag of the image. Format \"ExampleImageName:0.1\" (required) * @return APIdeleteImageRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
404 No image with this name and tag exists -
0 Error response -
*/ public APIdeleteImageRequest deleteImage(String name) { return new APIdeleteImageRequest(name); } private okhttp3.Call downloadImageCall(String name, 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/images/{name}/contents" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.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[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call downloadImageValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling downloadImage(Async)"); } return downloadImageCall(name, _callback); } private ApiResponse downloadImageWithHttpInfo(String name) throws ApiException { okhttp3.Call localVarCall = downloadImageValidateBeforeCall(name, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call downloadImageAsync(String name, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadImageValidateBeforeCall(name, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdownloadImageRequest { private final String name; private APIdownloadImageRequest(String name) { this.name = name; } /** * Build call for downloadImage * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return downloadImageCall(name, _callback); } /** * Execute downloadImage request * @return File * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public File execute() throws ApiException { ApiResponse localVarResp = downloadImageWithHttpInfo(name); return localVarResp.getData(); } /** * Execute downloadImage request with HTTP info returned * @return ApiResponse<File> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return downloadImageWithHttpInfo(name); } /** * Execute downloadImage request (asynchronously) * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return downloadImageAsync(name, _callback); } } /** * [EXPERIMENTAL] DownloadImage: Download Docker Image * * @param name The name and tag of the image of the image. Format \"ExampleImageName:latest\" (required) * @return APIdownloadImageRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIdownloadImageRequest downloadImage(String name) { return new APIdownloadImageRequest(name); } private okhttp3.Call getImageCall(String name, 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/images/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.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[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getImageValidateBeforeCall(String name, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling getImage(Async)"); } return getImageCall(name, _callback); } private ApiResponse getImageWithHttpInfo(String name) throws ApiException { okhttp3.Call localVarCall = getImageValidateBeforeCall(name, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getImageAsync(String name, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getImageValidateBeforeCall(name, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetImageRequest { private final String name; private APIgetImageRequest(String name) { this.name = name; } /** * Build call for getImage * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getImageCall(name, _callback); } /** * Execute getImage request * @return Image * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public Image execute() throws ApiException { ApiResponse localVarResp = getImageWithHttpInfo(name); return localVarResp.getData(); } /** * Execute getImage request with HTTP info returned * @return ApiResponse<Image> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getImageWithHttpInfo(name); } /** * Execute getImage request (asynchronously) * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getImageAsync(name, _callback); } } /** * [EXPERIMENTAL] GetImage: Get metadata of a Docker Image * * @param name The name and tag of a Docker image. Format \"ExampleImageName:latest\" (required) * @return APIgetImageRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIgetImageRequest getImage(String name) { return new APIgetImageRequest(name); } private okhttp3.Call listImagesCall(String name, String page, List sortBy, Integer start, Integer limit, String filter, 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/images/repository/{name}" .replace("{" + "name" + "}", localVarApiClient.escapeString(name.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (sortBy != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy)); } if (start != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } 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[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listImagesValidateBeforeCall(String name, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { throw new ApiException("Missing the required parameter 'name' when calling listImages(Async)"); } return listImagesCall(name, page, sortBy, start, limit, filter, _callback); } private ApiResponse listImagesWithHttpInfo(String name, String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException { okhttp3.Call localVarCall = listImagesValidateBeforeCall(name, page, sortBy, start, limit, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listImagesAsync(String name, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listImagesValidateBeforeCall(name, page, sortBy, start, limit, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistImagesRequest { private final String name; private String page; private List sortBy; private Integer start; private Integer limit; private String filter; private APIlistImagesRequest(String name) { this.name = name; } /** * Set page * @param page The pagination token to use to continue listing images from a previous call to list images. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional) * @return APIlistImagesRequest */ public APIlistImagesRequest page(String page) { this.page = page; return this; } /** * Set sortBy * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @return APIlistImagesRequest */ public APIlistImagesRequest sortBy(List sortBy) { this.sortBy = sortBy; return this; } /** * Set start * @param start When paginating, skip this number of results. (optional) * @return APIlistImagesRequest */ public APIlistImagesRequest start(Integer start) { this.start = start; return this; } /** * Set limit * @param limit When paginating, limit the number of returned results to this many. Defaults to 2000 if not specified. Maximum is 5000. (optional, default to 2000) * @return APIlistImagesRequest */ public APIlistImagesRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set filter * @param filter Expression to filter the result set. (optional) * @return APIlistImagesRequest */ public APIlistImagesRequest filter(String filter) { this.filter = filter; return this; } /** * Build call for listImages * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listImagesCall(name, page, sortBy, start, limit, filter, _callback); } /** * Execute listImages request * @return ResourceListOfImageSummary * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ResourceListOfImageSummary execute() throws ApiException { ApiResponse localVarResp = listImagesWithHttpInfo(name, page, sortBy, start, limit, filter); return localVarResp.getData(); } /** * Execute listImages request with HTTP info returned * @return ApiResponse<ResourceListOfImageSummary> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listImagesWithHttpInfo(name, page, sortBy, start, limit, filter); } /** * Execute listImages request (asynchronously) * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listImagesAsync(name, page, sortBy, start, limit, filter, _callback); } } /** * [EXPERIMENTAL] ListImages: List all images under same image repository * * @param name The name of the Repository (required) * @return APIlistImagesRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIlistImagesRequest listImages(String name) { return new APIlistImagesRequest(name); } private okhttp3.Call listRepositoriesCall(String page, List sortBy, Integer start, Integer limit, String filter, 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/images/repository"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (sortBy != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy)); } if (start != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } 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[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listRepositoriesValidateBeforeCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { return listRepositoriesCall(page, sortBy, start, limit, filter, _callback); } private ApiResponse listRepositoriesWithHttpInfo(String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException { okhttp3.Call localVarCall = listRepositoriesValidateBeforeCall(page, sortBy, start, limit, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listRepositoriesAsync(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listRepositoriesValidateBeforeCall(page, sortBy, start, limit, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistRepositoriesRequest { private String page; private List sortBy; private Integer start; private Integer limit; private String filter; private APIlistRepositoriesRequest() { } /** * Set page * @param page The pagination token to use to continue listing images from a previous call to list images. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional) * @return APIlistRepositoriesRequest */ public APIlistRepositoriesRequest page(String page) { this.page = page; return this; } /** * Set sortBy * @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order e.g. -MyFieldName. (optional) * @return APIlistRepositoriesRequest */ public APIlistRepositoriesRequest sortBy(List sortBy) { this.sortBy = sortBy; return this; } /** * Set start * @param start When paginating, skip this number of results. (optional) * @return APIlistRepositoriesRequest */ public APIlistRepositoriesRequest start(Integer start) { this.start = start; return this; } /** * Set limit * @param limit When paginating, limit the number of returned results to this many. Defaults to 2000 if not specified. Maximum is 5000. (optional, default to 2000) * @return APIlistRepositoriesRequest */ public APIlistRepositoriesRequest limit(Integer limit) { this.limit = limit; return this; } /** * Set filter * @param filter Expression to filter the result set. (optional) * @return APIlistRepositoriesRequest */ public APIlistRepositoriesRequest filter(String filter) { this.filter = filter; return this; } /** * Build call for listRepositories * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listRepositoriesCall(page, sortBy, start, limit, filter, _callback); } /** * Execute listRepositories request * @return ResourceListOfRepository * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ResourceListOfRepository execute() throws ApiException { ApiResponse localVarResp = listRepositoriesWithHttpInfo(page, sortBy, start, limit, filter); return localVarResp.getData(); } /** * Execute listRepositories request with HTTP info returned * @return ApiResponse<ResourceListOfRepository> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listRepositoriesWithHttpInfo(page, sortBy, start, limit, filter); } /** * Execute listRepositories request (asynchronously) * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listRepositoriesAsync(page, sortBy, start, limit, filter, _callback); } } /** * [EXPERIMENTAL] ListRepositories: List all Docker image repositories * * @return APIlistRepositoriesRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIlistRepositoriesRequest listRepositories() { return new APIlistRepositoriesRequest(); } private okhttp3.Call uploadImageCall(UploadImageRequest uploadImageRequest, 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 = uploadImageRequest; // create path and map variables String localVarPath = "/api/images"; 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 = { "application/json-patch+json", "application/json", "text/json", "application/*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call uploadImageValidateBeforeCall(UploadImageRequest uploadImageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'uploadImageRequest' is set if (uploadImageRequest == null) { throw new ApiException("Missing the required parameter 'uploadImageRequest' when calling uploadImage(Async)"); } return uploadImageCall(uploadImageRequest, _callback); } private ApiResponse uploadImageWithHttpInfo(UploadImageRequest uploadImageRequest) throws ApiException { okhttp3.Call localVarCall = uploadImageValidateBeforeCall(uploadImageRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call uploadImageAsync(UploadImageRequest uploadImageRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadImageValidateBeforeCall(uploadImageRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIuploadImageRequest { private final UploadImageRequest uploadImageRequest; private APIuploadImageRequest(UploadImageRequest uploadImageRequest) { this.uploadImageRequest = uploadImageRequest; } /** * Build call for uploadImage * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return uploadImageCall(uploadImageRequest, _callback); } /** * Execute uploadImage request * @return UploadImageInstructions * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public UploadImageInstructions execute() throws ApiException { ApiResponse localVarResp = uploadImageWithHttpInfo(uploadImageRequest); return localVarResp.getData(); } /** * Execute uploadImage request with HTTP info returned * @return ApiResponse<UploadImageInstructions> * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return uploadImageWithHttpInfo(uploadImageRequest); } /** * Execute uploadImage request (asynchronously) * @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 Success -
400 The details of the input related failure -
0 Error response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return uploadImageAsync(uploadImageRequest, _callback); } } /** * [EXPERIMENTAL] UploadImage: Upload a Docker Image used for Scheduler jobs * Every image must have at least one tag. Note: your image will not be available until the returned Docker commands are executed. * @param uploadImageRequest Request to upload image (required) * @return APIuploadImageRequest * @http.response.details
Status Code Description Response Headers
200 Success -
400 The details of the input related failure -
0 Error response -
*/ public APIuploadImageRequest uploadImage(UploadImageRequest uploadImageRequest) { return new APIuploadImageRequest(uploadImageRequest); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy