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

io.nem.sdk.openapi.jersey2.api.RestrictionMosaicRoutesApi Maven / Gradle / Ivy

package io.nem.sdk.openapi.jersey2.api;

import io.nem.sdk.openapi.jersey2.invoker.ApiException;
import io.nem.sdk.openapi.jersey2.invoker.ApiClient;
import io.nem.sdk.openapi.jersey2.invoker.ApiResponse;
import io.nem.sdk.openapi.jersey2.invoker.Configuration;
import io.nem.sdk.openapi.jersey2.invoker.Pair;

import javax.ws.rs.core.GenericType;

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

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-02-18T19:12:13.803Z[UTC]")
public class RestrictionMosaicRoutesApi {
  private ApiClient apiClient;

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

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

  public ApiClient getApiClient() {
    return apiClient;
  }

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

  /**
   * Get mosaic address restrictions for a given mosaic and account identifier.
   * Get mosaic address restriction.
   * @param mosaicId Mosaic identifier. (required)
   * @param accountId Account public key or address enconded using a 32-character set. (required)
   * @return MosaicAddressRestrictionDTO
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public MosaicAddressRestrictionDTO getMosaicAddressRestriction(String mosaicId, String accountId) throws ApiException { return getMosaicAddressRestrictionWithHttpInfo(mosaicId, accountId).getData(); } /** * Get mosaic address restrictions for a given mosaic and account identifier. * Get mosaic address restriction. * @param mosaicId Mosaic identifier. (required) * @param accountId Account public key or address enconded using a 32-character set. (required) * @return ApiResponse<MosaicAddressRestrictionDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public ApiResponse getMosaicAddressRestrictionWithHttpInfo(String mosaicId, String accountId) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'mosaicId' is set if (mosaicId == null) { throw new ApiException(400, "Missing the required parameter 'mosaicId' when calling getMosaicAddressRestriction"); } // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing the required parameter 'accountId' when calling getMosaicAddressRestriction"); } // create path and map variables String localVarPath = "/restrictions/mosaic/{mosaicId}/address/{accountId}" .replaceAll("\\{" + "mosaicId" + "\\}", apiClient.escapeString(mosaicId.toString())) .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * 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 fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public List getMosaicAddressRestrictions(String mosaicId, AccountIds accountIds) throws ApiException { return getMosaicAddressRestrictionsWithHttpInfo(mosaicId, accountIds).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 fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse> getMosaicAddressRestrictionsWithHttpInfo(String mosaicId, AccountIds accountIds) throws ApiException { Object localVarPostBody = accountIds; // verify the required parameter 'mosaicId' is set if (mosaicId == null) { throw new ApiException(400, "Missing the required parameter 'mosaicId' when calling getMosaicAddressRestrictions"); } // create path and map variables String localVarPath = "/restrictions/mosaic/{mosaicId}" .replaceAll("\\{" + "mosaicId" + "\\}", apiClient.escapeString(mosaicId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get mosaic global restriction for a given mosaic identifier. * Get mosaic global restriction. * @param mosaicId Mosaic identifier. (required) * @return MosaicGlobalRestrictionDTO * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public MosaicGlobalRestrictionDTO getMosaicGlobalRestriction(String mosaicId) throws ApiException { return getMosaicGlobalRestrictionWithHttpInfo(mosaicId).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 fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public ApiResponse getMosaicGlobalRestrictionWithHttpInfo(String mosaicId) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'mosaicId' is set if (mosaicId == null) { throw new ApiException(400, "Missing the required parameter 'mosaicId' when calling getMosaicGlobalRestriction"); } // create path and map variables String localVarPath = "/restrictions/mosaic/{mosaicId}" .replaceAll("\\{" + "mosaicId" + "\\}", apiClient.escapeString(mosaicId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get mosaic global restrictions for an array of mosaics. * Get mosaic global restrictions. * @param mosaicIds (required) * @return List<MosaicGlobalRestrictionDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public List getMosaicGlobalRestrictions(MosaicIds mosaicIds) throws ApiException { return getMosaicGlobalRestrictionsWithHttpInfo(mosaicIds).getData(); } /** * Get mosaic global restrictions for an array of mosaics. * Get mosaic global restrictions. * @param mosaicIds (required) * @return ApiResponse<List<MosaicGlobalRestrictionDTO>> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse> getMosaicGlobalRestrictionsWithHttpInfo(MosaicIds mosaicIds) throws ApiException { Object localVarPostBody = mosaicIds; // verify the required parameter 'mosaicIds' is set if (mosaicIds == null) { throw new ApiException(400, "Missing the required parameter 'mosaicIds' when calling getMosaicGlobalRestrictions"); } // create path and map variables String localVarPath = "/restrictions/mosaic"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy