com.amazonaws.services.servermigration.model.UpdateReplicationJobRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-servermigration Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.servermigration.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateReplicationJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the replication job.
*
*/
private String replicationJobId;
/**
*
* The time between consecutive replication runs, in hours.
*
*/
private Integer frequency;
/**
*
* The start time of the next replication run.
*
*/
private java.util.Date nextReplicationRunStartTime;
/**
*
* The license type to be used for the AMI created by a successful replication run.
*
*/
private String licenseType;
/**
*
* The name of the IAM role to be used by Server Migration Service.
*
*/
private String roleName;
/**
*
* The description of the replication job.
*
*/
private String description;
/**
*
* The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a
* new AMI is created.
*
*/
private Integer numberOfRecentAmisToKeep;
/**
*
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*
*/
private Boolean encrypted;
/**
*
* The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:
*
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.
*
*/
private String kmsKeyId;
/**
*
* The ID of the replication job.
*
*
* @param replicationJobId
* The ID of the replication job.
*/
public void setReplicationJobId(String replicationJobId) {
this.replicationJobId = replicationJobId;
}
/**
*
* The ID of the replication job.
*
*
* @return The ID of the replication job.
*/
public String getReplicationJobId() {
return this.replicationJobId;
}
/**
*
* The ID of the replication job.
*
*
* @param replicationJobId
* The ID of the replication job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withReplicationJobId(String replicationJobId) {
setReplicationJobId(replicationJobId);
return this;
}
/**
*
* The time between consecutive replication runs, in hours.
*
*
* @param frequency
* The time between consecutive replication runs, in hours.
*/
public void setFrequency(Integer frequency) {
this.frequency = frequency;
}
/**
*
* The time between consecutive replication runs, in hours.
*
*
* @return The time between consecutive replication runs, in hours.
*/
public Integer getFrequency() {
return this.frequency;
}
/**
*
* The time between consecutive replication runs, in hours.
*
*
* @param frequency
* The time between consecutive replication runs, in hours.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withFrequency(Integer frequency) {
setFrequency(frequency);
return this;
}
/**
*
* The start time of the next replication run.
*
*
* @param nextReplicationRunStartTime
* The start time of the next replication run.
*/
public void setNextReplicationRunStartTime(java.util.Date nextReplicationRunStartTime) {
this.nextReplicationRunStartTime = nextReplicationRunStartTime;
}
/**
*
* The start time of the next replication run.
*
*
* @return The start time of the next replication run.
*/
public java.util.Date getNextReplicationRunStartTime() {
return this.nextReplicationRunStartTime;
}
/**
*
* The start time of the next replication run.
*
*
* @param nextReplicationRunStartTime
* The start time of the next replication run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withNextReplicationRunStartTime(java.util.Date nextReplicationRunStartTime) {
setNextReplicationRunStartTime(nextReplicationRunStartTime);
return this;
}
/**
*
* The license type to be used for the AMI created by a successful replication run.
*
*
* @param licenseType
* The license type to be used for the AMI created by a successful replication run.
* @see LicenseType
*/
public void setLicenseType(String licenseType) {
this.licenseType = licenseType;
}
/**
*
* The license type to be used for the AMI created by a successful replication run.
*
*
* @return The license type to be used for the AMI created by a successful replication run.
* @see LicenseType
*/
public String getLicenseType() {
return this.licenseType;
}
/**
*
* The license type to be used for the AMI created by a successful replication run.
*
*
* @param licenseType
* The license type to be used for the AMI created by a successful replication run.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LicenseType
*/
public UpdateReplicationJobRequest withLicenseType(String licenseType) {
setLicenseType(licenseType);
return this;
}
/**
*
* The license type to be used for the AMI created by a successful replication run.
*
*
* @param licenseType
* The license type to be used for the AMI created by a successful replication run.
* @see LicenseType
*/
public void setLicenseType(LicenseType licenseType) {
withLicenseType(licenseType);
}
/**
*
* The license type to be used for the AMI created by a successful replication run.
*
*
* @param licenseType
* The license type to be used for the AMI created by a successful replication run.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LicenseType
*/
public UpdateReplicationJobRequest withLicenseType(LicenseType licenseType) {
this.licenseType = licenseType.toString();
return this;
}
/**
*
* The name of the IAM role to be used by Server Migration Service.
*
*
* @param roleName
* The name of the IAM role to be used by Server Migration Service.
*/
public void setRoleName(String roleName) {
this.roleName = roleName;
}
/**
*
* The name of the IAM role to be used by Server Migration Service.
*
*
* @return The name of the IAM role to be used by Server Migration Service.
*/
public String getRoleName() {
return this.roleName;
}
/**
*
* The name of the IAM role to be used by Server Migration Service.
*
*
* @param roleName
* The name of the IAM role to be used by Server Migration Service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withRoleName(String roleName) {
setRoleName(roleName);
return this;
}
/**
*
* The description of the replication job.
*
*
* @param description
* The description of the replication job.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the replication job.
*
*
* @return The description of the replication job.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the replication job.
*
*
* @param description
* The description of the replication job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a
* new AMI is created.
*
*
* @param numberOfRecentAmisToKeep
* The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is
* reached and a new AMI is created.
*/
public void setNumberOfRecentAmisToKeep(Integer numberOfRecentAmisToKeep) {
this.numberOfRecentAmisToKeep = numberOfRecentAmisToKeep;
}
/**
*
* The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a
* new AMI is created.
*
*
* @return The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is
* reached and a new AMI is created.
*/
public Integer getNumberOfRecentAmisToKeep() {
return this.numberOfRecentAmisToKeep;
}
/**
*
* The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is reached and a
* new AMI is created.
*
*
* @param numberOfRecentAmisToKeep
* The maximum number of SMS-created AMIs to retain. The oldest is deleted after the maximum number is
* reached and a new AMI is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withNumberOfRecentAmisToKeep(Integer numberOfRecentAmisToKeep) {
setNumberOfRecentAmisToKeep(numberOfRecentAmisToKeep);
return this;
}
/**
*
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*
*
* @param encrypted
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*/
public void setEncrypted(Boolean encrypted) {
this.encrypted = encrypted;
}
/**
*
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*
*
* @return When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*/
public Boolean getEncrypted() {
return this.encrypted;
}
/**
*
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*
*
* @param encrypted
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withEncrypted(Boolean encrypted) {
setEncrypted(encrypted);
return this;
}
/**
*
* When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*
*
* @return When true, the replication job produces encrypted AMIs. For more information, KmsKeyId
.
*/
public Boolean isEncrypted() {
return this.encrypted;
}
/**
*
* The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:
*
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.
*
*
* @param kmsKeyId
* The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the
* following:
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS
* is used.
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:
*
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.
*
*
* @return The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the
* following:
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS
* is used.
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:
*
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.
*
*
* @param kmsKeyId
* The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the
* following:
*
* -
*
* KMS key ID
*
*
* -
*
* KMS key alias
*
*
* -
*
* ARN referring to the KMS key ID
*
*
* -
*
* ARN referring to the KMS key alias
*
*
*
*
* If encrypted is enabled but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS
* is used.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateReplicationJobRequest withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getReplicationJobId() != null)
sb.append("ReplicationJobId: ").append(getReplicationJobId()).append(",");
if (getFrequency() != null)
sb.append("Frequency: ").append(getFrequency()).append(",");
if (getNextReplicationRunStartTime() != null)
sb.append("NextReplicationRunStartTime: ").append(getNextReplicationRunStartTime()).append(",");
if (getLicenseType() != null)
sb.append("LicenseType: ").append(getLicenseType()).append(",");
if (getRoleName() != null)
sb.append("RoleName: ").append(getRoleName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getNumberOfRecentAmisToKeep() != null)
sb.append("NumberOfRecentAmisToKeep: ").append(getNumberOfRecentAmisToKeep()).append(",");
if (getEncrypted() != null)
sb.append("Encrypted: ").append(getEncrypted()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateReplicationJobRequest == false)
return false;
UpdateReplicationJobRequest other = (UpdateReplicationJobRequest) obj;
if (other.getReplicationJobId() == null ^ this.getReplicationJobId() == null)
return false;
if (other.getReplicationJobId() != null && other.getReplicationJobId().equals(this.getReplicationJobId()) == false)
return false;
if (other.getFrequency() == null ^ this.getFrequency() == null)
return false;
if (other.getFrequency() != null && other.getFrequency().equals(this.getFrequency()) == false)
return false;
if (other.getNextReplicationRunStartTime() == null ^ this.getNextReplicationRunStartTime() == null)
return false;
if (other.getNextReplicationRunStartTime() != null && other.getNextReplicationRunStartTime().equals(this.getNextReplicationRunStartTime()) == false)
return false;
if (other.getLicenseType() == null ^ this.getLicenseType() == null)
return false;
if (other.getLicenseType() != null && other.getLicenseType().equals(this.getLicenseType()) == false)
return false;
if (other.getRoleName() == null ^ this.getRoleName() == null)
return false;
if (other.getRoleName() != null && other.getRoleName().equals(this.getRoleName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getNumberOfRecentAmisToKeep() == null ^ this.getNumberOfRecentAmisToKeep() == null)
return false;
if (other.getNumberOfRecentAmisToKeep() != null && other.getNumberOfRecentAmisToKeep().equals(this.getNumberOfRecentAmisToKeep()) == false)
return false;
if (other.getEncrypted() == null ^ this.getEncrypted() == null)
return false;
if (other.getEncrypted() != null && other.getEncrypted().equals(this.getEncrypted()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReplicationJobId() == null) ? 0 : getReplicationJobId().hashCode());
hashCode = prime * hashCode + ((getFrequency() == null) ? 0 : getFrequency().hashCode());
hashCode = prime * hashCode + ((getNextReplicationRunStartTime() == null) ? 0 : getNextReplicationRunStartTime().hashCode());
hashCode = prime * hashCode + ((getLicenseType() == null) ? 0 : getLicenseType().hashCode());
hashCode = prime * hashCode + ((getRoleName() == null) ? 0 : getRoleName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getNumberOfRecentAmisToKeep() == null) ? 0 : getNumberOfRecentAmisToKeep().hashCode());
hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
return hashCode;
}
@Override
public UpdateReplicationJobRequest clone() {
return (UpdateReplicationJobRequest) super.clone();
}
}