com.aliyun.sdk.service.ens20171110.models.ImportKeyPairRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alibabacloud-ens20171110 Show documentation
Show all versions of alibabacloud-ens20171110 Show documentation
Alibaba Cloud Ens (20171110) Async SDK for Java
The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ens20171110.models;
import com.aliyun.sdk.gateway.pop.*;
import darabonba.core.*;
import darabonba.core.async.*;
import darabonba.core.sync.*;
import darabonba.core.client.*;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
*
* {@link ImportKeyPairRequest} extends {@link RequestModel}
*
* ImportKeyPairRequest
*/
public class ImportKeyPairRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("KeyPairName")
@com.aliyun.core.annotation.Validation(required = true)
private String keyPairName;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("PublicKeyBody")
@com.aliyun.core.annotation.Validation(required = true)
private String publicKeyBody;
private ImportKeyPairRequest(Builder builder) {
super(builder);
this.keyPairName = builder.keyPairName;
this.publicKeyBody = builder.publicKeyBody;
}
public static Builder builder() {
return new Builder();
}
public static ImportKeyPairRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return keyPairName
*/
public String getKeyPairName() {
return this.keyPairName;
}
/**
* @return publicKeyBody
*/
public String getPublicKeyBody() {
return this.publicKeyBody;
}
public static final class Builder extends Request.Builder {
private String keyPairName;
private String publicKeyBody;
private Builder() {
super();
}
private Builder(ImportKeyPairRequest request) {
super(request);
this.keyPairName = request.keyPairName;
this.publicKeyBody = request.publicKeyBody;
}
/**
* The name of the key pair. The name must conform to the following naming conventions:
*
* - The name must be 2 to 128 characters in length.
* - The name must start with a letter but cannot start with
http://
or https://
.
* - The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
*
* You can specify the name of only one key pair.
* This parameter is required.
*
* example:
* TestKeyPairName
*/
public Builder keyPairName(String keyPairName) {
this.putQueryParameter("KeyPairName", keyPairName);
this.keyPairName = keyPairName;
return this;
}
/**
* The public key of the key pair. You can specify only one public key.
* This parameter is required.
*
* example:
* ssh-rsa AAAAB****
*/
public Builder publicKeyBody(String publicKeyBody) {
this.putQueryParameter("PublicKeyBody", publicKeyBody);
this.publicKeyBody = publicKeyBody;
return this;
}
@Override
public ImportKeyPairRequest build() {
return new ImportKeyPairRequest(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy