All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.workspaces.model.ConnectionAlias Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon WorkSpaces module holds the client classes that are used for communicating with Amazon WorkSpaces Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2016-2021 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.workspaces.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a connection alias. Connection aliases are used for cross-Region redirection. For more information, see Cross-Region * Redirection for Amazon WorkSpaces. *

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

* The connection string specified for the connection alias. The connection string must be in the form of a fully * qualified domain name (FQDN), such as www.example.com. *

*/ private String connectionString; /** *

* The identifier of the connection alias. *

*/ private String aliasId; /** *

* The current state of the connection alias. *

*/ private String state; /** *

* The identifier of the AWS account that owns the connection alias. *

*/ private String ownerAccountId; /** *

* The association status of the connection alias. *

*/ private com.amazonaws.internal.SdkInternalList associations; /** *

* The connection string specified for the connection alias. The connection string must be in the form of a fully * qualified domain name (FQDN), such as www.example.com. *

* * @param connectionString * The connection string specified for the connection alias. The connection string must be in the form of a * fully qualified domain name (FQDN), such as www.example.com. */ public void setConnectionString(String connectionString) { this.connectionString = connectionString; } /** *

* The connection string specified for the connection alias. The connection string must be in the form of a fully * qualified domain name (FQDN), such as www.example.com. *

* * @return The connection string specified for the connection alias. The connection string must be in the form of a * fully qualified domain name (FQDN), such as www.example.com. */ public String getConnectionString() { return this.connectionString; } /** *

* The connection string specified for the connection alias. The connection string must be in the form of a fully * qualified domain name (FQDN), such as www.example.com. *

* * @param connectionString * The connection string specified for the connection alias. The connection string must be in the form of a * fully qualified domain name (FQDN), such as www.example.com. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionAlias withConnectionString(String connectionString) { setConnectionString(connectionString); return this; } /** *

* The identifier of the connection alias. *

* * @param aliasId * The identifier of the connection alias. */ public void setAliasId(String aliasId) { this.aliasId = aliasId; } /** *

* The identifier of the connection alias. *

* * @return The identifier of the connection alias. */ public String getAliasId() { return this.aliasId; } /** *

* The identifier of the connection alias. *

* * @param aliasId * The identifier of the connection alias. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionAlias withAliasId(String aliasId) { setAliasId(aliasId); return this; } /** *

* The current state of the connection alias. *

* * @param state * The current state of the connection alias. * @see ConnectionAliasState */ public void setState(String state) { this.state = state; } /** *

* The current state of the connection alias. *

* * @return The current state of the connection alias. * @see ConnectionAliasState */ public String getState() { return this.state; } /** *

* The current state of the connection alias. *

* * @param state * The current state of the connection alias. * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectionAliasState */ public ConnectionAlias withState(String state) { setState(state); return this; } /** *

* The current state of the connection alias. *

* * @param state * The current state of the connection alias. * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectionAliasState */ public ConnectionAlias withState(ConnectionAliasState state) { this.state = state.toString(); return this; } /** *

* The identifier of the AWS account that owns the connection alias. *

* * @param ownerAccountId * The identifier of the AWS account that owns the connection alias. */ public void setOwnerAccountId(String ownerAccountId) { this.ownerAccountId = ownerAccountId; } /** *

* The identifier of the AWS account that owns the connection alias. *

* * @return The identifier of the AWS account that owns the connection alias. */ public String getOwnerAccountId() { return this.ownerAccountId; } /** *

* The identifier of the AWS account that owns the connection alias. *

* * @param ownerAccountId * The identifier of the AWS account that owns the connection alias. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionAlias withOwnerAccountId(String ownerAccountId) { setOwnerAccountId(ownerAccountId); return this; } /** *

* The association status of the connection alias. *

* * @return The association status of the connection alias. */ public java.util.List getAssociations() { if (associations == null) { associations = new com.amazonaws.internal.SdkInternalList(); } return associations; } /** *

* The association status of the connection alias. *

* * @param associations * The association status of the connection alias. */ public void setAssociations(java.util.Collection associations) { if (associations == null) { this.associations = null; return; } this.associations = new com.amazonaws.internal.SdkInternalList(associations); } /** *

* The association status of the connection alias. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAssociations(java.util.Collection)} or {@link #withAssociations(java.util.Collection)} if you want to * override the existing values. *

* * @param associations * The association status of the connection alias. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionAlias withAssociations(ConnectionAliasAssociation... associations) { if (this.associations == null) { setAssociations(new com.amazonaws.internal.SdkInternalList(associations.length)); } for (ConnectionAliasAssociation ele : associations) { this.associations.add(ele); } return this; } /** *

* The association status of the connection alias. *

* * @param associations * The association status of the connection alias. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionAlias withAssociations(java.util.Collection associations) { setAssociations(associations); 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 (getConnectionString() != null) sb.append("ConnectionString: ").append(getConnectionString()).append(","); if (getAliasId() != null) sb.append("AliasId: ").append(getAliasId()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getOwnerAccountId() != null) sb.append("OwnerAccountId: ").append(getOwnerAccountId()).append(","); if (getAssociations() != null) sb.append("Associations: ").append(getAssociations()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConnectionAlias == false) return false; ConnectionAlias other = (ConnectionAlias) obj; if (other.getConnectionString() == null ^ this.getConnectionString() == null) return false; if (other.getConnectionString() != null && other.getConnectionString().equals(this.getConnectionString()) == false) return false; if (other.getAliasId() == null ^ this.getAliasId() == null) return false; if (other.getAliasId() != null && other.getAliasId().equals(this.getAliasId()) == 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.getOwnerAccountId() == null ^ this.getOwnerAccountId() == null) return false; if (other.getOwnerAccountId() != null && other.getOwnerAccountId().equals(this.getOwnerAccountId()) == false) return false; if (other.getAssociations() == null ^ this.getAssociations() == null) return false; if (other.getAssociations() != null && other.getAssociations().equals(this.getAssociations()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConnectionString() == null) ? 0 : getConnectionString().hashCode()); hashCode = prime * hashCode + ((getAliasId() == null) ? 0 : getAliasId().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getOwnerAccountId() == null) ? 0 : getOwnerAccountId().hashCode()); hashCode = prime * hashCode + ((getAssociations() == null) ? 0 : getAssociations().hashCode()); return hashCode; } @Override public ConnectionAlias clone() { try { return (ConnectionAlias) 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.workspaces.model.transform.ConnectionAliasMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy