All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.kendra.model.DataSourceSyncJob Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWSKendraFrontend module holds the client classes that are used for communicating with AWSKendraFrontend Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.kendra.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides information about a data source synchronization job. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DataSourceSyncJob implements Serializable, Cloneable, StructuredPojo { /** *

* A identifier for the synchronization job. *

*/ private String executionId; /** *

* The Unix timestamp when the synchronization job started. *

*/ private java.util.Date startTime; /** *

* The Unix timestamp when the synchronization job completed. *

*/ private java.util.Date endTime; /** *

* 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. *

*/ private String status; /** *

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

*/ private String errorMessage; /** *

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

*/ private String errorCode; /** *

* 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. *

*/ private String dataSourceErrorCode; /** *

* 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. *

*/ private DataSourceSyncJobMetrics metrics; /** *

* A identifier for the synchronization job. *

* * @param executionId * A identifier for the synchronization job. */ public void setExecutionId(String executionId) { this.executionId = executionId; } /** *

* A identifier for the synchronization job. *

* * @return A identifier for the synchronization job. */ public String getExecutionId() { return this.executionId; } /** *

* A identifier for the synchronization job. *

* * @param executionId * A identifier for the synchronization job. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceSyncJob withExecutionId(String executionId) { setExecutionId(executionId); return this; } /** *

* The Unix timestamp when the synchronization job started. *

* * @param startTime * The Unix timestamp when the synchronization job started. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The Unix timestamp when the synchronization job started. *

* * @return The Unix timestamp when the synchronization job started. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The Unix timestamp when the synchronization job started. *

* * @param startTime * The Unix timestamp when the synchronization job started. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceSyncJob withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The Unix timestamp when the synchronization job completed. *

* * @param endTime * The Unix timestamp when the synchronization job completed. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The Unix timestamp when the synchronization job completed. *

* * @return The Unix timestamp when the synchronization job completed. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The Unix timestamp when the synchronization job completed. *

* * @param endTime * The Unix timestamp when the synchronization job completed. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceSyncJob withEndTime(java.util.Date endTime) { setEndTime(endTime); 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. *

* * @param 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. * @see DataSourceSyncJobStatus */ public void setStatus(String status) { this.status = 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. *

* * @return 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. * @see DataSourceSyncJobStatus */ public String getStatus() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. * @see DataSourceSyncJobStatus */ public DataSourceSyncJob withStatus(String status) { setStatus(status); 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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. * @see DataSourceSyncJobStatus */ public DataSourceSyncJob withStatus(DataSourceSyncJobStatus status) { this.status = status.toString(); 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. *

* * @param errorMessage * If the Status field is set to ERROR, the ErrorMessage field * contains a description of the error that caused the synchronization to fail. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** *

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

* * @return If the Status field is set to ERROR, the ErrorMessage field * contains a description of the error that caused the synchronization to fail. */ public String getErrorMessage() { return this.errorMessage; } /** *

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

* * @param errorMessage * If the Status field is set to ERROR, the ErrorMessage field * contains a description of the error that caused the synchronization to fail. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceSyncJob withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; } /** *

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

* * @param errorCode * If the Status field is set to FAILED, the ErrorCode field indicates * the reason the synchronization failed. * @see ErrorCode */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** *

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

* * @return If the Status field is set to FAILED, the ErrorCode field * indicates the reason the synchronization failed. * @see ErrorCode */ public String getErrorCode() { return this.errorCode; } /** *

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

* * @param errorCode * If the Status field is set to FAILED, the ErrorCode field indicates * the reason the synchronization failed. * @return Returns a reference to this object so that method calls can be chained together. * @see ErrorCode */ public DataSourceSyncJob withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } /** *

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

* * @param errorCode * If the Status field is set to FAILED, the ErrorCode field indicates * the reason the synchronization failed. * @return Returns a reference to this object so that method calls can be chained together. * @see ErrorCode */ public DataSourceSyncJob withErrorCode(ErrorCode errorCode) { this.errorCode = errorCode.toString(); 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. *

* * @param 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. */ public void setDataSourceErrorCode(String dataSourceErrorCode) { this.dataSourceErrorCode = 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. *

* * @return 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. */ public String getDataSourceErrorCode() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceSyncJob withDataSourceErrorCode(String dataSourceErrorCode) { setDataSourceErrorCode(dataSourceErrorCode); 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. *

* * @param 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. */ public void setMetrics(DataSourceSyncJobMetrics metrics) { this.metrics = 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. *

* * @return 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. */ public DataSourceSyncJobMetrics getMetrics() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceSyncJob withMetrics(DataSourceSyncJobMetrics metrics) { setMetrics(metrics); 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 (getExecutionId() != null) sb.append("ExecutionId: ").append(getExecutionId()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()).append(","); if (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getDataSourceErrorCode() != null) sb.append("DataSourceErrorCode: ").append(getDataSourceErrorCode()).append(","); if (getMetrics() != null) sb.append("Metrics: ").append(getMetrics()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DataSourceSyncJob == false) return false; DataSourceSyncJob other = (DataSourceSyncJob) obj; if (other.getExecutionId() == null ^ this.getExecutionId() == null) return false; if (other.getExecutionId() != null && other.getExecutionId().equals(this.getExecutionId()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; if (other.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getDataSourceErrorCode() == null ^ this.getDataSourceErrorCode() == null) return false; if (other.getDataSourceErrorCode() != null && other.getDataSourceErrorCode().equals(this.getDataSourceErrorCode()) == false) return false; if (other.getMetrics() == null ^ this.getMetrics() == null) return false; if (other.getMetrics() != null && other.getMetrics().equals(this.getMetrics()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getExecutionId() == null) ? 0 : getExecutionId().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); hashCode = prime * hashCode + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getDataSourceErrorCode() == null) ? 0 : getDataSourceErrorCode().hashCode()); hashCode = prime * hashCode + ((getMetrics() == null) ? 0 : getMetrics().hashCode()); return hashCode; } @Override public DataSourceSyncJob clone() { try { return (DataSourceSyncJob) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.kendra.model.transform.DataSourceSyncJobMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy