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

com.seeq.api.ItemsApi Maven / Gradle / Ivy

There is a newer version: 66.0.0-v202407310200
Show newest version
package com.seeq.api;

import com.seeq.ApiException;
import com.seeq.ApiClient;
import com.seeq.Configuration;
import com.seeq.model.*;
import com.seeq.Pair;

import javax.ws.rs.core.GenericType;
import javax.ws.rs.ProcessingException;

import com.seeq.model.AceInputV1;
import com.seeq.model.AclInputV1;
import com.seeq.model.AclOutputV1;
import com.seeq.model.CacheInfoV1;
import com.seeq.model.CalculatedItemOutputV1;
import com.seeq.model.FormulaCompileOutputV1;
import com.seeq.model.FormulaUpdateInputV1;
import com.seeq.model.ItemDependencyOutputV1;
import com.seeq.model.ItemOutputV1;
import com.seeq.model.ItemPreviewListV1;
import com.seeq.model.ItemPreviewV1;
import com.seeq.model.ItemSearchPreviewListV1;
import com.seeq.model.ItemSearchPreviewPaginatedListV1;
import com.seeq.model.ItemUserAttributesInputV1;
import com.seeq.model.ItemUserAttributesOutputV1;
import com.seeq.model.PropertyHrefOutputV1;
import com.seeq.model.PropertyInputV1;
import com.seeq.model.PropertyOutputV1;
import com.seeq.model.ScalarPropertyV1;
import com.seeq.model.StatusMessageBase;
import com.seeq.model.SwapInputV1;
import com.seeq.model.SwapOptionListV1;


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

  public class ItemsApi {
  private ApiClient apiClient;
  private long retryTimeout = 5_000; // Default of 5 seconds

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

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

  public void setRetryTimeout(long retryTimeout) {
    this.retryTimeout = retryTimeout;
  }

  public long getRetryTimeout() {
    return this.retryTimeout;
  }

  public ApiClient getApiClient() {
  return apiClient;
  }

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

    /**
    * Add an access control entry to an item
    * 
      * @param id ID of the item to add access control entry to (required)
      * @param body The access control entry to add to the item (required)
      * @return AclOutputV1
    * @throws ApiException if fails to make API call
    */
    public AclOutputV1 addAccessControlEntry(String id, AceInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = addAccessControlEntryWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Add an access control entry to an item
    * 
      * @param id ID of the item to add access control entry to (required)
      * @param body The access control entry to add to the item (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse addAccessControlEntryWithHttpInfo(String id, AceInputV1 body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling addAccessControlEntry");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling addAccessControlEntry");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/ace"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Archive or delete an item
    * 
      * @param id ID of the item for which to retrieve properties (required)
      * @param delete Permanently and irretrievably delete the item (optional, default to false)
      * @param archivedReason The reason for archiving the item. Can be one of OBSOLETE_SQLV1, BY_USER, DATASOURCE_CLEANUP, BY_MIGRATION, BY_PARENT_ITEM, BY_AUTO_ARCHIVE, BY_SANDBOX_MODE, or NONE (optional, default to BY_USER)
      * @param note An optional note for why the item was archived (optional)
      * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase archiveItem(String id, Boolean delete, String archivedReason, String note) throws ApiException {
        ApiClient.ApiResponse localVarResponse = archiveItemWithHttpInfo(id, delete, archivedReason, note);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Archive or delete an item
    * 
      * @param id ID of the item for which to retrieve properties (required)
      * @param delete Permanently and irretrievably delete the item (optional, default to false)
      * @param archivedReason The reason for archiving the item. Can be one of OBSOLETE_SQLV1, BY_USER, DATASOURCE_CLEANUP, BY_MIGRATION, BY_PARENT_ITEM, BY_AUTO_ARCHIVE, BY_SANDBOX_MODE, or NONE (optional, default to BY_USER)
      * @param note An optional note for why the item was archived (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse archiveItemWithHttpInfo(String id, Boolean delete, String archivedReason, String note) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling archiveItem");
      }
    // create path and map variables
    String localVarPath = "/items/{id}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "delete", delete));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "archivedReason", archivedReason));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "note", note));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Change the owner of the specified item to the specified user. You need to be an administrator to be able to change the owner.
    * 
      * @param itemId ID of the item to change owner for (required)
      * @param newOwnerId ID of the user to become the new owner (required)
      * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase changeOwner(String itemId, String newOwnerId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = changeOwnerWithHttpInfo(itemId, newOwnerId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Change the owner of the specified item to the specified user. You need to be an administrator to be able to change the owner.
    * 
      * @param itemId ID of the item to change owner for (required)
      * @param newOwnerId ID of the user to become the new owner (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse changeOwnerWithHttpInfo(String itemId, String newOwnerId) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'itemId' is set
      if (itemId == null) {
      throw new ApiException(400, "Missing the required parameter 'itemId' when calling changeOwner");
      }
      // verify the required parameter 'newOwnerId' is set
      if (newOwnerId == null) {
      throw new ApiException(400, "Missing the required parameter 'newOwnerId' when calling changeOwner");
      }
    // create path and map variables
    String localVarPath = "/items/{itemId}/owner/{newOwnerId}"
      .replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()))
      .replaceAll("\\{" + "newOwnerId" + "\\}", apiClient.escapeString(newOwnerId.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Clear the cache for an item.
    * 
      * @param id ID of the item on which to clear cache (required)
      * @param clearDependents Whether dependent caches should be cleared. Should always be true if a cache is in error, but false may be valuable when merely trying to recover disk space. (optional, default to true)
      * @return CacheInfoV1
    * @throws ApiException if fails to make API call
    */
    public CacheInfoV1 clearCache(String id, Boolean clearDependents) throws ApiException {
        ApiClient.ApiResponse localVarResponse = clearCacheWithHttpInfo(id, clearDependents);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Clear the cache for an item.
    * 
      * @param id ID of the item on which to clear cache (required)
      * @param clearDependents Whether dependent caches should be cleared. Should always be true if a cache is in error, but false may be valuable when merely trying to recover disk space. (optional, default to true)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse clearCacheWithHttpInfo(String id, Boolean clearDependents) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling clearCache");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/cache"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "clearDependents", clearDependents));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Delete a property
    * 
      * @param id ID of the item whose property is being deleted (required)
      * @param propertyName Name of the property to delete (required)
      * @return StatusMessageBase
    * @throws ApiException if fails to make API call
    */
    public StatusMessageBase deleteProperty(String id, String propertyName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = deletePropertyWithHttpInfo(id, propertyName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Delete a property
    * 
      * @param id ID of the item whose property is being deleted (required)
      * @param propertyName Name of the property to delete (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse deletePropertyWithHttpInfo(String id, String propertyName) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling deleteProperty");
      }
      // verify the required parameter 'propertyName' is set
      if (propertyName == null) {
      throw new ApiException(400, "Missing the required parameter 'propertyName' when calling deleteProperty");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/properties/{propertyName}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
      .replaceAll("\\{" + "propertyName" + "\\}", apiClient.escapeString(propertyName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Create, or find, a variant of the item that is based on the specified asset. For example, given the ID for Temperature in Area A, find its equivalent for Area B. Or, for a formula that uses Area A Temperature as an input, create a variant that that is based off Area B.
    * 
      * @param id ID of the item that is being updated (required)
      * @param body Asset swap information (required)
      * @return ItemPreviewV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewV1 findSwap(String id, List body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = findSwapWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Create, or find, a variant of the item that is based on the specified asset. For example, given the ID for Temperature in Area A, find its equivalent for Area B. Or, for a formula that uses Area A Temperature as an input, create a variant that that is based off Area B.
    * 
      * @param id ID of the item that is being updated (required)
      * @param body Asset swap information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse findSwapWithHttpInfo(String id, List body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling findSwap");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling findSwap");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/swap"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get the current access control list for an item
    * 
      * @param id ID of the item to get access control list for (required)
      * @return AclOutputV1
    * @throws ApiException if fails to make API call
    */
    public AclOutputV1 getAccessControl(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getAccessControlWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get the current access control list for an item
    * 
      * @param id ID of the item to get access control list for (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getAccessControlWithHttpInfo(String id) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getAccessControl");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/acl"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get the current access control list for an item with details of inherited entries
    * 
      * @param id ID of the item to get access control list for (required)
      * @param forceAclInheritance Show the ACL details as if access control inheritance would be enabled for the item (optional, default to false)
      * @return AclOutputV1
    * @throws ApiException if fails to make API call
    */
    public AclOutputV1 getAccessControlDetails(String id, Boolean forceAclInheritance) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getAccessControlDetailsWithHttpInfo(id, forceAclInheritance);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get the current access control list for an item with details of inherited entries
    * 
      * @param id ID of the item to get access control list for (required)
      * @param forceAclInheritance Show the ACL details as if access control inheritance would be enabled for the item (optional, default to false)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getAccessControlDetailsWithHttpInfo(String id, Boolean forceAclInheritance) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getAccessControlDetails");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/acl/details"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "forceAclInheritance", forceAclInheritance));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get the formula dependencies of an Item.
    * 
      * @param id ID of the item to find dependencies of (required)
      * @return ItemDependencyOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemDependencyOutputV1 getFormulaDependencies(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getFormulaDependenciesWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get the formula dependencies of an Item.
    * 
      * @param id ID of the item to find dependencies of (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaDependenciesWithHttpInfo(String id) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getFormulaDependencies");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/dependencies"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a collection of items dependent on the item identified by the supplied ID.
    * 
      * @param id ID of the item to find dependents of (required)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
      * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getFormulaDependents(String id, Integer offset, Integer limit) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getFormulaDependentsWithHttpInfo(id, offset, limit);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a collection of items dependent on the item identified by the supplied ID.
    * 
      * @param id ID of the item to find dependents of (required)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getFormulaDependentsWithHttpInfo(String id, Integer offset, Integer limit) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getFormulaDependents");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/dependents"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a collection of items interested in the item identified by the supplied ID.
    * 
      * @param id ID of the item to find all other items interested in the parameter (required)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
      * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getInterested(String id, Integer offset, Integer limit) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getInterestedWithHttpInfo(id, offset, limit);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a collection of items interested in the item identified by the supplied ID.
    * 
      * @param id ID of the item to find all other items interested in the parameter (required)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getInterestedWithHttpInfo(String id, Integer offset, Integer limit) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getInterested");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/interested"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get all the properties for the item identified by the supplied ID
    * 
      * @param id ID of the item for which to retrieve properties (required)
      * @return ItemOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemOutputV1 getItemAndAllProperties(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getItemAndAllPropertiesWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get all the properties for the item identified by the supplied ID
    * 
      * @param id ID of the item for which to retrieve properties (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemAndAllPropertiesWithHttpInfo(String id) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getItemAndAllProperties");
      }
    // create path and map variables
    String localVarPath = "/items/{id}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Finds all Threshold Metrics and Formulas that are directly built off the specified item.
    * 
      * @param id ID of the item to find usages (required)
      * @param scope IDs that limit the results to those which are in the global scope or are scoped to the items referenced by the IDs. <br>The following item types can act as a scope: <b>Workbook</b><br>If the scope is set to the Empty GUID then the scoped items are excluded (optional)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page (optional, default to 500)
      * @return ItemPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemPreviewListV1 getItemUsages(String id, List scope, Integer offset, Integer limit) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getItemUsagesWithHttpInfo(id, scope, offset, limit);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Finds all Threshold Metrics and Formulas that are directly built off the specified item.
    * 
      * @param id ID of the item to find usages (required)
      * @param scope IDs that limit the results to those which are in the global scope or are scoped to the items referenced by the IDs. <br>The following item types can act as a scope: <b>Workbook</b><br>If the scope is set to the Empty GUID then the scoped items are excluded (optional)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page (optional, default to 500)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemUsagesWithHttpInfo(String id, List scope, Integer offset, Integer limit) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getItemUsages");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/usages"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "scope", scope));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get user-specific attributes of an item for the authenticated user.
    * 
      * @param id ID of the item to get attributes for (required)
      * @return ItemUserAttributesOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemUserAttributesOutputV1 getItemUserAttributes(String id) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getItemUserAttributesWithHttpInfo(id);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get user-specific attributes of an item for the authenticated user.
    * 
      * @param id ID of the item to get attributes for (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getItemUserAttributesWithHttpInfo(String id) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getItemUserAttributes");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/userAttributes"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get all pinned items for an item, ordered by the most recent first
    * 
      * @param sourceId Id of the source item to get pinned items for. If not specified, the current user will be used. (optional)
      * @return ItemSearchPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemSearchPreviewListV1 getPinnedItems(String sourceId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getPinnedItemsWithHttpInfo(sourceId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get all pinned items for an item, ordered by the most recent first
    * 
      * @param sourceId Id of the source item to get pinned items for. If not specified, the current user will be used. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getPinnedItemsWithHttpInfo(String sourceId) throws ApiException {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/items/pinned";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "sourceId", sourceId));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a property
    * 
      * @param id ID of the item for which to retrieve the specified property (required)
      * @param propertyName Name of the property to retrieve (required)
      * @return PropertyOutputV1
    * @throws ApiException if fails to make API call
    */
    public PropertyOutputV1 getProperty(String id, String propertyName) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getPropertyWithHttpInfo(id, propertyName);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a property
    * 
      * @param id ID of the item for which to retrieve the specified property (required)
      * @param propertyName Name of the property to retrieve (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getPropertyWithHttpInfo(String id, String propertyName) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getProperty");
      }
      // verify the required parameter 'propertyName' is set
      if (propertyName == null) {
      throw new ApiException(400, "Missing the required parameter 'propertyName' when calling getProperty");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/properties/{propertyName}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
      .replaceAll("\\{" + "propertyName" + "\\}", apiClient.escapeString(propertyName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * For the Item to be swapped in, get a ranked list of potential swap-out Items from the paths of the Items whose IDs are passed as query parameters.  The ranking is based on the number of matches found among the descendants of the swap-in Item when the listed Item is chosen as the swap-out Item, where matching is established by comparing relative paths.
    * 
      * @param id ID of the root Item to be swapped in (required)
      * @param swapOutItemIds IDs of the items to be swapped out (required)
      * @return SwapOptionListV1
    * @throws ApiException if fails to make API call
    */
    public SwapOptionListV1 getSwapOptions(String id, List swapOutItemIds) throws ApiException {
        ApiClient.ApiResponse localVarResponse = getSwapOptionsWithHttpInfo(id, swapOutItemIds);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * For the Item to be swapped in, get a ranked list of potential swap-out Items from the paths of the Items whose IDs are passed as query parameters.  The ranking is based on the number of matches found among the descendants of the swap-in Item when the listed Item is chosen as the swap-out Item, where matching is established by comparing relative paths.
    * 
      * @param id ID of the root Item to be swapped in (required)
      * @param swapOutItemIds IDs of the items to be swapped out (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse getSwapOptionsWithHttpInfo(String id, List swapOutItemIds) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling getSwapOptions");
      }
      // verify the required parameter 'swapOutItemIds' is set
      if (swapOutItemIds == null) {
      throw new ApiException(400, "Missing the required parameter 'swapOutItemIds' when calling getSwapOptions");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/swapOptions"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "swapOutItemIds", swapOutItemIds));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Pin an item
    * 
      * @param sourceId Id of the source item. If not specified, the current user will be used. (optional)
      * @param itemId Id of the item to pin/mark as a favorite (required)
      * @return ItemSearchPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemSearchPreviewListV1 pinItem(String sourceId, String itemId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = pinItemWithHttpInfo(sourceId, itemId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Pin an item
    * 
      * @param sourceId Id of the source item. If not specified, the current user will be used. (optional)
      * @param itemId Id of the item to pin/mark as a favorite (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse pinItemWithHttpInfo(String sourceId, String itemId) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'itemId' is set
      if (itemId == null) {
      throw new ApiException(400, "Missing the required parameter 'itemId' when calling pinItem");
      }
    // create path and map variables
    String localVarPath = "/items/pinned/{itemId}"
      .replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "sourceId", sourceId));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Remove an access control entry from an item
    * 
      * @param id ID of the item to remove access control entry from (required)
      * @param aceId ID of the access control entry to remove (required)
      * @return AclOutputV1
    * @throws ApiException if fails to make API call
    */
    public AclOutputV1 removeAccessControlEntry(String id, String aceId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = removeAccessControlEntryWithHttpInfo(id, aceId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Remove an access control entry from an item
    * 
      * @param id ID of the item to remove access control entry from (required)
      * @param aceId ID of the access control entry to remove (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse removeAccessControlEntryWithHttpInfo(String id, String aceId) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling removeAccessControlEntry");
      }
      // verify the required parameter 'aceId' is set
      if (aceId == null) {
      throw new ApiException(400, "Missing the required parameter 'aceId' when calling removeAccessControlEntry");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/ace/{aceId}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
      .replaceAll("\\{" + "aceId" + "\\}", apiClient.escapeString(aceId.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Reset the Change Data Capture of an item.
    * 
      * @param itemId Id of the item to update. (required)
      * @return PropertyOutputV1
    * @throws ApiException if fails to make API call
    */
    public PropertyOutputV1 resetCdc(String itemId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = resetCdcWithHttpInfo(itemId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Reset the Change Data Capture of an item.
    * 
      * @param itemId Id of the item to update. (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse resetCdcWithHttpInfo(String itemId) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'itemId' is set
      if (itemId == null) {
      throw new ApiException(400, "Missing the required parameter 'itemId' when calling resetCdc");
      }
    // create path and map variables
    String localVarPath = "/items/{itemId}/resetCdc"
      .replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Get a collection of items
    * 
      * @param filters A list of item filters to reduce the result set. To logical AND multiple filters, use <b>\"filter1 && filter2</b>\" on a single line. To logical OR multiple filters, put each onto a new line. Filters can include any of the following options:<br><b>Empty</b>: returns the first ceiling number of items<br><b>\"value\"</b>: name or description of the item contains the case-insensitive value<br><b>\"field==value\"</b>: specified field exactly matches the case-sensitive value or regex<br><b>\"field~=value\"</b>: specified field contains the case-insensitive value or case-sensitive regex<br>To search for all items in the desired scope you may also use \"\\*\" character as filter.<br><b>Example:</b> Find items where (name or description contains case-insensitive \"bulb\" AND description contains case-insensitive \"area a\") OR (items hosted by datasource \"Example Data\" where name exactly matches the regex \".\\*[ABC]_Temperature\")<br><b>bulb && Description~=area a</b><br><b>Datasource ID==Example Data && Name==/.\\*[ABC]_Temperature/</b><br>To allow items with the 'unsearchable' property to be returned, include <b>\"@includeUnsearchable\"</b> on its own line<br>To exclude globally scoped items when using the \"scope\" filter include <b>\"@excludeGloballyScoped\"</b> on its own line (optional)
      * @param scope IDs that limit the results to those which are in the global scope or are scoped to the items referenced by the IDs. <br>The following item types can act as a scope: <b>Workbook</b><br>If the scope is set to the Empty GUID then the scoped items are excluded (optional)
      * @param asset An ID that limits the results to items which are in the tree below the Asset referenced by the ID. (optional)
      * @param types A list of one or more case-sensitive item types which will restrict results to only those items that exactly match, or are children of, one of the specified types. If no types are provided then items of any type are returned (optional)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned. (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned. (optional, default to 40)
      * @param orderBy An optional list of one or more fields used to sort the results. (optional)
      * @return ItemSearchPreviewPaginatedListV1
    * @throws ApiException if fails to make API call
    */
    public ItemSearchPreviewPaginatedListV1 searchItems(List filters, List scope, String asset, List types, Integer offset, Integer limit, List orderBy) throws ApiException {
        ApiClient.ApiResponse localVarResponse = searchItemsWithHttpInfo(filters, scope, asset, types, offset, limit, orderBy);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Get a collection of items
    * 
      * @param filters A list of item filters to reduce the result set. To logical AND multiple filters, use <b>\"filter1 && filter2</b>\" on a single line. To logical OR multiple filters, put each onto a new line. Filters can include any of the following options:<br><b>Empty</b>: returns the first ceiling number of items<br><b>\"value\"</b>: name or description of the item contains the case-insensitive value<br><b>\"field==value\"</b>: specified field exactly matches the case-sensitive value or regex<br><b>\"field~=value\"</b>: specified field contains the case-insensitive value or case-sensitive regex<br>To search for all items in the desired scope you may also use \"\\*\" character as filter.<br><b>Example:</b> Find items where (name or description contains case-insensitive \"bulb\" AND description contains case-insensitive \"area a\") OR (items hosted by datasource \"Example Data\" where name exactly matches the regex \".\\*[ABC]_Temperature\")<br><b>bulb && Description~=area a</b><br><b>Datasource ID==Example Data && Name==/.\\*[ABC]_Temperature/</b><br>To allow items with the 'unsearchable' property to be returned, include <b>\"@includeUnsearchable\"</b> on its own line<br>To exclude globally scoped items when using the \"scope\" filter include <b>\"@excludeGloballyScoped\"</b> on its own line (optional)
      * @param scope IDs that limit the results to those which are in the global scope or are scoped to the items referenced by the IDs. <br>The following item types can act as a scope: <b>Workbook</b><br>If the scope is set to the Empty GUID then the scoped items are excluded (optional)
      * @param asset An ID that limits the results to items which are in the tree below the Asset referenced by the ID. (optional)
      * @param types A list of one or more case-sensitive item types which will restrict results to only those items that exactly match, or are children of, one of the specified types. If no types are provided then items of any type are returned (optional)
      * @param offset The pagination offset, the index of the first collection item that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned. (optional, default to 0)
      * @param limit The pagination limit, the total number of collection items that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned. (optional, default to 40)
      * @param orderBy An optional list of one or more fields used to sort the results. (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse searchItemsWithHttpInfo(List filters, List scope, String asset, List types, Integer offset, Integer limit, List orderBy) throws ApiException {
    Object localVarPostBody = null;
    // create path and map variables
    String localVarPath = "/items";

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filters", filters));
      localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "scope", scope));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "asset", asset));
      localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "types", types));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
      localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
      localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "orderBy", orderBy));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Set the access control list (list of access control entries) for an item.
    * 
      * @param id ID of the item to change access control list for (required)
      * @param body The access control list to set (required)
      * @return AclOutputV1
    * @throws ApiException if fails to make API call
    */
    public AclOutputV1 setAcl(String id, AclInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setAclWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Set the access control list (list of access control entries) for an item.
    * 
      * @param id ID of the item to change access control list for (required)
      * @param body The access control list to set (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setAclWithHttpInfo(String id, AclInputV1 body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setAcl");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling setAcl");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/acl"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Turns on or off access control inheritance for the specified item
    * 
      * @param id ID of the item to change access control inheritance for (required)
      * @param inheritAcl True if the item should inherit access control from its parent, false if it shouldn't. (required)
      * @return AclOutputV1
    * @throws ApiException if fails to make API call
    */
    public AclOutputV1 setAclInheritance(String id, Boolean inheritAcl) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setAclInheritanceWithHttpInfo(id, inheritAcl);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Turns on or off access control inheritance for the specified item
    * 
      * @param id ID of the item to change access control inheritance for (required)
      * @param inheritAcl True if the item should inherit access control from its parent, false if it shouldn't. (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setAclInheritanceWithHttpInfo(String id, Boolean inheritAcl) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setAclInheritance");
      }
      // verify the required parameter 'inheritAcl' is set
      if (inheritAcl == null) {
      throw new ApiException(400, "Missing the required parameter 'inheritAcl' when calling setAclInheritance");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/inheritacl/{inheritAcl}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
      .replaceAll("\\{" + "inheritAcl" + "\\}", apiClient.escapeString(inheritAcl.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Update the formula and formula parameters of an item
    * 
      * @param id ID of the item that is being updated (required)
      * @param body The formula information (required)
      * @return CalculatedItemOutputV1
    * @throws ApiException if fails to make API call
    */
    public CalculatedItemOutputV1 setFormula(String id, FormulaUpdateInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setFormulaWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Update the formula and formula parameters of an item
    * 
      * @param id ID of the item that is being updated (required)
      * @param body The formula information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setFormulaWithHttpInfo(String id, FormulaUpdateInputV1 body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setFormula");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling setFormula");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/formula"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Set user-specific attributes of an item for the authenticated user.
    * 
      * @param id ID of the item to change owner for (required)
      * @param body Attributes to set (required)
      * @return ItemUserAttributesOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemUserAttributesOutputV1 setItemUserAttributes(String id, ItemUserAttributesInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setItemUserAttributesWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Set user-specific attributes of an item for the authenticated user.
    * 
      * @param id ID of the item to change owner for (required)
      * @param body Attributes to set (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setItemUserAttributesWithHttpInfo(String id, ItemUserAttributesInputV1 body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setItemUserAttributes");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling setItemUserAttributes");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/userAttributes"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Set properties on the item identified by the supplied ID
    * 
      * @param id ID of the item to set properties on (required)
      * @param body Property information (required)
      * @return ItemOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemOutputV1 setProperties(String id, List body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setPropertiesWithHttpInfo(id, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Set properties on the item identified by the supplied ID
    * 
      * @param id ID of the item to set properties on (required)
      * @param body Property information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setPropertiesWithHttpInfo(String id, List body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setProperties");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling setProperties");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/properties"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Set a property
    * 
      * @param id ID of the item to set the property on (required)
      * @param propertyName Name of the property to set (required)
      * @param body Property information (required)
      * @return PropertyHrefOutputV1
    * @throws ApiException if fails to make API call
    */
    public PropertyHrefOutputV1 setProperty(String id, String propertyName, PropertyInputV1 body) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setPropertyWithHttpInfo(id, propertyName, body);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Set a property
    * 
      * @param id ID of the item to set the property on (required)
      * @param propertyName Name of the property to set (required)
      * @param body Property information (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setPropertyWithHttpInfo(String id, String propertyName, PropertyInputV1 body) throws ApiException {
    Object localVarPostBody = body;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setProperty");
      }
      // verify the required parameter 'propertyName' is set
      if (propertyName == null) {
      throw new ApiException(400, "Missing the required parameter 'propertyName' when calling setProperty");
      }
      // verify the required parameter 'body' is set
      if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling setProperty");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/properties/{propertyName}"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
      .replaceAll("\\{" + "propertyName" + "\\}", apiClient.escapeString(propertyName.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Update the scope of an item
    * 
      * @param id ID of the item that is having its scope updated (required)
      * @param workbookId ID of the Workbook to which the item is being scoped. If not provided the item will be moved to the global scope (optional)
      * @return ItemOutputV1
    * @throws ApiException if fails to make API call
    */
    public ItemOutputV1 setScope(String id, String workbookId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = setScopeWithHttpInfo(id, workbookId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Update the scope of an item
    * 
      * @param id ID of the item that is having its scope updated (required)
      * @param workbookId ID of the Workbook to which the item is being scoped. If not provided the item will be moved to the global scope (optional)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse setScopeWithHttpInfo(String id, String workbookId) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'id' is set
      if (id == null) {
      throw new ApiException(400, "Missing the required parameter 'id' when calling setScope");
      }
    // create path and map variables
    String localVarPath = "/items/{id}/scope"
      .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "workbookId", workbookId));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    /**
    * Unpin an item
    * 
      * @param sourceId Id of the source item. If not specified, the current user will be used. (optional)
      * @param itemId Id of the item to unpin/unmark as a favorite (required)
      * @return ItemSearchPreviewListV1
    * @throws ApiException if fails to make API call
    */
    public ItemSearchPreviewListV1 unpinItem(String sourceId, String itemId) throws ApiException {
        ApiClient.ApiResponse localVarResponse = unpinItemWithHttpInfo(sourceId, itemId);
        return localVarResponse != null ? localVarResponse.getData() : null;
    }
    
    /**
    * Unpin an item
    * 
      * @param sourceId Id of the source item. If not specified, the current user will be used. (optional)
      * @param itemId Id of the item to unpin/unmark as a favorite (required)
    * @throws ApiException if fails to make API call
    */
    public ApiClient.ApiResponse unpinItemWithHttpInfo(String sourceId, String itemId) throws ApiException {
    Object localVarPostBody = null;
      // verify the required parameter 'itemId' is set
      if (itemId == null) {
      throw new ApiException(400, "Missing the required parameter 'itemId' when calling unpinItem");
      }
    // create path and map variables
    String localVarPath = "/items/pinned/{itemId}"
      .replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

      localVarQueryParams.addAll(apiClient.parameterToPairs("", "sourceId", sourceId));

    
    
      final String[] localVarAccepts = {
    "application/vnd.seeq.v1+json"
      };
      final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

      final String[] localVarContentTypes = {
    
      };
      final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

      String[] localVarAuthNames = new String[] { "api_key" };

      long apiClientInvocationTime = System.currentTimeMillis();
      while(true) {
        try {
        GenericType localVarReturnType = new GenericType() {};
        return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
          // Possible exceptions:
          // ===================
          // * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
          //    during conversion of the response entity data to an instance of a particular Java type).
          // * ProcessingException - in case the request processing or subsequent I/O operation fails.
          // * WebApplicationException - in case the response status code of the response returned by the server is not
          //    successful and the specified response type is not Response.
          // * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
          //    in ApiException(s)
        } catch (ApiException | ProcessingException e) {
          if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
            long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
            if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
              continue;
            }
          }
          throw e;
        }
      } // while
      }
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy