Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* FINBOURNE Luminesce Web 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.luminesce.api;
import com.finbourne.luminesce.ApiCallback;
import com.finbourne.luminesce.ApiClient;
import com.finbourne.luminesce.ApiException;
import com.finbourne.luminesce.ApiResponse;
import com.finbourne.luminesce.Configuration;
import com.finbourne.luminesce.Pair;
import com.finbourne.luminesce.ProgressRequestBody;
import com.finbourne.luminesce.ProgressResponseBody;
import com.finbourne.luminesce.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.io.File;
import com.finbourne.luminesce.model.LuminesceBinaryType;
import com.finbourne.luminesce.model.LusidProblemDetails;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class BinaryDownloadingApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public BinaryDownloadingApi() {
this(Configuration.getDefaultApiClient());
}
public BinaryDownloadingApi(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 downloadBinaryCall(LuminesceBinaryType type, String version, final ApiCallback _callback) throws ApiException {
return downloadBinaryCall(type, version, _callback, new ConfigurationOptions());
}
private okhttp3.Call downloadBinaryCall(LuminesceBinaryType type, String version, final ApiCallback _callback, ConfigurationOptions opts) 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/Download/download";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (version != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("version", version));
}
final String[] localVarAccepts = {
"application/octet-stream",
"text/plain",
"application/json",
"text/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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call downloadBinaryValidateBeforeCall(LuminesceBinaryType type, String version, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return downloadBinaryCall(type, version, _callback, opts);
}
private ApiResponse downloadBinaryWithHttpInfo(LuminesceBinaryType type, String version) throws ApiException {
okhttp3.Call localVarCall = downloadBinaryValidateBeforeCall(type, version, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse downloadBinaryWithHttpInfo(LuminesceBinaryType type, String version, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = downloadBinaryValidateBeforeCall(type, version, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call downloadBinaryAsync(LuminesceBinaryType type, String version, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = downloadBinaryValidateBeforeCall(type, version, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call downloadBinaryAsync(LuminesceBinaryType type, String version, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = downloadBinaryValidateBeforeCall(type, version, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIdownloadBinaryRequest {
private LuminesceBinaryType type;
private String version;
private APIdownloadBinaryRequest() {
}
/**
* Set type
* @param type Type of binary to download (each requires separate licenses and entitlements) (optional)
* @return APIdownloadBinaryRequest
*/
public APIdownloadBinaryRequest type(LuminesceBinaryType type) {
this.type = type;
return this;
}
/**
* Set version
* @param version An explicit version of the binary. Leave blank to get the latest version (recommended) (optional)
* @return APIdownloadBinaryRequest
*/
public APIdownloadBinaryRequest version(String version) {
this.version = version;
return this;
}
/**
* Build call for downloadBinary
* @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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return downloadBinaryCall(type, version, _callback);
}
/**
* Execute downloadBinary 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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public File execute() throws ApiException {
ApiResponse localVarResp = downloadBinaryWithHttpInfo(type, version);
return localVarResp.getData();
}
/**
* Execute downloadBinary request. Use any specified configuration options to override any other configuration for this request only.
* @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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public File execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = downloadBinaryWithHttpInfo(type, version, opts);
return localVarResp.getData();
}
/**
* Execute downloadBinary 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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return downloadBinaryWithHttpInfo(type, version);
}
/**
* Execute downloadBinary request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return downloadBinaryWithHttpInfo(type, version, opts);
}
/**
* Execute downloadBinary 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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return downloadBinaryAsync(type, version, _callback);
}
/**
* Execute downloadBinary request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return downloadBinaryAsync(type, version, _callback, opts);
}
}
/**
* [EXPERIMENTAL] DownloadBinary: Download Luminesce Binaries you may run on site
* Downloads the latest version (or specific if needs be) of the specified Luminesce Binary, given the required entitlements. > This endpoint is an alternative to time-consuming manual distribution via Drive or Email. > it relies on an underlying datastore that is not quite as \"Highly Available\" to the degree > that FINBOURNE services generally are. > Thus it is not subject to the same SLAs as other API endpoints are. > *If you perceive an outage, please try again later.* Once a file has been downloaded the following steps can be used to install it (for the dotnet tools at least): 1. Open a terminal and cd to the directory you downloaded it to 2. Install / extract files from that package via: ``` dotnet tool install NameOfFileWithoutVersionNumberOrExtension -g --add-source \".\" ``` e.g. ``` dotnet tool install Finbourne.Luminesce.DbProviders.Oracle_Snowflake -g --add-source \".\" ``` 3. Execute them (see documentation for specific binary)... The installed binaries can then be found in - Windows - `%USERPROFILE%\\.dotnet\\tools\\.store\\` - Linux/macOS - `$HOME/.dotnet/tools/.store/` The following error codes are to be anticipated with standard Problem Detail reports: - 400 BadRequest - binary file is not available for some reason (e.g. permissions or invalid version) - 401 Unauthorized - 403 Forbidden
* @return APIdownloadBinaryRequest
* @http.response.details
Status Code
Description
Response Headers
200
The .nupkg or .msi file of the requested binary
-
400
Bad Request
-
403
Forbidden
-
*/
public APIdownloadBinaryRequest downloadBinary() {
return new APIdownloadBinaryRequest();
}
private okhttp3.Call getBinaryVersionsCall(LuminesceBinaryType type, final ApiCallback _callback) throws ApiException {
return getBinaryVersionsCall(type, _callback, new ConfigurationOptions());
}
private okhttp3.Call getBinaryVersionsCall(LuminesceBinaryType type, final ApiCallback _callback, ConfigurationOptions opts) 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/Download/versions";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getBinaryVersionsValidateBeforeCall(LuminesceBinaryType type, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getBinaryVersionsCall(type, _callback, opts);
}
private ApiResponse> getBinaryVersionsWithHttpInfo(LuminesceBinaryType type) throws ApiException {
okhttp3.Call localVarCall = getBinaryVersionsValidateBeforeCall(type, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse> getBinaryVersionsWithHttpInfo(LuminesceBinaryType type, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getBinaryVersionsValidateBeforeCall(type, null, opts);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getBinaryVersionsAsync(LuminesceBinaryType type, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getBinaryVersionsValidateBeforeCall(type, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getBinaryVersionsAsync(LuminesceBinaryType type, final ApiCallback> _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getBinaryVersionsValidateBeforeCall(type, _callback, opts);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetBinaryVersionsRequest {
private LuminesceBinaryType type;
private APIgetBinaryVersionsRequest() {
}
/**
* Set type
* @param type Type of binary to fetch available versions of (optional)
* @return APIgetBinaryVersionsRequest
*/
public APIgetBinaryVersionsRequest type(LuminesceBinaryType type) {
this.type = type;
return this;
}
/**
* Build call for getBinaryVersions
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getBinaryVersionsCall(type, _callback);
}
/**
* Execute getBinaryVersions request
* @return List<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
Bad Request
-
403
Forbidden
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = getBinaryVersionsWithHttpInfo(type);
return localVarResp.getData();
}
/**
* Execute getBinaryVersions request. Use any specified configuration options to override any other configuration for this request only.
* @return List<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
Bad Request
-
403
Forbidden
-
*/
public List execute(ConfigurationOptions opts) throws ApiException {
ApiResponse> localVarResp = getBinaryVersionsWithHttpInfo(type, opts);
return localVarResp.getData();
}
/**
* Execute getBinaryVersions request with HTTP info returned
* @return ApiResponse<List<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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return getBinaryVersionsWithHttpInfo(type);
}
/**
* Execute getBinaryVersions request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<List<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
Bad Request
-
403
Forbidden
-
*/
public ApiResponse> executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getBinaryVersionsWithHttpInfo(type, opts);
}
/**
* Execute getBinaryVersions 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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return getBinaryVersionsAsync(type, _callback);
}
/**
* Execute getBinaryVersions request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Bad Request
-
403
Forbidden
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback, ConfigurationOptions opts) throws ApiException {
return getBinaryVersionsAsync(type, _callback, opts);
}
}
/**
* [EXPERIMENTAL] GetBinaryVersions: Lists the available versions of binaries
* Gets all available versions of a given binary type (from newest to oldest) This does not mean you are entitled to download them.
* @return APIgetBinaryVersionsRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
403
Forbidden
-
*/
public APIgetBinaryVersionsRequest getBinaryVersions() {
return new APIgetBinaryVersionsRequest();
}
}