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 Identity Service 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.identity.api;
import com.finbourne.identity.ApiCallback;
import com.finbourne.identity.ApiClient;
import com.finbourne.identity.ApiException;
import com.finbourne.identity.ApiResponse;
import com.finbourne.identity.Configuration;
import com.finbourne.identity.Pair;
import com.finbourne.identity.ProgressRequestBody;
import com.finbourne.identity.ProgressResponseBody;
import com.finbourne.identity.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.identity.model.CurrentUserResponse;
import com.finbourne.identity.model.LusidProblemDetails;
import com.finbourne.identity.model.LusidValidationProblemDetails;
import com.finbourne.identity.model.SetPassword;
import com.finbourne.identity.model.SetPasswordResponse;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class MeApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public MeApi() {
this(Configuration.getDefaultApiClient());
}
public MeApi(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 getUserInfoCall(final ApiCallback _callback) throws ApiException {
return getUserInfoCall( _callback, new ConfigurationOptions());
}
private okhttp3.Call getUserInfoCall(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/me";
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, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getUserInfoValidateBeforeCall(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getUserInfoCall(_callback, opts);
}
private ApiResponse getUserInfoWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getUserInfoValidateBeforeCall(null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getUserInfoWithHttpInfo(ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getUserInfoValidateBeforeCall(null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getUserInfoAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getUserInfoValidateBeforeCall(_callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getUserInfoAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getUserInfoValidateBeforeCall(_callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetUserInfoRequest {
private APIgetUserInfoRequest() {
}
/**
* Build call for getUserInfo
* @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
Get the specified user's info
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getUserInfoCall(_callback);
}
/**
* Execute getUserInfo request
* @return CurrentUserResponse
* @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
Get the specified user's info
-
0
Error response
-
*/
public CurrentUserResponse execute() throws ApiException {
ApiResponse localVarResp = getUserInfoWithHttpInfo();
return localVarResp.getData();
}
/**
* Execute getUserInfo request. Use any specified configuration options to override any other configuration for this request only.
* @return CurrentUserResponse
* @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
Get the specified user's info
-
0
Error response
-
*/
public CurrentUserResponse execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getUserInfoWithHttpInfo(opts);
return localVarResp.getData();
}
/**
* Execute getUserInfo request with HTTP info returned
* @return ApiResponse<CurrentUserResponse>
* @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
Get the specified user's info
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getUserInfoWithHttpInfo();
}
/**
* Execute getUserInfo request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<CurrentUserResponse>
* @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
Get the specified user's info
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getUserInfoWithHttpInfo(opts);
}
/**
* Execute getUserInfo 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
Get the specified user's info
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getUserInfoAsync(_callback);
}
/**
* Execute getUserInfo 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
Get the specified user's info
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getUserInfoAsync(_callback, opts);
}
}
/**
* GetUserInfo: Get User Info
* Get the requesting user's basic info
* @return APIgetUserInfoRequest
* @http.response.details
Status Code
Description
Response Headers
200
Get the specified user's info
-
0
Error response
-
*/
public APIgetUserInfoRequest getUserInfo() {
return new APIgetUserInfoRequest();
}
private okhttp3.Call setPasswordCall(SetPassword setPassword, final ApiCallback _callback) throws ApiException {
return setPasswordCall(setPassword, _callback, new ConfigurationOptions());
}
private okhttp3.Call setPasswordCall(SetPassword setPassword, 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 = setPassword;
// create path and map variables
String localVarPath = "/api/me/password";
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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call setPasswordValidateBeforeCall(SetPassword setPassword, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'setPassword' is set
if (setPassword == null) {
throw new ApiException("Missing the required parameter 'setPassword' when calling setPassword(Async)");
}
return setPasswordCall(setPassword, _callback, opts);
}
private ApiResponse setPasswordWithHttpInfo(SetPassword setPassword) throws ApiException {
okhttp3.Call localVarCall = setPasswordValidateBeforeCall(setPassword, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse setPasswordWithHttpInfo(SetPassword setPassword, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = setPasswordValidateBeforeCall(setPassword, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call setPasswordAsync(SetPassword setPassword, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = setPasswordValidateBeforeCall(setPassword, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call setPasswordAsync(SetPassword setPassword, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = setPasswordValidateBeforeCall(setPassword, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIsetPasswordRequest {
private final SetPassword setPassword;
private APIsetPasswordRequest(SetPassword setPassword) {
this.setPassword = setPassword;
}
/**
* Build call for setPassword
* @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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return setPasswordCall(setPassword, _callback);
}
/**
* Execute setPassword request
* @return SetPasswordResponse
* @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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public SetPasswordResponse execute() throws ApiException {
ApiResponse localVarResp = setPasswordWithHttpInfo(setPassword);
return localVarResp.getData();
}
/**
* Execute setPassword request. Use any specified configuration options to override any other configuration for this request only.
* @return SetPasswordResponse
* @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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public SetPasswordResponse execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = setPasswordWithHttpInfo(setPassword, opts);
return localVarResp.getData();
}
/**
* Execute setPassword request with HTTP info returned
* @return ApiResponse<SetPasswordResponse>
* @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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return setPasswordWithHttpInfo(setPassword);
}
/**
* Execute setPassword request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<SetPasswordResponse>
* @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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return setPasswordWithHttpInfo(setPassword, opts);
}
/**
* Execute setPassword 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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return setPasswordAsync(setPassword, _callback);
}
/**
* Execute setPassword 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
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return setPasswordAsync(setPassword, _callback, opts);
}
}
/**
* SetPassword: Set password of current user
* Set the password of the current user to the specified value. Note this is feature is only available to Service users authenticated using OpenID. For further information relating to usage of this feature please consult the documentation.
* @param setPassword The request containing the new password value (required)
* @return APIsetPasswordRequest
* @http.response.details
Status Code
Description
Response Headers
200
Set the current user's password
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIsetPasswordRequest setPassword(SetPassword setPassword) {
return new APIsetPasswordRequest(setPassword);
}
}