/* * 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.apprunner.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Provides summary information about an App Runner connection resource. *

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

* The customer-provided connection name. *

*/ private String connectionName; /** *

* The Amazon Resource Name (ARN) of this connection. *

*/ private String connectionArn; /** *

* The source repository provider. *

*/ private String providerType; /** *

* The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. *

*/ private String status; /** *

* The App Runner connection creation time, expressed as a Unix time stamp. *

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

* The customer-provided connection name. *

* * @param connectionName * The customer-provided connection name. */ public void setConnectionName(String connectionName) { this.connectionName = connectionName; } /** *

* The customer-provided connection name. *

* * @return The customer-provided connection name. */ public String getConnectionName() { return this.connectionName; } /** *

* The customer-provided connection name. *

* * @param connectionName * The customer-provided connection name. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionSummary withConnectionName(String connectionName) { setConnectionName(connectionName); return this; } /** *

* The Amazon Resource Name (ARN) of this connection. *

* * @param connectionArn * The Amazon Resource Name (ARN) of this connection. */ public void setConnectionArn(String connectionArn) { this.connectionArn = connectionArn; } /** *

* The Amazon Resource Name (ARN) of this connection. *

* * @return The Amazon Resource Name (ARN) of this connection. */ public String getConnectionArn() { return this.connectionArn; } /** *

* The Amazon Resource Name (ARN) of this connection. *

* * @param connectionArn * The Amazon Resource Name (ARN) of this connection. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionSummary withConnectionArn(String connectionArn) { setConnectionArn(connectionArn); return this; } /** *

* The source repository provider. *

* * @param providerType * The source repository provider. * @see ProviderType */ public void setProviderType(String providerType) { this.providerType = providerType; } /** *

* The source repository provider. *

* * @return The source repository provider. * @see ProviderType */ public String getProviderType() { return this.providerType; } /** *

* The source repository provider. *

* * @param providerType * The source repository provider. * @return Returns a reference to this object so that method calls can be chained together. * @see ProviderType */ public ConnectionSummary withProviderType(String providerType) { setProviderType(providerType); return this; } /** *

* The source repository provider. *

* * @param providerType * The source repository provider. * @return Returns a reference to this object so that method calls can be chained together. * @see ProviderType */ public ConnectionSummary withProviderType(ProviderType providerType) { this.providerType = providerType.toString(); return this; } /** *

* The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. *

* * @param status * The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. * @see ConnectionStatus */ public void setStatus(String status) { this.status = status; } /** *

* The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. *

* * @return The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. * @see ConnectionStatus */ public String getStatus() { return this.status; } /** *

* The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. *

* * @param status * The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectionStatus */ public ConnectionSummary withStatus(String status) { setStatus(status); return this; } /** *

* The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. *

* * @param status * The current state of the App Runner connection. When the state is AVAILABLE, you can use the * connection to create an App Runner service. * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectionStatus */ public ConnectionSummary withStatus(ConnectionStatus status) { this.status = status.toString(); return this; } /** *

* The App Runner connection creation time, expressed as a Unix time stamp. *

* * @param createdAt * The App Runner connection creation time, expressed as a Unix time stamp. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The App Runner connection creation time, expressed as a Unix time stamp. *

* * @return The App Runner connection creation time, expressed as a Unix time stamp. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The App Runner connection creation time, expressed as a Unix time stamp. *

* * @param createdAt * The App Runner connection creation time, expressed as a Unix time stamp. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionSummary withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); 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 (getConnectionName() != null) sb.append("ConnectionName: ").append(getConnectionName()).append(","); if (getConnectionArn() != null) sb.append("ConnectionArn: ").append(getConnectionArn()).append(","); if (getProviderType() != null) sb.append("ProviderType: ").append(getProviderType()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConnectionSummary == false) return false; ConnectionSummary other = (ConnectionSummary) obj; if (other.getConnectionName() == null ^ this.getConnectionName() == null) return false; if (other.getConnectionName() != null && other.getConnectionName().equals(this.getConnectionName()) == false) return false; if (other.getConnectionArn() == null ^ this.getConnectionArn() == null) return false; if (other.getConnectionArn() != null && other.getConnectionArn().equals(this.getConnectionArn()) == false) return false; if (other.getProviderType() == null ^ this.getProviderType() == null) return false; if (other.getProviderType() != null && other.getProviderType().equals(this.getProviderType()) == 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.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConnectionName() == null) ? 0 : getConnectionName().hashCode()); hashCode = prime * hashCode + ((getConnectionArn() == null) ? 0 : getConnectionArn().hashCode()); hashCode = prime * hashCode + ((getProviderType() == null) ? 0 : getProviderType().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); return hashCode; } @Override public ConnectionSummary clone() { try { return (ConnectionSummary) 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.apprunner.model.transform.ConnectionSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }