/* * Copyright 2012-2017 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.kinesisanalytics.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * Provides application summary information, including the application Amazon Resource Name (ARN), name, and status. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/ApplicationSummary" * target="_top">AWS API Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ApplicationSummary implements Serializable, Cloneable, StructuredPojo { /** * <p> * Name of the application. * </p> */ private String applicationName; /** * <p> * ARN of the application. * </p> */ private String applicationARN; /** * <p> * Status of the application. * </p> */ private String applicationStatus; /** * <p> * Name of the application. * </p> * * @param applicationName * Name of the application. */ public void setApplicationName(String applicationName) { this.applicationName = applicationName; } /** * <p> * Name of the application. * </p> * * @return Name of the application. */ public String getApplicationName() { return this.applicationName; } /** * <p> * Name of the application. * </p> * * @param applicationName * Name of the application. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationSummary withApplicationName(String applicationName) { setApplicationName(applicationName); return this; } /** * <p> * ARN of the application. * </p> * * @param applicationARN * ARN of the application. */ public void setApplicationARN(String applicationARN) { this.applicationARN = applicationARN; } /** * <p> * ARN of the application. * </p> * * @return ARN of the application. */ public String getApplicationARN() { return this.applicationARN; } /** * <p> * ARN of the application. * </p> * * @param applicationARN * ARN of the application. * @return Returns a reference to this object so that method calls can be chained together. */ public ApplicationSummary withApplicationARN(String applicationARN) { setApplicationARN(applicationARN); return this; } /** * <p> * Status of the application. * </p> * * @param applicationStatus * Status of the application. * @see ApplicationStatus */ public void setApplicationStatus(String applicationStatus) { this.applicationStatus = applicationStatus; } /** * <p> * Status of the application. * </p> * * @return Status of the application. * @see ApplicationStatus */ public String getApplicationStatus() { return this.applicationStatus; } /** * <p> * Status of the application. * </p> * * @param applicationStatus * Status of the application. * @return Returns a reference to this object so that method calls can be chained together. * @see ApplicationStatus */ public ApplicationSummary withApplicationStatus(String applicationStatus) { setApplicationStatus(applicationStatus); return this; } /** * <p> * Status of the application. * </p> * * @param applicationStatus * Status of the application. * @see ApplicationStatus */ public void setApplicationStatus(ApplicationStatus applicationStatus) { this.applicationStatus = applicationStatus.toString(); } /** * <p> * Status of the application. * </p> * * @param applicationStatus * Status of the application. * @return Returns a reference to this object so that method calls can be chained together. * @see ApplicationStatus */ public ApplicationSummary withApplicationStatus(ApplicationStatus applicationStatus) { setApplicationStatus(applicationStatus); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getApplicationName() != null) sb.append("ApplicationName: ").append(getApplicationName()).append(","); if (getApplicationARN() != null) sb.append("ApplicationARN: ").append(getApplicationARN()).append(","); if (getApplicationStatus() != null) sb.append("ApplicationStatus: ").append(getApplicationStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ApplicationSummary == false) return false; ApplicationSummary other = (ApplicationSummary) obj; if (other.getApplicationName() == null ^ this.getApplicationName() == null) return false; if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == false) return false; if (other.getApplicationARN() == null ^ this.getApplicationARN() == null) return false; if (other.getApplicationARN() != null && other.getApplicationARN().equals(this.getApplicationARN()) == false) return false; if (other.getApplicationStatus() == null ^ this.getApplicationStatus() == null) return false; if (other.getApplicationStatus() != null && other.getApplicationStatus().equals(this.getApplicationStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode()); hashCode = prime * hashCode + ((getApplicationARN() == null) ? 0 : getApplicationARN().hashCode()); hashCode = prime * hashCode + ((getApplicationStatus() == null) ? 0 : getApplicationStatus().hashCode()); return hashCode; } @Override public ApplicationSummary clone() { try { return (ApplicationSummary) 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.kinesisanalytics.model.transform.ApplicationSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }