com.aliyun.sdk.service.ecs20140526.models.SendFileRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ecs20140526 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
*
* {@link SendFileRequest} extends {@link RequestModel}
*
* SendFileRequest
*/
public class SendFileRequest extends Request {
@com.aliyun.core.annotation.Host
@com.aliyun.core.annotation.NameInMap("SourceRegionId")
private String sourceRegionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Content")
@com.aliyun.core.annotation.Validation(required = true)
private String content;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ContentType")
private String contentType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Description")
private String description;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("FileGroup")
private String fileGroup;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("FileMode")
private String fileMode;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("FileOwner")
private String fileOwner;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceId")
@com.aliyun.core.annotation.Validation(required = true)
private java.util.List < String > instanceId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Name")
@com.aliyun.core.annotation.Validation(required = true)
private String name;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Overwrite")
private Boolean overwrite;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerAccount")
private String ownerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerId")
private Long ownerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("RegionId")
@com.aliyun.core.annotation.Validation(required = true)
private String regionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceGroupId")
private String resourceGroupId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount")
private String resourceOwnerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerId")
private Long resourceOwnerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Tag")
private java.util.List < Tag> tag;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("TargetDir")
@com.aliyun.core.annotation.Validation(required = true)
private String targetDir;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Timeout")
private Long timeout;
private SendFileRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.content = builder.content;
this.contentType = builder.contentType;
this.description = builder.description;
this.fileGroup = builder.fileGroup;
this.fileMode = builder.fileMode;
this.fileOwner = builder.fileOwner;
this.instanceId = builder.instanceId;
this.name = builder.name;
this.overwrite = builder.overwrite;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceGroupId = builder.resourceGroupId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.tag = builder.tag;
this.targetDir = builder.targetDir;
this.timeout = builder.timeout;
}
public static Builder builder() {
return new Builder();
}
public static SendFileRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return content
*/
public String getContent() {
return this.content;
}
/**
* @return contentType
*/
public String getContentType() {
return this.contentType;
}
/**
* @return description
*/
public String getDescription() {
return this.description;
}
/**
* @return fileGroup
*/
public String getFileGroup() {
return this.fileGroup;
}
/**
* @return fileMode
*/
public String getFileMode() {
return this.fileMode;
}
/**
* @return fileOwner
*/
public String getFileOwner() {
return this.fileOwner;
}
/**
* @return instanceId
*/
public java.util.List < String > getInstanceId() {
return this.instanceId;
}
/**
* @return name
*/
public String getName() {
return this.name;
}
/**
* @return overwrite
*/
public Boolean getOverwrite() {
return this.overwrite;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return resourceGroupId
*/
public String getResourceGroupId() {
return this.resourceGroupId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
/**
* @return tag
*/
public java.util.List < Tag> getTag() {
return this.tag;
}
/**
* @return targetDir
*/
public String getTargetDir() {
return this.targetDir;
}
/**
* @return timeout
*/
public Long getTimeout() {
return this.timeout;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private String content;
private String contentType;
private String description;
private String fileGroup;
private String fileMode;
private String fileOwner;
private java.util.List < String > instanceId;
private String name;
private Boolean overwrite;
private String ownerAccount;
private Long ownerId;
private String regionId;
private String resourceGroupId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private java.util.List < Tag> tag;
private String targetDir;
private Long timeout;
private Builder() {
super();
}
private Builder(SendFileRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.content = request.content;
this.contentType = request.contentType;
this.description = request.description;
this.fileGroup = request.fileGroup;
this.fileMode = request.fileMode;
this.fileOwner = request.fileOwner;
this.instanceId = request.instanceId;
this.name = request.name;
this.overwrite = request.overwrite;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceGroupId = request.resourceGroupId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.tag = request.tag;
this.targetDir = request.targetDir;
this.timeout = request.timeout;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The content of the file. The file must not exceed 32 KB in size after it is encoded in Base64.
*
* - If
ContentType
is set to PlainText
, the value of Content is in plaintext.
* - If
ContentType
is set to Base64
, the value of Content is Base64-encoded.
*
* This parameter is required.
*
* example:
* #!/bin/bash echo "Current User is :" echo $(ps | grep "$$" | awk "{print $2}") -------- oss://bucketName/objectName
*/
public Builder content(String content) {
this.putQueryParameter("Content", content);
this.content = content;
return this;
}
/**
* The content type of the file. Valid values:
*
* - PlainText: The file content is not encoded.
* - Base64: The file content is encoded in Base64.
*
* Default value: PlainText.
*
* example:
* PlainText
*/
public Builder contentType(String contentType) {
this.putQueryParameter("ContentType", contentType);
this.contentType = contentType;
return this;
}
/**
* The description of the file. The description can be up to 512 characters in length and can contain any characters.
*
* example:
* This is a test file.
*/
public Builder description(String description) {
this.putQueryParameter("Description", description);
this.description = description;
return this;
}
/**
* The group of the file. This parameter takes effect only on Linux instances. Default value: root. The value can be up to 64 characters in length.
*
* If you want to use a non-root user group, make sure that the user group exists in the instances.
*
*
* example:
* test
*/
public Builder fileGroup(String fileGroup) {
this.putQueryParameter("FileGroup", fileGroup);
this.fileGroup = fileGroup;
return this;
}
/**
* The permissions on the file. This parameter takes effect only on Linux instances. You can configure this parameter in the same way as you configure the chmod command.
* Default value: 0644, which indicates that the owner of the file has the read and write permissions on the file and that the user group of the file and other users have the read-only permissions on the file.
*
* example:
* 0644
*/
public Builder fileMode(String fileMode) {
this.putQueryParameter("FileMode", fileMode);
this.fileMode = fileMode;
return this;
}
/**
* The owner of the file. This parameter takes effect only on Linux instances. Default value: root. The value can be up to 64 characters in length.
*
* If you want to use a non-root user, make sure that the user exists in the instances.
*
*
* example:
* test
*/
public Builder fileOwner(String fileOwner) {
this.putQueryParameter("FileOwner", fileOwner);
this.fileOwner = fileOwner;
return this;
}
/**
* The IDs of instances to which to send the file. You can specify up to 50 instance IDs in each request. Valid values of N: 1 to 50.
* This parameter is required.
*
* example:
* i-bp185dy2o3o6n****
*/
public Builder instanceId(java.util.List < String > instanceId) {
this.putQueryParameter("InstanceId", instanceId);
this.instanceId = instanceId;
return this;
}
/**
* The name of the file. The name can be up to 255 characters in length and can contain any characters.
* This parameter is required.
*
* example:
* file.txt
*/
public Builder name(String name) {
this.putQueryParameter("Name", name);
this.name = name;
return this;
}
/**
* Specifies whether to overwrite a file in the destination directory if the file has the same name as the sent file.
*
* - true
* - false
*
* Default value: false.
*
* example:
* true
*/
public Builder overwrite(Boolean overwrite) {
this.putQueryParameter("Overwrite", overwrite);
this.overwrite = overwrite;
return this;
}
/**
* OwnerAccount.
*/
public Builder ownerAccount(String ownerAccount) {
this.putQueryParameter("OwnerAccount", ownerAccount);
this.ownerAccount = ownerAccount;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The region ID of the instance to which to send the file. You can call the DescribeRegions operation to query the most recent region list.
* This parameter is required.
*
* example:
* cn-hangzhou
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* The ID of the resource group. When you specify this parameter, take note of the following items:
*
* - The instance specified by the InstanceId parameter must belong to the specified resource group.
* - If you specify this parameter, you can call the DescribeSendFileResults operation to query file sending results in the specified resource group.
*
*
* example:
* rg-bp67acfmxazb4p****
*/
public Builder resourceGroupId(String resourceGroupId) {
this.putQueryParameter("ResourceGroupId", resourceGroupId);
this.resourceGroupId = resourceGroupId;
return this;
}
/**
* ResourceOwnerAccount.
*/
public Builder resourceOwnerAccount(String resourceOwnerAccount) {
this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
/**
* ResourceOwnerId.
*/
public Builder resourceOwnerId(Long resourceOwnerId) {
this.putQueryParameter("ResourceOwnerId", resourceOwnerId);
this.resourceOwnerId = resourceOwnerId;
return this;
}
/**
* The tags to add to the file sending task.
*/
public Builder tag(java.util.List < Tag> tag) {
this.putQueryParameter("Tag", tag);
this.tag = tag;
return this;
}
/**
* The destination directory on the instance to which to send the file. If the specified directory does not exist, the system creates the directory on the instance. The value cannot exceed 255 characters in length.
* This parameter is required.
*
* example:
* /home
*/
public Builder targetDir(String targetDir) {
this.putQueryParameter("TargetDir", targetDir);
this.targetDir = targetDir;
return this;
}
/**
* The timeout period for the file sending task. Unit: seconds.
*
* - A timeout error occurs when a file cannot be sent because the process slows down or because a specific module or Cloud Assistant Agent does not exist.
* - If the specified timeout period is less than 10 seconds, the system sets the timeout period to 10 seconds to ensure that the file can be sent to the instances.
*
* Default value: 60.
*
* example:
* 60
*/
public Builder timeout(Long timeout) {
this.putQueryParameter("Timeout", timeout);
this.timeout = timeout;
return this;
}
@Override
public SendFileRequest build() {
return new SendFileRequest(this);
}
}
/**
*
* {@link SendFileRequest} extends {@link TeaModel}
*
* SendFileRequest
*/
public static class Tag extends TeaModel {
@com.aliyun.core.annotation.NameInMap("Key")
private String key;
@com.aliyun.core.annotation.NameInMap("Value")
private String value;
private Tag(Builder builder) {
this.key = builder.key;
this.value = builder.value;
}
public static Builder builder() {
return new Builder();
}
public static Tag create() {
return builder().build();
}
/**
* @return key
*/
public String getKey() {
return this.key;
}
/**
* @return value
*/
public String getValue() {
return this.value;
}
public static final class Builder {
private String key;
private String value;
/**
* The key of tag N of the file sending task. Valid values of N: 1 to 20. The tag key cannot be an empty string.
* If a single tag is specified to query resources, up to 1,000 resources that have this tag added can be displayed in the response. If multiple tags are specified to query resources, up to 1,000 resources that have all the tags added can be displayed in the response. To query more than 1,000 resources that have specified tags, call the ListTagResources operation.
* The tag key can be up to 64 characters in length and cannot contain http://
or https://
. The tag key cannot start with acs:
or aliyun
.
*
* example:
* TestKey
*/
public Builder key(String key) {
this.key = key;
return this;
}
/**
* The value of tag N to add to the file sending task. Valid values of N: 1 to 20. The tag value can be an empty string.
* The tag value can be up to 128 characters in length and cannot contain http://
or https://
.
*
* example:
* TestValue
*/
public Builder value(String value) {
this.value = value;
return this;
}
public Tag build() {
return new Tag(this);
}
}
}
}