/* * Copyright 2018-2023 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents a replication job. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReplicationJob implements Serializable, Cloneable, StructuredPojo { /** ** The ID of the replication job. *
*/ private String replicationJobId; /** ** The ID of the server. *
*/ private String serverId; /** ** The type of server. *
*/ private String serverType; /** ** Information about the VM server. *
*/ private VmServer vmServer; /** ** The seed replication time. *
*/ private java.util.Date seedReplicationTime; /** ** The time between consecutive replication runs, in hours. *
*/ private Integer frequency; /** ** Indicates whether to run the replication job one time. *
*/ private Boolean runOnce; /** ** 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 ID of the latest Amazon Machine Image (AMI). *
*/ private String latestAmiId; /** ** The state of the replication job. *
*/ private String state; /** ** The description of the current status of the replication job. *
*/ private String statusMessage; /** ** The description of the replication job. *
*/ private String description; /** ** The number of recent AMIs to keep in the customer's account for a replication job. By default, the value is set * to zero, meaning that all AMIs are kept. *
*/ private Integer numberOfRecentAmisToKeep; /** ** Indicates whether the replication job should produce encrypted AMIs. *
*/ 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; /** ** Information about the replication runs. *
*/ private java.util.List* 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 ReplicationJob withReplicationJobId(String replicationJobId) { setReplicationJobId(replicationJobId); return this; } /** ** The ID of the server. *
* * @param serverId * The ID of the server. */ public void setServerId(String serverId) { this.serverId = serverId; } /** ** The ID of the server. *
* * @return The ID of the server. */ public String getServerId() { return this.serverId; } /** ** The ID of the server. *
* * @param serverId * The ID of the server. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withServerId(String serverId) { setServerId(serverId); return this; } /** ** The type of server. *
* * @param serverType * The type of server. * @see ServerType */ public void setServerType(String serverType) { this.serverType = serverType; } /** ** The type of server. *
* * @return The type of server. * @see ServerType */ public String getServerType() { return this.serverType; } /** ** The type of server. *
* * @param serverType * The type of server. * @return Returns a reference to this object so that method calls can be chained together. * @see ServerType */ public ReplicationJob withServerType(String serverType) { setServerType(serverType); return this; } /** ** The type of server. *
* * @param serverType * The type of server. * @see ServerType */ public void setServerType(ServerType serverType) { withServerType(serverType); } /** ** The type of server. *
* * @param serverType * The type of server. * @return Returns a reference to this object so that method calls can be chained together. * @see ServerType */ public ReplicationJob withServerType(ServerType serverType) { this.serverType = serverType.toString(); return this; } /** ** Information about the VM server. *
* * @param vmServer * Information about the VM server. */ public void setVmServer(VmServer vmServer) { this.vmServer = vmServer; } /** ** Information about the VM server. *
* * @return Information about the VM server. */ public VmServer getVmServer() { return this.vmServer; } /** ** Information about the VM server. *
* * @param vmServer * Information about the VM server. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withVmServer(VmServer vmServer) { setVmServer(vmServer); return this; } /** ** The seed replication time. *
* * @param seedReplicationTime * The seed replication time. */ public void setSeedReplicationTime(java.util.Date seedReplicationTime) { this.seedReplicationTime = seedReplicationTime; } /** ** The seed replication time. *
* * @return The seed replication time. */ public java.util.Date getSeedReplicationTime() { return this.seedReplicationTime; } /** ** The seed replication time. *
* * @param seedReplicationTime * The seed replication time. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withSeedReplicationTime(java.util.Date seedReplicationTime) { setSeedReplicationTime(seedReplicationTime); 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 ReplicationJob withFrequency(Integer frequency) { setFrequency(frequency); return this; } /** ** Indicates whether to run the replication job one time. *
* * @param runOnce * Indicates whether to run the replication job one time. */ public void setRunOnce(Boolean runOnce) { this.runOnce = runOnce; } /** ** Indicates whether to run the replication job one time. *
* * @return Indicates whether to run the replication job one time. */ public Boolean getRunOnce() { return this.runOnce; } /** ** Indicates whether to run the replication job one time. *
* * @param runOnce * Indicates whether to run the replication job one time. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withRunOnce(Boolean runOnce) { setRunOnce(runOnce); return this; } /** ** Indicates whether to run the replication job one time. *
* * @return Indicates whether to run the replication job one time. */ public Boolean isRunOnce() { return this.runOnce; } /** ** 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 ReplicationJob 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 ReplicationJob 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 ReplicationJob 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 ReplicationJob withRoleName(String roleName) { setRoleName(roleName); return this; } /** ** The ID of the latest Amazon Machine Image (AMI). *
* * @param latestAmiId * The ID of the latest Amazon Machine Image (AMI). */ public void setLatestAmiId(String latestAmiId) { this.latestAmiId = latestAmiId; } /** ** The ID of the latest Amazon Machine Image (AMI). *
* * @return The ID of the latest Amazon Machine Image (AMI). */ public String getLatestAmiId() { return this.latestAmiId; } /** ** The ID of the latest Amazon Machine Image (AMI). *
* * @param latestAmiId * The ID of the latest Amazon Machine Image (AMI). * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withLatestAmiId(String latestAmiId) { setLatestAmiId(latestAmiId); return this; } /** ** The state of the replication job. *
* * @param state * The state of the replication job. * @see ReplicationJobState */ public void setState(String state) { this.state = state; } /** ** The state of the replication job. *
* * @return The state of the replication job. * @see ReplicationJobState */ public String getState() { return this.state; } /** ** The state of the replication job. *
* * @param state * The state of the replication job. * @return Returns a reference to this object so that method calls can be chained together. * @see ReplicationJobState */ public ReplicationJob withState(String state) { setState(state); return this; } /** ** The state of the replication job. *
* * @param state * The state of the replication job. * @see ReplicationJobState */ public void setState(ReplicationJobState state) { withState(state); } /** ** The state of the replication job. *
* * @param state * The state of the replication job. * @return Returns a reference to this object so that method calls can be chained together. * @see ReplicationJobState */ public ReplicationJob withState(ReplicationJobState state) { this.state = state.toString(); return this; } /** ** The description of the current status of the replication job. *
* * @param statusMessage * The description of the current status of the replication job. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** ** The description of the current status of the replication job. *
* * @return The description of the current status of the replication job. */ public String getStatusMessage() { return this.statusMessage; } /** ** The description of the current status of the replication job. *
* * @param statusMessage * The description of the current status of the replication job. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); 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 ReplicationJob withDescription(String description) { setDescription(description); return this; } /** ** The number of recent AMIs to keep in the customer's account for a replication job. By default, the value is set * to zero, meaning that all AMIs are kept. *
* * @param numberOfRecentAmisToKeep * The number of recent AMIs to keep in the customer's account for a replication job. By default, the value * is set to zero, meaning that all AMIs are kept. */ public void setNumberOfRecentAmisToKeep(Integer numberOfRecentAmisToKeep) { this.numberOfRecentAmisToKeep = numberOfRecentAmisToKeep; } /** ** The number of recent AMIs to keep in the customer's account for a replication job. By default, the value is set * to zero, meaning that all AMIs are kept. *
* * @return The number of recent AMIs to keep in the customer's account for a replication job. By default, the value * is set to zero, meaning that all AMIs are kept. */ public Integer getNumberOfRecentAmisToKeep() { return this.numberOfRecentAmisToKeep; } /** ** The number of recent AMIs to keep in the customer's account for a replication job. By default, the value is set * to zero, meaning that all AMIs are kept. *
* * @param numberOfRecentAmisToKeep * The number of recent AMIs to keep in the customer's account for a replication job. By default, the value * is set to zero, meaning that all AMIs are kept. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withNumberOfRecentAmisToKeep(Integer numberOfRecentAmisToKeep) { setNumberOfRecentAmisToKeep(numberOfRecentAmisToKeep); return this; } /** ** Indicates whether the replication job should produce encrypted AMIs. *
* * @param encrypted * Indicates whether the replication job should produce encrypted AMIs. */ public void setEncrypted(Boolean encrypted) { this.encrypted = encrypted; } /** ** Indicates whether the replication job should produce encrypted AMIs. *
* * @return Indicates whether the replication job should produce encrypted AMIs. */ public Boolean getEncrypted() { return this.encrypted; } /** ** Indicates whether the replication job should produce encrypted AMIs. *
* * @param encrypted * Indicates whether the replication job should produce encrypted AMIs. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withEncrypted(Boolean encrypted) { setEncrypted(encrypted); return this; } /** ** Indicates whether the replication job should produce encrypted AMIs. *
* * @return Indicates whether the replication job should produce encrypted AMIs. */ 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 ReplicationJob withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *
* Information about the replication runs. *
* * @return Information about the replication runs. */ public java.util.List* Information about the replication runs. *
* * @param replicationRunList * Information about the replication runs. */ public void setReplicationRunList(java.util.Collection* Information about the replication runs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setReplicationRunList(java.util.Collection)} or {@link #withReplicationRunList(java.util.Collection)} if * you want to override the existing values. *
* * @param replicationRunList * Information about the replication runs. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withReplicationRunList(ReplicationRun... replicationRunList) { if (this.replicationRunList == null) { setReplicationRunList(new java.util.ArrayList* Information about the replication runs. *
* * @param replicationRunList * Information about the replication runs. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationJob withReplicationRunList(java.util.Collection