/* * 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.timestreamquery.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Statistics for a single scheduled query run. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ExecutionStats implements Serializable, Cloneable, StructuredPojo { /** ** Total time, measured in milliseconds, that was needed for the scheduled query run to complete. *
*/ private Long executionTimeInMillis; /** ** Data writes metered for records ingested in a single scheduled query run. *
*/ private Long dataWrites; /** ** Bytes metered for a single scheduled query run. *
*/ private Long bytesMetered; /** ** The number of records ingested for a single scheduled query run. *
*/ private Long recordsIngested; /** ** Number of rows present in the output from running a query before ingestion to destination data source. *
*/ private Long queryResultRows; /** ** Total time, measured in milliseconds, that was needed for the scheduled query run to complete. *
* * @param executionTimeInMillis * Total time, measured in milliseconds, that was needed for the scheduled query run to complete. */ public void setExecutionTimeInMillis(Long executionTimeInMillis) { this.executionTimeInMillis = executionTimeInMillis; } /** ** Total time, measured in milliseconds, that was needed for the scheduled query run to complete. *
* * @return Total time, measured in milliseconds, that was needed for the scheduled query run to complete. */ public Long getExecutionTimeInMillis() { return this.executionTimeInMillis; } /** ** Total time, measured in milliseconds, that was needed for the scheduled query run to complete. *
* * @param executionTimeInMillis * Total time, measured in milliseconds, that was needed for the scheduled query run to complete. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecutionStats withExecutionTimeInMillis(Long executionTimeInMillis) { setExecutionTimeInMillis(executionTimeInMillis); return this; } /** ** Data writes metered for records ingested in a single scheduled query run. *
* * @param dataWrites * Data writes metered for records ingested in a single scheduled query run. */ public void setDataWrites(Long dataWrites) { this.dataWrites = dataWrites; } /** ** Data writes metered for records ingested in a single scheduled query run. *
* * @return Data writes metered for records ingested in a single scheduled query run. */ public Long getDataWrites() { return this.dataWrites; } /** ** Data writes metered for records ingested in a single scheduled query run. *
* * @param dataWrites * Data writes metered for records ingested in a single scheduled query run. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecutionStats withDataWrites(Long dataWrites) { setDataWrites(dataWrites); return this; } /** ** Bytes metered for a single scheduled query run. *
* * @param bytesMetered * Bytes metered for a single scheduled query run. */ public void setBytesMetered(Long bytesMetered) { this.bytesMetered = bytesMetered; } /** ** Bytes metered for a single scheduled query run. *
* * @return Bytes metered for a single scheduled query run. */ public Long getBytesMetered() { return this.bytesMetered; } /** ** Bytes metered for a single scheduled query run. *
* * @param bytesMetered * Bytes metered for a single scheduled query run. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecutionStats withBytesMetered(Long bytesMetered) { setBytesMetered(bytesMetered); return this; } /** ** The number of records ingested for a single scheduled query run. *
* * @param recordsIngested * The number of records ingested for a single scheduled query run. */ public void setRecordsIngested(Long recordsIngested) { this.recordsIngested = recordsIngested; } /** ** The number of records ingested for a single scheduled query run. *
* * @return The number of records ingested for a single scheduled query run. */ public Long getRecordsIngested() { return this.recordsIngested; } /** ** The number of records ingested for a single scheduled query run. *
* * @param recordsIngested * The number of records ingested for a single scheduled query run. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecutionStats withRecordsIngested(Long recordsIngested) { setRecordsIngested(recordsIngested); return this; } /** ** Number of rows present in the output from running a query before ingestion to destination data source. *
* * @param queryResultRows * Number of rows present in the output from running a query before ingestion to destination data source. */ public void setQueryResultRows(Long queryResultRows) { this.queryResultRows = queryResultRows; } /** ** Number of rows present in the output from running a query before ingestion to destination data source. *
* * @return Number of rows present in the output from running a query before ingestion to destination data source. */ public Long getQueryResultRows() { return this.queryResultRows; } /** ** Number of rows present in the output from running a query before ingestion to destination data source. *
* * @param queryResultRows * Number of rows present in the output from running a query before ingestion to destination data source. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecutionStats withQueryResultRows(Long queryResultRows) { setQueryResultRows(queryResultRows); 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 (getExecutionTimeInMillis() != null) sb.append("ExecutionTimeInMillis: ").append(getExecutionTimeInMillis()).append(","); if (getDataWrites() != null) sb.append("DataWrites: ").append(getDataWrites()).append(","); if (getBytesMetered() != null) sb.append("BytesMetered: ").append(getBytesMetered()).append(","); if (getRecordsIngested() != null) sb.append("RecordsIngested: ").append(getRecordsIngested()).append(","); if (getQueryResultRows() != null) sb.append("QueryResultRows: ").append(getQueryResultRows()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ExecutionStats == false) return false; ExecutionStats other = (ExecutionStats) obj; if (other.getExecutionTimeInMillis() == null ^ this.getExecutionTimeInMillis() == null) return false; if (other.getExecutionTimeInMillis() != null && other.getExecutionTimeInMillis().equals(this.getExecutionTimeInMillis()) == false) return false; if (other.getDataWrites() == null ^ this.getDataWrites() == null) return false; if (other.getDataWrites() != null && other.getDataWrites().equals(this.getDataWrites()) == false) return false; if (other.getBytesMetered() == null ^ this.getBytesMetered() == null) return false; if (other.getBytesMetered() != null && other.getBytesMetered().equals(this.getBytesMetered()) == false) return false; if (other.getRecordsIngested() == null ^ this.getRecordsIngested() == null) return false; if (other.getRecordsIngested() != null && other.getRecordsIngested().equals(this.getRecordsIngested()) == false) return false; if (other.getQueryResultRows() == null ^ this.getQueryResultRows() == null) return false; if (other.getQueryResultRows() != null && other.getQueryResultRows().equals(this.getQueryResultRows()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getExecutionTimeInMillis() == null) ? 0 : getExecutionTimeInMillis().hashCode()); hashCode = prime * hashCode + ((getDataWrites() == null) ? 0 : getDataWrites().hashCode()); hashCode = prime * hashCode + ((getBytesMetered() == null) ? 0 : getBytesMetered().hashCode()); hashCode = prime * hashCode + ((getRecordsIngested() == null) ? 0 : getRecordsIngested().hashCode()); hashCode = prime * hashCode + ((getQueryResultRows() == null) ? 0 : getQueryResultRows().hashCode()); return hashCode; } @Override public ExecutionStats clone() { try { return (ExecutionStats) 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.timestreamquery.model.transform.ExecutionStatsMarshaller.getInstance().marshall(this, protocolMarshaller); } }