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

io.nem.symbol.sdk.openapi.okhttp_gson.api.RestrictionMosaicRoutesApi Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
/*
 * Catapult REST Endpoints
 * OpenAPI Specification of catapult-rest 1.1.2
 *
 * The version of the OpenAPI document: 0.9.4
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.nem.symbol.sdk.openapi.okhttp_gson.api;

import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiCallback;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiClient;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiException;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiResponse;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.Configuration;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.Pair;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ProgressRequestBody;
import io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import io.nem.symbol.sdk.openapi.okhttp_gson.model.AccountIds;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.ModelError;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.MosaicAddressRestrictionDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.MosaicGlobalRestrictionDTO;
import io.nem.symbol.sdk.openapi.okhttp_gson.model.MosaicIds;

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

public class RestrictionMosaicRoutesApi {
    private ApiClient localVarApiClient;

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

    public RestrictionMosaicRoutesApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    /**
     * Build call for getMosaicAddressRestriction
     * @param mosaicId Mosaic identifier. (required)
     * @param address Account address. (required)
     * @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 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicAddressRestrictionCall(String mosaicId, String address, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/restrictions/mosaic/{mosaicId}/address/{address}" .replaceAll("\\{" + "mosaicId" + "\\}", localVarApiClient.escapeString(mosaicId.toString())) .replaceAll("\\{" + "address" + "\\}", localVarApiClient.escapeString(address.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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMosaicAddressRestrictionValidateBeforeCall(String mosaicId, String address, final ApiCallback _callback) throws ApiException { // verify the required parameter 'mosaicId' is set if (mosaicId == null) { throw new ApiException("Missing the required parameter 'mosaicId' when calling getMosaicAddressRestriction(Async)"); } // verify the required parameter 'address' is set if (address == null) { throw new ApiException("Missing the required parameter 'address' when calling getMosaicAddressRestriction(Async)"); } okhttp3.Call localVarCall = getMosaicAddressRestrictionCall(mosaicId, address, _callback); return localVarCall; } /** * Get mosaic address restrictions for a given mosaic and account address. * Get mosaic address restriction. * @param mosaicId Mosaic identifier. (required) * @param address Account address. (required) * @return MosaicAddressRestrictionDTO * @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 -
404 ResourceNotFound -
409 InvalidArgument -
*/ public MosaicAddressRestrictionDTO getMosaicAddressRestriction(String mosaicId, String address) throws ApiException { ApiResponse localVarResp = getMosaicAddressRestrictionWithHttpInfo(mosaicId, address); return localVarResp.getData(); } /** * Get mosaic address restrictions for a given mosaic and account address. * Get mosaic address restriction. * @param mosaicId Mosaic identifier. (required) * @param address Account address. (required) * @return ApiResponse<MosaicAddressRestrictionDTO> * @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 -
404 ResourceNotFound -
409 InvalidArgument -
*/ public ApiResponse getMosaicAddressRestrictionWithHttpInfo(String mosaicId, String address) throws ApiException { okhttp3.Call localVarCall = getMosaicAddressRestrictionValidateBeforeCall(mosaicId, address, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get mosaic address restrictions for a given mosaic and account address. (asynchronously) * Get mosaic address restriction. * @param mosaicId Mosaic identifier. (required) * @param address Account address. (required) * @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 -
404 ResourceNotFound -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicAddressRestrictionAsync(String mosaicId, String address, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMosaicAddressRestrictionValidateBeforeCall(mosaicId, address, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getMosaicAddressRestrictions * @param mosaicId Mosaic identifier. (required) * @param accountIds (optional) * @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 success -
400 InvalidContent -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicAddressRestrictionsCall(String mosaicId, AccountIds accountIds, final ApiCallback _callback) throws ApiException { Object localVarPostBody = accountIds; // create path and map variables String localVarPath = "/restrictions/mosaic/{mosaicId}" .replaceAll("\\{" + "mosaicId" + "\\}", localVarApiClient.escapeString(mosaicId.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 = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMosaicAddressRestrictionsValidateBeforeCall(String mosaicId, AccountIds accountIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'mosaicId' is set if (mosaicId == null) { throw new ApiException("Missing the required parameter 'mosaicId' when calling getMosaicAddressRestrictions(Async)"); } okhttp3.Call localVarCall = getMosaicAddressRestrictionsCall(mosaicId, accountIds, _callback); return localVarCall; } /** * Get mosaic address restrictions for a given mosaic and account identifiers array. * Get mosaic address restrictions. * @param mosaicId Mosaic identifier. (required) * @param accountIds (optional) * @return List<MosaicAddressRestrictionDTO> * @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 InvalidContent -
409 InvalidArgument -
*/ public List getMosaicAddressRestrictions(String mosaicId, AccountIds accountIds) throws ApiException { ApiResponse> localVarResp = getMosaicAddressRestrictionsWithHttpInfo(mosaicId, accountIds); return localVarResp.getData(); } /** * Get mosaic address restrictions for a given mosaic and account identifiers array. * Get mosaic address restrictions. * @param mosaicId Mosaic identifier. (required) * @param accountIds (optional) * @return ApiResponse<List<MosaicAddressRestrictionDTO>> * @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 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse> getMosaicAddressRestrictionsWithHttpInfo(String mosaicId, AccountIds accountIds) throws ApiException { okhttp3.Call localVarCall = getMosaicAddressRestrictionsValidateBeforeCall(mosaicId, accountIds, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get mosaic address restrictions for a given mosaic and account identifiers array. (asynchronously) * Get mosaic address restrictions. * @param mosaicId Mosaic identifier. (required) * @param accountIds (optional) * @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 InvalidContent -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicAddressRestrictionsAsync(String mosaicId, AccountIds accountIds, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getMosaicAddressRestrictionsValidateBeforeCall(mosaicId, accountIds, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getMosaicGlobalRestriction * @param mosaicId Mosaic identifier. (required) * @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 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicGlobalRestrictionCall(String mosaicId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/restrictions/mosaic/{mosaicId}" .replaceAll("\\{" + "mosaicId" + "\\}", localVarApiClient.escapeString(mosaicId.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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMosaicGlobalRestrictionValidateBeforeCall(String mosaicId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'mosaicId' is set if (mosaicId == null) { throw new ApiException("Missing the required parameter 'mosaicId' when calling getMosaicGlobalRestriction(Async)"); } okhttp3.Call localVarCall = getMosaicGlobalRestrictionCall(mosaicId, _callback); return localVarCall; } /** * Get mosaic global restriction for a given mosaic identifier. * Get mosaic global restriction. * @param mosaicId Mosaic identifier. (required) * @return MosaicGlobalRestrictionDTO * @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 -
404 ResourceNotFound -
409 InvalidArgument -
*/ public MosaicGlobalRestrictionDTO getMosaicGlobalRestriction(String mosaicId) throws ApiException { ApiResponse localVarResp = getMosaicGlobalRestrictionWithHttpInfo(mosaicId); return localVarResp.getData(); } /** * Get mosaic global restriction for a given mosaic identifier. * Get mosaic global restriction. * @param mosaicId Mosaic identifier. (required) * @return ApiResponse<MosaicGlobalRestrictionDTO> * @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 -
404 ResourceNotFound -
409 InvalidArgument -
*/ public ApiResponse getMosaicGlobalRestrictionWithHttpInfo(String mosaicId) throws ApiException { okhttp3.Call localVarCall = getMosaicGlobalRestrictionValidateBeforeCall(mosaicId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get mosaic global restriction for a given mosaic identifier. (asynchronously) * Get mosaic global restriction. * @param mosaicId Mosaic identifier. (required) * @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 -
404 ResourceNotFound -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicGlobalRestrictionAsync(String mosaicId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMosaicGlobalRestrictionValidateBeforeCall(mosaicId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getMosaicGlobalRestrictions * @param mosaicIds (required) * @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 success -
400 InvalidContent -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicGlobalRestrictionsCall(MosaicIds mosaicIds, final ApiCallback _callback) throws ApiException { Object localVarPostBody = mosaicIds; // create path and map variables String localVarPath = "/restrictions/mosaic"; 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" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMosaicGlobalRestrictionsValidateBeforeCall(MosaicIds mosaicIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'mosaicIds' is set if (mosaicIds == null) { throw new ApiException("Missing the required parameter 'mosaicIds' when calling getMosaicGlobalRestrictions(Async)"); } okhttp3.Call localVarCall = getMosaicGlobalRestrictionsCall(mosaicIds, _callback); return localVarCall; } /** * Get mosaic global restrictions for an array of mosaics. * Get mosaic global restrictions. * @param mosaicIds (required) * @return List<MosaicGlobalRestrictionDTO> * @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 InvalidContent -
409 InvalidArgument -
*/ public List getMosaicGlobalRestrictions(MosaicIds mosaicIds) throws ApiException { ApiResponse> localVarResp = getMosaicGlobalRestrictionsWithHttpInfo(mosaicIds); return localVarResp.getData(); } /** * Get mosaic global restrictions for an array of mosaics. * Get mosaic global restrictions. * @param mosaicIds (required) * @return ApiResponse<List<MosaicGlobalRestrictionDTO>> * @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 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse> getMosaicGlobalRestrictionsWithHttpInfo(MosaicIds mosaicIds) throws ApiException { okhttp3.Call localVarCall = getMosaicGlobalRestrictionsValidateBeforeCall(mosaicIds, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get mosaic global restrictions for an array of mosaics. (asynchronously) * Get mosaic global restrictions. * @param mosaicIds (required) * @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 InvalidContent -
409 InvalidArgument -
*/ public okhttp3.Call getMosaicGlobalRestrictionsAsync(MosaicIds mosaicIds, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getMosaicGlobalRestrictionsValidateBeforeCall(mosaicIds, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy