
com.autodesk.client.api.ProjectsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com-autodesk-client Show documentation
Show all versions of com-autodesk-client Show documentation
Provides Java SDK to help you easily integrate Forge REST APIs into the application
The newest version!
/*
* Forge SDK
* The Forge Platform contains an expanding collection of web service components that can be used with Autodesk cloud-based products or your own technologies. Take advantage of Autodesk’s expertise in design and engineering.
*
* OpenAPI spec version: 0.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.autodesk.client.api;
import com.sun.jersey.api.client.GenericType;
import com.autodesk.client.ApiException;
import com.autodesk.client.ApiClient;
import com.autodesk.client.Configuration;
import com.autodesk.client.model.*;
import com.autodesk.client.Pair;
import com.autodesk.client.auth.Credentials;
import com.autodesk.client.auth.Authentication;
import com.autodesk.client.ApiResponse;
import java.io.File;
import com.autodesk.client.model.Projects;
import com.autodesk.client.model.Forbidden;
import com.autodesk.client.model.NotFound;
import com.autodesk.client.model.Project;
import com.autodesk.client.model.Hub;
import com.autodesk.client.model.StorageCreated;
import com.autodesk.client.model.BadInput;
import com.autodesk.client.model.CreateStorage;
import com.autodesk.client.model.Conflict;
import com.autodesk.client.model.CreateVersion;
import com.autodesk.client.model.VersionCreated;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ProjectsApi {
private ApiClient apiClient;
public ProjectsApi() {
this(Configuration.getDefaultApiClient());
}
public ProjectsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
*
* Returns a collection of projects for a given `hub_id`. A project represents an A360 project or a BIM 360 project which is set up under an A360 hub or BIM 360 account, respectively. Within a hub or an account, multiple projects can be created to be used.
* @param hubId the `hub id` for the current operation (required)
* @param filterId filter by the `id` of the `ref` target (optional)
* @param filterExtensionType filter by the extension type (optional)
* @return Projects
* @throws ApiException if fails to make API call
*/
public ApiResponse getHubProjects(String hubId, List filterId, List filterExtensionType, Authentication oauth2, Credentials credentials) throws ApiException, Exception {
Object localVarPostBody = null;
// verify the required parameter 'hubId' is set
if (hubId == null) {
throw new ApiException(400, "Missing the required parameter 'hubId' when calling getHubProjects");
}
// create path and map variables
String localVarPath = "/project/v1/hubs/{hub_id}/projects".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "hub_id" + "\\}", apiClient.escapeString(hubId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "filter[id]", filterId));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "filter[extension.type]", filterExtensionType));
final String[] localVarAccepts = {
"application/vnd.api+json", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.api+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(oauth2, credentials, localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarReturnType);
}
/**
*
* Returns a project for a given `project_id`.
* @param hubId the `hub id` for the current operation (required)
* @param projectId the `project id` (required)
* @return Project
* @throws ApiException if fails to make API call
*/
public ApiResponse getProject(String hubId, String projectId, Authentication oauth2, Credentials credentials) throws ApiException, Exception {
Object localVarPostBody = null;
// verify the required parameter 'hubId' is set
if (hubId == null) {
throw new ApiException(400, "Missing the required parameter 'hubId' when calling getProject");
}
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new ApiException(400, "Missing the required parameter 'projectId' when calling getProject");
}
// create path and map variables
String localVarPath = "/project/v1/hubs/{hub_id}/projects/{project_id}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "hub_id" + "\\}", apiClient.escapeString(hubId.toString()))
.replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.api+json", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.api+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(oauth2, credentials, localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarReturnType);
}
/**
*
* Returns the hub for a given `project_id`.
* @param hubId the `hub id` for the current operation (required)
* @param projectId the `project id` (required)
* @return Hub
* @throws ApiException if fails to make API call
*/
public ApiResponse getProjectHub(String hubId, String projectId, Authentication oauth2, Credentials credentials) throws ApiException, Exception {
Object localVarPostBody = null;
// verify the required parameter 'hubId' is set
if (hubId == null) {
throw new ApiException(400, "Missing the required parameter 'hubId' when calling getProjectHub");
}
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new ApiException(400, "Missing the required parameter 'projectId' when calling getProjectHub");
}
// create path and map variables
String localVarPath = "/project/v1/hubs/{hub_id}/projects/{project_id}/hub".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "hub_id" + "\\}", apiClient.escapeString(hubId.toString()))
.replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.api+json", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.api+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(oauth2, credentials, localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarReturnType);
}
/**
*
* Creates a storage location in the OSS where data can be uploaded to.
* @param projectId the `project id` (required)
* @param body describe the file the storage is created for (required)
* @return StorageCreated
* @throws ApiException if fails to make API call
*/
public ApiResponse postStorage(String projectId, CreateStorage body, Authentication oauth2, Credentials credentials) throws ApiException, Exception {
Object localVarPostBody = body;
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new ApiException(400, "Missing the required parameter 'projectId' when calling postStorage");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling postStorage");
}
// create path and map variables
String localVarPath = "/data/v1/projects/{project_id}/storage".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.api+json", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.api+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(oauth2, credentials, localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarReturnType);
}
/**
*
* Creates a new version of an item in the 'data' domain service.
* @param projectId the `project id` (required)
* @param body describe the version to be created (required)
* @return VersionCreated
* @throws ApiException if fails to make API call
*/
public ApiResponse postVersion(String projectId, CreateVersion body, Authentication oauth2, Credentials credentials) throws ApiException, Exception {
Object localVarPostBody = body;
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new ApiException(400, "Missing the required parameter 'projectId' when calling postVersion");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling postVersion");
}
// create path and map variables
String localVarPath = "/data/v1/projects/{project_id}/versions".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.api+json", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.api+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(oauth2, credentials, localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarReturnType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy