/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains the information for a run of a crawler. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CrawlerHistory implements Serializable, Cloneable, StructuredPojo { /** ** A UUID identifier for each crawl. *
*/ private String crawlId; /** ** The state of the crawl. *
*/ private String state; /** ** The date and time on which the crawl started. *
*/ private java.util.Date startTime; /** ** The date and time on which the crawl ended. *
*/ private java.util.Date endTime; /** ** A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. *
*/ private String summary; /** ** If an error occurred, the error message associated with the crawl. *
*/ private String errorMessage; /** ** The log group associated with the crawl. *
*/ private String logGroup; /** ** The log stream associated with the crawl. *
*/ private String logStream; /** ** The prefix for a CloudWatch message about this crawl. *
*/ private String messagePrefix; /** ** The number of data processing units (DPU) used in hours for the crawl. *
*/ private Double dPUHour; /** ** A UUID identifier for each crawl. *
* * @param crawlId * A UUID identifier for each crawl. */ public void setCrawlId(String crawlId) { this.crawlId = crawlId; } /** ** A UUID identifier for each crawl. *
* * @return A UUID identifier for each crawl. */ public String getCrawlId() { return this.crawlId; } /** ** A UUID identifier for each crawl. *
* * @param crawlId * A UUID identifier for each crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withCrawlId(String crawlId) { setCrawlId(crawlId); return this; } /** ** The state of the crawl. *
* * @param state * The state of the crawl. * @see CrawlerHistoryState */ public void setState(String state) { this.state = state; } /** ** The state of the crawl. *
* * @return The state of the crawl. * @see CrawlerHistoryState */ public String getState() { return this.state; } /** ** The state of the crawl. *
* * @param state * The state of the crawl. * @return Returns a reference to this object so that method calls can be chained together. * @see CrawlerHistoryState */ public CrawlerHistory withState(String state) { setState(state); return this; } /** ** The state of the crawl. *
* * @param state * The state of the crawl. * @return Returns a reference to this object so that method calls can be chained together. * @see CrawlerHistoryState */ public CrawlerHistory withState(CrawlerHistoryState state) { this.state = state.toString(); return this; } /** ** The date and time on which the crawl started. *
* * @param startTime * The date and time on which the crawl started. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The date and time on which the crawl started. *
* * @return The date and time on which the crawl started. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The date and time on which the crawl started. *
* * @param startTime * The date and time on which the crawl started. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The date and time on which the crawl ended. *
* * @param endTime * The date and time on which the crawl ended. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** The date and time on which the crawl ended. *
* * @return The date and time on which the crawl ended. */ public java.util.Date getEndTime() { return this.endTime; } /** ** The date and time on which the crawl ended. *
* * @param endTime * The date and time on which the crawl ended. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. *
* * @param summary * A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. */ public void setSummary(String summary) { this.summary = summary; } /** ** A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. *
* * @return A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. */ public String getSummary() { return this.summary; } /** ** A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. *
* * @param summary * A run summary for the specific crawl in JSON. Contains the catalog tables and partitions that were added, * updated, or deleted. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withSummary(String summary) { setSummary(summary); return this; } /** ** If an error occurred, the error message associated with the crawl. *
* * @param errorMessage * If an error occurred, the error message associated with the crawl. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** ** If an error occurred, the error message associated with the crawl. *
* * @return If an error occurred, the error message associated with the crawl. */ public String getErrorMessage() { return this.errorMessage; } /** ** If an error occurred, the error message associated with the crawl. *
* * @param errorMessage * If an error occurred, the error message associated with the crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; } /** ** The log group associated with the crawl. *
* * @param logGroup * The log group associated with the crawl. */ public void setLogGroup(String logGroup) { this.logGroup = logGroup; } /** ** The log group associated with the crawl. *
* * @return The log group associated with the crawl. */ public String getLogGroup() { return this.logGroup; } /** ** The log group associated with the crawl. *
* * @param logGroup * The log group associated with the crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withLogGroup(String logGroup) { setLogGroup(logGroup); return this; } /** ** The log stream associated with the crawl. *
* * @param logStream * The log stream associated with the crawl. */ public void setLogStream(String logStream) { this.logStream = logStream; } /** ** The log stream associated with the crawl. *
* * @return The log stream associated with the crawl. */ public String getLogStream() { return this.logStream; } /** ** The log stream associated with the crawl. *
* * @param logStream * The log stream associated with the crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withLogStream(String logStream) { setLogStream(logStream); return this; } /** ** The prefix for a CloudWatch message about this crawl. *
* * @param messagePrefix * The prefix for a CloudWatch message about this crawl. */ public void setMessagePrefix(String messagePrefix) { this.messagePrefix = messagePrefix; } /** ** The prefix for a CloudWatch message about this crawl. *
* * @return The prefix for a CloudWatch message about this crawl. */ public String getMessagePrefix() { return this.messagePrefix; } /** ** The prefix for a CloudWatch message about this crawl. *
* * @param messagePrefix * The prefix for a CloudWatch message about this crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withMessagePrefix(String messagePrefix) { setMessagePrefix(messagePrefix); return this; } /** ** The number of data processing units (DPU) used in hours for the crawl. *
* * @param dPUHour * The number of data processing units (DPU) used in hours for the crawl. */ public void setDPUHour(Double dPUHour) { this.dPUHour = dPUHour; } /** ** The number of data processing units (DPU) used in hours for the crawl. *
* * @return The number of data processing units (DPU) used in hours for the crawl. */ public Double getDPUHour() { return this.dPUHour; } /** ** The number of data processing units (DPU) used in hours for the crawl. *
* * @param dPUHour * The number of data processing units (DPU) used in hours for the crawl. * @return Returns a reference to this object so that method calls can be chained together. */ public CrawlerHistory withDPUHour(Double dPUHour) { setDPUHour(dPUHour); 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 (getCrawlId() != null) sb.append("CrawlId: ").append(getCrawlId()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getSummary() != null) sb.append("Summary: ").append(getSummary()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()).append(","); if (getLogGroup() != null) sb.append("LogGroup: ").append(getLogGroup()).append(","); if (getLogStream() != null) sb.append("LogStream: ").append(getLogStream()).append(","); if (getMessagePrefix() != null) sb.append("MessagePrefix: ").append(getMessagePrefix()).append(","); if (getDPUHour() != null) sb.append("DPUHour: ").append(getDPUHour()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CrawlerHistory == false) return false; CrawlerHistory other = (CrawlerHistory) obj; if (other.getCrawlId() == null ^ this.getCrawlId() == null) return false; if (other.getCrawlId() != null && other.getCrawlId().equals(this.getCrawlId()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == 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.getSummary() == null ^ this.getSummary() == null) return false; if (other.getSummary() != null && other.getSummary().equals(this.getSummary()) == 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.getLogGroup() == null ^ this.getLogGroup() == null) return false; if (other.getLogGroup() != null && other.getLogGroup().equals(this.getLogGroup()) == false) return false; if (other.getLogStream() == null ^ this.getLogStream() == null) return false; if (other.getLogStream() != null && other.getLogStream().equals(this.getLogStream()) == false) return false; if (other.getMessagePrefix() == null ^ this.getMessagePrefix() == null) return false; if (other.getMessagePrefix() != null && other.getMessagePrefix().equals(this.getMessagePrefix()) == false) return false; if (other.getDPUHour() == null ^ this.getDPUHour() == null) return false; if (other.getDPUHour() != null && other.getDPUHour().equals(this.getDPUHour()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCrawlId() == null) ? 0 : getCrawlId().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getSummary() == null) ? 0 : getSummary().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); hashCode = prime * hashCode + ((getLogGroup() == null) ? 0 : getLogGroup().hashCode()); hashCode = prime * hashCode + ((getLogStream() == null) ? 0 : getLogStream().hashCode()); hashCode = prime * hashCode + ((getMessagePrefix() == null) ? 0 : getMessagePrefix().hashCode()); hashCode = prime * hashCode + ((getDPUHour() == null) ? 0 : getDPUHour().hashCode()); return hashCode; } @Override public CrawlerHistory clone() { try { return (CrawlerHistory) 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.glue.model.transform.CrawlerHistoryMarshaller.getInstance().marshall(this, protocolMarshaller); } }