/* * 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.athena.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The name and last modified time of the prepared statement. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PreparedStatementSummary implements Serializable, Cloneable, StructuredPojo { /** ** The name of the prepared statement. *
*/ private String statementName; /** ** The last modified time of the prepared statement. *
*/ private java.util.Date lastModifiedTime; /** ** The name of the prepared statement. *
* * @param statementName * The name of the prepared statement. */ public void setStatementName(String statementName) { this.statementName = statementName; } /** ** The name of the prepared statement. *
* * @return The name of the prepared statement. */ public String getStatementName() { return this.statementName; } /** ** The name of the prepared statement. *
* * @param statementName * The name of the prepared statement. * @return Returns a reference to this object so that method calls can be chained together. */ public PreparedStatementSummary withStatementName(String statementName) { setStatementName(statementName); return this; } /** ** The last modified time of the prepared statement. *
* * @param lastModifiedTime * The last modified time of the prepared statement. */ public void setLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } /** ** The last modified time of the prepared statement. *
* * @return The last modified time of the prepared statement. */ public java.util.Date getLastModifiedTime() { return this.lastModifiedTime; } /** ** The last modified time of the prepared statement. *
* * @param lastModifiedTime * The last modified time of the prepared statement. * @return Returns a reference to this object so that method calls can be chained together. */ public PreparedStatementSummary withLastModifiedTime(java.util.Date lastModifiedTime) { setLastModifiedTime(lastModifiedTime); 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 (getStatementName() != null) sb.append("StatementName: ").append(getStatementName()).append(","); if (getLastModifiedTime() != null) sb.append("LastModifiedTime: ").append(getLastModifiedTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PreparedStatementSummary == false) return false; PreparedStatementSummary other = (PreparedStatementSummary) obj; if (other.getStatementName() == null ^ this.getStatementName() == null) return false; if (other.getStatementName() != null && other.getStatementName().equals(this.getStatementName()) == false) return false; if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null) return false; if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatementName() == null) ? 0 : getStatementName().hashCode()); hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode()); return hashCode; } @Override public PreparedStatementSummary clone() { try { return (PreparedStatementSummary) 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.athena.model.transform.PreparedStatementSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }