com.aliyun.pds20220301.models.BatchRequest Maven / Gradle / Ivy
Show all versions of pds20220301 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.pds20220301.models;
import com.aliyun.tea.*;
public class BatchRequest extends TeaModel {
/**
* The child requests.
* The number of child requests. Valid value: 1 to 100.
* This parameter is required.
*/
@NameInMap("requests")
public java.util.List requests;
/**
* The type of the resource that you want to manage. Valid values:
*
* - file: a file.
* - drive: an individual drive or a team drive.
* - user: a user.
* - group: a group.
* - membership: a group member.
* - share_link: a share.
* - async_task: an asynchronous task.
*
* This parameter is required.
*
* example:
* file
*/
@NameInMap("resource")
public String resource;
public static BatchRequest build(java.util.Map map) throws Exception {
BatchRequest self = new BatchRequest();
return TeaModel.build(map, self);
}
public BatchRequest setRequests(java.util.List requests) {
this.requests = requests;
return this;
}
public java.util.List getRequests() {
return this.requests;
}
public BatchRequest setResource(String resource) {
this.resource = resource;
return this;
}
public String getResource() {
return this.resource;
}
public static class BatchRequestRequests extends TeaModel {
/**
* The request parameters of a child request. The parameter value must be a JSON string. For more information, see the topic of the corresponding child request.
* Before you specify the request body, you must specify a header by using Content-Type. Content-Type can only be set to application/json.
*/
@NameInMap("body")
public java.util.Map body;
/**
* The header of a child request, which indicates the type of the data specified in the request body.
*/
@NameInMap("headers")
public java.util.Map headers;
/**
* The ID of the child request. The ID is used to associate a child request with a response. The ID of a child request must be unique.
* This parameter is required.
*
* example:
* 93433894994ad2e1
*/
@NameInMap("id")
public String id;
/**
* The method of a child request. Valid values:
*
* - POST
* - GET
* - PUT
* - DELETE
* - HEAD
*
* This parameter is required.
*
* example:
* POST
*/
@NameInMap("method")
public String method;
/**
* The API path of a child request. Valid values:
*
* - /file/get: queries the information about a file.
* - /file/update: modifies the information about a file.
* - /file/search: searches for a file.
* - /file/copy: copies a file or folder.
* - /file/move: moves a file or folder.
* - /file/delete: deletes a file or folder.
* - /file/get_download_url: queries the download URL of a file.
* - /file/get_share_link_download_url: queries the download URL of a file in a share.
* - /recyclebin/trash: moves a file or folder to the recycle bin.
* - /recyclebin/restore: restores a file or folder.
* - /file/put_usertags: adds tags to a user.
* - /file/delete_usertags: removes tags from a user.
* - /drive/get: queries the information about a drive.
* - /user/get: queries the information about a user.
* - /group/get: queries the information about a group.
* - /share_link/create: creates a share.
* - /share_link/update: modifies a share.
* - /share_link/cancel: cancels a share.
* - /share_link/list: queries shares.
* - /share_link/get: queries the information about a share.
* - /share_link/get_share_token: queries an access token of a share.
* - /async_task/get: queries the information about an asynchronous task.
*
* This parameter is required.
*
* example:
* /file/get
*/
@NameInMap("url")
public String url;
public static BatchRequestRequests build(java.util.Map map) throws Exception {
BatchRequestRequests self = new BatchRequestRequests();
return TeaModel.build(map, self);
}
public BatchRequestRequests setBody(java.util.Map body) {
this.body = body;
return this;
}
public java.util.Map getBody() {
return this.body;
}
public BatchRequestRequests setHeaders(java.util.Map headers) {
this.headers = headers;
return this;
}
public java.util.Map getHeaders() {
return this.headers;
}
public BatchRequestRequests setId(String id) {
this.id = id;
return this;
}
public String getId() {
return this.id;
}
public BatchRequestRequests setMethod(String method) {
this.method = method;
return this;
}
public String getMethod() {
return this.method;
}
public BatchRequestRequests setUrl(String url) {
this.url = url;
return this;
}
public String getUrl() {
return this.url;
}
}
}