/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SMS { namespace Model { /** *

Represents a replication job.

See Also:

AWS * API Reference

*/ class ReplicationJob { public: AWS_SMS_API ReplicationJob(); AWS_SMS_API ReplicationJob(Aws::Utils::Json::JsonView jsonValue); AWS_SMS_API ReplicationJob& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SMS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The ID of the replication job.

*/ inline const Aws::String& GetReplicationJobId() const{ return m_replicationJobId; } /** *

The ID of the replication job.

*/ inline bool ReplicationJobIdHasBeenSet() const { return m_replicationJobIdHasBeenSet; } /** *

The ID of the replication job.

*/ inline void SetReplicationJobId(const Aws::String& value) { m_replicationJobIdHasBeenSet = true; m_replicationJobId = value; } /** *

The ID of the replication job.

*/ inline void SetReplicationJobId(Aws::String&& value) { m_replicationJobIdHasBeenSet = true; m_replicationJobId = std::move(value); } /** *

The ID of the replication job.

*/ inline void SetReplicationJobId(const char* value) { m_replicationJobIdHasBeenSet = true; m_replicationJobId.assign(value); } /** *

The ID of the replication job.

*/ inline ReplicationJob& WithReplicationJobId(const Aws::String& value) { SetReplicationJobId(value); return *this;} /** *

The ID of the replication job.

*/ inline ReplicationJob& WithReplicationJobId(Aws::String&& value) { SetReplicationJobId(std::move(value)); return *this;} /** *

The ID of the replication job.

*/ inline ReplicationJob& WithReplicationJobId(const char* value) { SetReplicationJobId(value); return *this;} /** *

The ID of the server.

*/ inline const Aws::String& GetServerId() const{ return m_serverId; } /** *

The ID of the server.

*/ inline bool ServerIdHasBeenSet() const { return m_serverIdHasBeenSet; } /** *

The ID of the server.

*/ inline void SetServerId(const Aws::String& value) { m_serverIdHasBeenSet = true; m_serverId = value; } /** *

The ID of the server.

*/ inline void SetServerId(Aws::String&& value) { m_serverIdHasBeenSet = true; m_serverId = std::move(value); } /** *

The ID of the server.

*/ inline void SetServerId(const char* value) { m_serverIdHasBeenSet = true; m_serverId.assign(value); } /** *

The ID of the server.

*/ inline ReplicationJob& WithServerId(const Aws::String& value) { SetServerId(value); return *this;} /** *

The ID of the server.

*/ inline ReplicationJob& WithServerId(Aws::String&& value) { SetServerId(std::move(value)); return *this;} /** *

The ID of the server.

*/ inline ReplicationJob& WithServerId(const char* value) { SetServerId(value); return *this;} /** *

The type of server.

*/ inline const ServerType& GetServerType() const{ return m_serverType; } /** *

The type of server.

*/ inline bool ServerTypeHasBeenSet() const { return m_serverTypeHasBeenSet; } /** *

The type of server.

*/ inline void SetServerType(const ServerType& value) { m_serverTypeHasBeenSet = true; m_serverType = value; } /** *

The type of server.

*/ inline void SetServerType(ServerType&& value) { m_serverTypeHasBeenSet = true; m_serverType = std::move(value); } /** *

The type of server.

*/ inline ReplicationJob& WithServerType(const ServerType& value) { SetServerType(value); return *this;} /** *

The type of server.

*/ inline ReplicationJob& WithServerType(ServerType&& value) { SetServerType(std::move(value)); return *this;} /** *

Information about the VM server.

*/ inline const VmServer& GetVmServer() const{ return m_vmServer; } /** *

Information about the VM server.

*/ inline bool VmServerHasBeenSet() const { return m_vmServerHasBeenSet; } /** *

Information about the VM server.

*/ inline void SetVmServer(const VmServer& value) { m_vmServerHasBeenSet = true; m_vmServer = value; } /** *

Information about the VM server.

*/ inline void SetVmServer(VmServer&& value) { m_vmServerHasBeenSet = true; m_vmServer = std::move(value); } /** *

Information about the VM server.

*/ inline ReplicationJob& WithVmServer(const VmServer& value) { SetVmServer(value); return *this;} /** *

Information about the VM server.

*/ inline ReplicationJob& WithVmServer(VmServer&& value) { SetVmServer(std::move(value)); return *this;} /** *

The seed replication time.

*/ inline const Aws::Utils::DateTime& GetSeedReplicationTime() const{ return m_seedReplicationTime; } /** *

The seed replication time.

*/ inline bool SeedReplicationTimeHasBeenSet() const { return m_seedReplicationTimeHasBeenSet; } /** *

The seed replication time.

*/ inline void SetSeedReplicationTime(const Aws::Utils::DateTime& value) { m_seedReplicationTimeHasBeenSet = true; m_seedReplicationTime = value; } /** *

The seed replication time.

*/ inline void SetSeedReplicationTime(Aws::Utils::DateTime&& value) { m_seedReplicationTimeHasBeenSet = true; m_seedReplicationTime = std::move(value); } /** *

The seed replication time.

*/ inline ReplicationJob& WithSeedReplicationTime(const Aws::Utils::DateTime& value) { SetSeedReplicationTime(value); return *this;} /** *

The seed replication time.

*/ inline ReplicationJob& WithSeedReplicationTime(Aws::Utils::DateTime&& value) { SetSeedReplicationTime(std::move(value)); return *this;} /** *

The time between consecutive replication runs, in hours.

*/ inline int GetFrequency() const{ return m_frequency; } /** *

The time between consecutive replication runs, in hours.

*/ inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; } /** *

The time between consecutive replication runs, in hours.

*/ inline void SetFrequency(int value) { m_frequencyHasBeenSet = true; m_frequency = value; } /** *

The time between consecutive replication runs, in hours.

*/ inline ReplicationJob& WithFrequency(int value) { SetFrequency(value); return *this;} /** *

Indicates whether to run the replication job one time.

*/ inline bool GetRunOnce() const{ return m_runOnce; } /** *

Indicates whether to run the replication job one time.

*/ inline bool RunOnceHasBeenSet() const { return m_runOnceHasBeenSet; } /** *

Indicates whether to run the replication job one time.

*/ inline void SetRunOnce(bool value) { m_runOnceHasBeenSet = true; m_runOnce = value; } /** *

Indicates whether to run the replication job one time.

*/ inline ReplicationJob& WithRunOnce(bool value) { SetRunOnce(value); return *this;} /** *

The start time of the next replication run.

*/ inline const Aws::Utils::DateTime& GetNextReplicationRunStartTime() const{ return m_nextReplicationRunStartTime; } /** *

The start time of the next replication run.

*/ inline bool NextReplicationRunStartTimeHasBeenSet() const { return m_nextReplicationRunStartTimeHasBeenSet; } /** *

The start time of the next replication run.

*/ inline void SetNextReplicationRunStartTime(const Aws::Utils::DateTime& value) { m_nextReplicationRunStartTimeHasBeenSet = true; m_nextReplicationRunStartTime = value; } /** *

The start time of the next replication run.

*/ inline void SetNextReplicationRunStartTime(Aws::Utils::DateTime&& value) { m_nextReplicationRunStartTimeHasBeenSet = true; m_nextReplicationRunStartTime = std::move(value); } /** *

The start time of the next replication run.

*/ inline ReplicationJob& WithNextReplicationRunStartTime(const Aws::Utils::DateTime& value) { SetNextReplicationRunStartTime(value); return *this;} /** *

The start time of the next replication run.

*/ inline ReplicationJob& WithNextReplicationRunStartTime(Aws::Utils::DateTime&& value) { SetNextReplicationRunStartTime(std::move(value)); return *this;} /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline const LicenseType& GetLicenseType() const{ return m_licenseType; } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline bool LicenseTypeHasBeenSet() const { return m_licenseTypeHasBeenSet; } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline void SetLicenseType(const LicenseType& value) { m_licenseTypeHasBeenSet = true; m_licenseType = value; } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline void SetLicenseType(LicenseType&& value) { m_licenseTypeHasBeenSet = true; m_licenseType = std::move(value); } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline ReplicationJob& WithLicenseType(const LicenseType& value) { SetLicenseType(value); return *this;} /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline ReplicationJob& WithLicenseType(LicenseType&& value) { SetLicenseType(std::move(value)); return *this;} /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline const Aws::String& GetRoleName() const{ return m_roleName; } /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline ReplicationJob& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline ReplicationJob& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} /** *

The name of the IAM role to be used by Server Migration Service.

*/ inline ReplicationJob& WithRoleName(const char* value) { SetRoleName(value); return *this;} /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline const Aws::String& GetLatestAmiId() const{ return m_latestAmiId; } /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline bool LatestAmiIdHasBeenSet() const { return m_latestAmiIdHasBeenSet; } /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline void SetLatestAmiId(const Aws::String& value) { m_latestAmiIdHasBeenSet = true; m_latestAmiId = value; } /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline void SetLatestAmiId(Aws::String&& value) { m_latestAmiIdHasBeenSet = true; m_latestAmiId = std::move(value); } /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline void SetLatestAmiId(const char* value) { m_latestAmiIdHasBeenSet = true; m_latestAmiId.assign(value); } /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline ReplicationJob& WithLatestAmiId(const Aws::String& value) { SetLatestAmiId(value); return *this;} /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline ReplicationJob& WithLatestAmiId(Aws::String&& value) { SetLatestAmiId(std::move(value)); return *this;} /** *

The ID of the latest Amazon Machine Image (AMI).

*/ inline ReplicationJob& WithLatestAmiId(const char* value) { SetLatestAmiId(value); return *this;} /** *

The state of the replication job.

*/ inline const ReplicationJobState& GetState() const{ return m_state; } /** *

The state of the replication job.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the replication job.

*/ inline void SetState(const ReplicationJobState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the replication job.

*/ inline void SetState(ReplicationJobState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the replication job.

*/ inline ReplicationJob& WithState(const ReplicationJobState& value) { SetState(value); return *this;} /** *

The state of the replication job.

*/ inline ReplicationJob& WithState(ReplicationJobState&& value) { SetState(std::move(value)); return *this;} /** *

The description of the current status of the replication job.

*/ inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; } /** *

The description of the current status of the replication job.

*/ inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; } /** *

The description of the current status of the replication job.

*/ inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; } /** *

The description of the current status of the replication job.

*/ inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); } /** *

The description of the current status of the replication job.

*/ inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); } /** *

The description of the current status of the replication job.

*/ inline ReplicationJob& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;} /** *

The description of the current status of the replication job.

*/ inline ReplicationJob& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;} /** *

The description of the current status of the replication job.

*/ inline ReplicationJob& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;} /** *

The description of the replication job.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the replication job.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the replication job.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the replication job.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the replication job.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the replication job.

*/ inline ReplicationJob& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the replication job.

*/ inline ReplicationJob& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the replication job.

*/ inline ReplicationJob& WithDescription(const char* value) { SetDescription(value); 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.

*/ inline int GetNumberOfRecentAmisToKeep() const{ return m_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.

*/ inline bool NumberOfRecentAmisToKeepHasBeenSet() const { return m_numberOfRecentAmisToKeepHasBeenSet; } /** *

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.

*/ inline void SetNumberOfRecentAmisToKeep(int value) { m_numberOfRecentAmisToKeepHasBeenSet = true; m_numberOfRecentAmisToKeep = value; } /** *

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.

*/ inline ReplicationJob& WithNumberOfRecentAmisToKeep(int value) { SetNumberOfRecentAmisToKeep(value); return *this;} /** *

Indicates whether the replication job should produce encrypted AMIs.

*/ inline bool GetEncrypted() const{ return m_encrypted; } /** *

Indicates whether the replication job should produce encrypted AMIs.

*/ inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; } /** *

Indicates whether the replication job should produce encrypted AMIs.

*/ inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; } /** *

Indicates whether the replication job should produce encrypted AMIs.

*/ inline ReplicationJob& WithEncrypted(bool value) { SetEncrypted(value); return *this;} /** *

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.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_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.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

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.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

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.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

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.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

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.

*/ inline ReplicationJob& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

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.

*/ inline ReplicationJob& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

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.

*/ inline ReplicationJob& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

Information about the replication runs.

*/ inline const Aws::Vector& GetReplicationRunList() const{ return m_replicationRunList; } /** *

Information about the replication runs.

*/ inline bool ReplicationRunListHasBeenSet() const { return m_replicationRunListHasBeenSet; } /** *

Information about the replication runs.

*/ inline void SetReplicationRunList(const Aws::Vector& value) { m_replicationRunListHasBeenSet = true; m_replicationRunList = value; } /** *

Information about the replication runs.

*/ inline void SetReplicationRunList(Aws::Vector&& value) { m_replicationRunListHasBeenSet = true; m_replicationRunList = std::move(value); } /** *

Information about the replication runs.

*/ inline ReplicationJob& WithReplicationRunList(const Aws::Vector& value) { SetReplicationRunList(value); return *this;} /** *

Information about the replication runs.

*/ inline ReplicationJob& WithReplicationRunList(Aws::Vector&& value) { SetReplicationRunList(std::move(value)); return *this;} /** *

Information about the replication runs.

*/ inline ReplicationJob& AddReplicationRunList(const ReplicationRun& value) { m_replicationRunListHasBeenSet = true; m_replicationRunList.push_back(value); return *this; } /** *

Information about the replication runs.

*/ inline ReplicationJob& AddReplicationRunList(ReplicationRun&& value) { m_replicationRunListHasBeenSet = true; m_replicationRunList.push_back(std::move(value)); return *this; } private: Aws::String m_replicationJobId; bool m_replicationJobIdHasBeenSet = false; Aws::String m_serverId; bool m_serverIdHasBeenSet = false; ServerType m_serverType; bool m_serverTypeHasBeenSet = false; VmServer m_vmServer; bool m_vmServerHasBeenSet = false; Aws::Utils::DateTime m_seedReplicationTime; bool m_seedReplicationTimeHasBeenSet = false; int m_frequency; bool m_frequencyHasBeenSet = false; bool m_runOnce; bool m_runOnceHasBeenSet = false; Aws::Utils::DateTime m_nextReplicationRunStartTime; bool m_nextReplicationRunStartTimeHasBeenSet = false; LicenseType m_licenseType; bool m_licenseTypeHasBeenSet = false; Aws::String m_roleName; bool m_roleNameHasBeenSet = false; Aws::String m_latestAmiId; bool m_latestAmiIdHasBeenSet = false; ReplicationJobState m_state; bool m_stateHasBeenSet = false; Aws::String m_statusMessage; bool m_statusMessageHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; int m_numberOfRecentAmisToKeep; bool m_numberOfRecentAmisToKeepHasBeenSet = false; bool m_encrypted; bool m_encryptedHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::Vector m_replicationRunList; bool m_replicationRunListHasBeenSet = false; }; } // namespace Model } // namespace SMS } // namespace Aws