/** * 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 namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { /** *

Provides information about a data source synchronization job.

See * Also:

AWS * API Reference

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

A identifier for the synchronization job.

*/ inline const Aws::String& GetExecutionId() const{ return m_executionId; } /** *

A identifier for the synchronization job.

*/ inline bool ExecutionIdHasBeenSet() const { return m_executionIdHasBeenSet; } /** *

A identifier for the synchronization job.

*/ inline void SetExecutionId(const Aws::String& value) { m_executionIdHasBeenSet = true; m_executionId = value; } /** *

A identifier for the synchronization job.

*/ inline void SetExecutionId(Aws::String&& value) { m_executionIdHasBeenSet = true; m_executionId = std::move(value); } /** *

A identifier for the synchronization job.

*/ inline void SetExecutionId(const char* value) { m_executionIdHasBeenSet = true; m_executionId.assign(value); } /** *

A identifier for the synchronization job.

*/ inline DataSourceSyncJob& WithExecutionId(const Aws::String& value) { SetExecutionId(value); return *this;} /** *

A identifier for the synchronization job.

*/ inline DataSourceSyncJob& WithExecutionId(Aws::String&& value) { SetExecutionId(std::move(value)); return *this;} /** *

A identifier for the synchronization job.

*/ inline DataSourceSyncJob& WithExecutionId(const char* value) { SetExecutionId(value); return *this;} /** *

The Unix timestamp when the synchronization job started.

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } /** *

The Unix timestamp when the synchronization job started.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The Unix timestamp when the synchronization job started.

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The Unix timestamp when the synchronization job started.

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

The Unix timestamp when the synchronization job started.

*/ inline DataSourceSyncJob& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

The Unix timestamp when the synchronization job started.

*/ inline DataSourceSyncJob& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} /** *

The Unix timestamp when the synchronization job completed.

*/ inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; } /** *

The Unix timestamp when the synchronization job completed.

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

The Unix timestamp when the synchronization job completed.

*/ inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

The Unix timestamp when the synchronization job completed.

*/ inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } /** *

The Unix timestamp when the synchronization job completed.

*/ inline DataSourceSyncJob& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;} /** *

The Unix timestamp when the synchronization job completed.

*/ inline DataSourceSyncJob& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} /** *

The execution status of the synchronization job. When the Status * field is set to SUCCEEDED, the synchronization job is done. If the * status code is set to FAILED, the ErrorCode and * ErrorMessage fields give you the reason for the failure.

*/ inline const DataSourceSyncJobStatus& GetStatus() const{ return m_status; } /** *

The execution status of the synchronization job. When the Status * field is set to SUCCEEDED, the synchronization job is done. If the * status code is set to FAILED, the ErrorCode and * ErrorMessage fields give you the reason for the failure.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The execution status of the synchronization job. When the Status * field is set to SUCCEEDED, the synchronization job is done. If the * status code is set to FAILED, the ErrorCode and * ErrorMessage fields give you the reason for the failure.

*/ inline void SetStatus(const DataSourceSyncJobStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The execution status of the synchronization job. When the Status * field is set to SUCCEEDED, the synchronization job is done. If the * status code is set to FAILED, the ErrorCode and * ErrorMessage fields give you the reason for the failure.

*/ inline void SetStatus(DataSourceSyncJobStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The execution status of the synchronization job. When the Status * field is set to SUCCEEDED, the synchronization job is done. If the * status code is set to FAILED, the ErrorCode and * ErrorMessage fields give you the reason for the failure.

*/ inline DataSourceSyncJob& WithStatus(const DataSourceSyncJobStatus& value) { SetStatus(value); return *this;} /** *

The execution status of the synchronization job. When the Status * field is set to SUCCEEDED, the synchronization job is done. If the * status code is set to FAILED, the ErrorCode and * ErrorMessage fields give you the reason for the failure.

*/ inline DataSourceSyncJob& WithStatus(DataSourceSyncJobStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; } /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; } /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; } /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); } /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); } /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline DataSourceSyncJob& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;} /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline DataSourceSyncJob& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;} /** *

If the Status field is set to ERROR, the * ErrorMessage field contains a description of the error that caused * the synchronization to fail.

*/ inline DataSourceSyncJob& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;} /** *

If the Status field is set to FAILED, the * ErrorCode field indicates the reason the synchronization * failed.

*/ inline const ErrorCode& GetErrorCode() const{ return m_errorCode; } /** *

If the Status field is set to FAILED, the * ErrorCode field indicates the reason the synchronization * failed.

*/ inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; } /** *

If the Status field is set to FAILED, the * ErrorCode field indicates the reason the synchronization * failed.

*/ inline void SetErrorCode(const ErrorCode& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; } /** *

If the Status field is set to FAILED, the * ErrorCode field indicates the reason the synchronization * failed.

*/ inline void SetErrorCode(ErrorCode&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); } /** *

If the Status field is set to FAILED, the * ErrorCode field indicates the reason the synchronization * failed.

*/ inline DataSourceSyncJob& WithErrorCode(const ErrorCode& value) { SetErrorCode(value); return *this;} /** *

If the Status field is set to FAILED, the * ErrorCode field indicates the reason the synchronization * failed.

*/ inline DataSourceSyncJob& WithErrorCode(ErrorCode&& value) { SetErrorCode(std::move(value)); return *this;} /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline const Aws::String& GetDataSourceErrorCode() const{ return m_dataSourceErrorCode; } /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline bool DataSourceErrorCodeHasBeenSet() const { return m_dataSourceErrorCodeHasBeenSet; } /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline void SetDataSourceErrorCode(const Aws::String& value) { m_dataSourceErrorCodeHasBeenSet = true; m_dataSourceErrorCode = value; } /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline void SetDataSourceErrorCode(Aws::String&& value) { m_dataSourceErrorCodeHasBeenSet = true; m_dataSourceErrorCode = std::move(value); } /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline void SetDataSourceErrorCode(const char* value) { m_dataSourceErrorCodeHasBeenSet = true; m_dataSourceErrorCode.assign(value); } /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline DataSourceSyncJob& WithDataSourceErrorCode(const Aws::String& value) { SetDataSourceErrorCode(value); return *this;} /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline DataSourceSyncJob& WithDataSourceErrorCode(Aws::String&& value) { SetDataSourceErrorCode(std::move(value)); return *this;} /** *

If the reason that the synchronization failed is due to an error with the * underlying data source, this field contains a code that identifies the * error.

*/ inline DataSourceSyncJob& WithDataSourceErrorCode(const char* value) { SetDataSourceErrorCode(value); return *this;} /** *

Maps a batch delete document request to a specific data source sync job. This * is optional and should only be supplied when documents are deleted by a data * source connector.

*/ inline const DataSourceSyncJobMetrics& GetMetrics() const{ return m_metrics; } /** *

Maps a batch delete document request to a specific data source sync job. This * is optional and should only be supplied when documents are deleted by a data * source connector.

*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *

Maps a batch delete document request to a specific data source sync job. This * is optional and should only be supplied when documents are deleted by a data * source connector.

*/ inline void SetMetrics(const DataSourceSyncJobMetrics& value) { m_metricsHasBeenSet = true; m_metrics = value; } /** *

Maps a batch delete document request to a specific data source sync job. This * is optional and should only be supplied when documents are deleted by a data * source connector.

*/ inline void SetMetrics(DataSourceSyncJobMetrics&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } /** *

Maps a batch delete document request to a specific data source sync job. This * is optional and should only be supplied when documents are deleted by a data * source connector.

*/ inline DataSourceSyncJob& WithMetrics(const DataSourceSyncJobMetrics& value) { SetMetrics(value); return *this;} /** *

Maps a batch delete document request to a specific data source sync job. This * is optional and should only be supplied when documents are deleted by a data * source connector.

*/ inline DataSourceSyncJob& WithMetrics(DataSourceSyncJobMetrics&& value) { SetMetrics(std::move(value)); return *this;} private: Aws::String m_executionId; bool m_executionIdHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; DataSourceSyncJobStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_errorMessage; bool m_errorMessageHasBeenSet = false; ErrorCode m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::String m_dataSourceErrorCode; bool m_dataSourceErrorCodeHasBeenSet = false; DataSourceSyncJobMetrics m_metrics; bool m_metricsHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws