com.amazonaws.services.workspaces.model.UpdateConnectionAliasPermissionRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workspaces Show documentation
/*
* Copyright 2019-2024 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.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateConnectionAliasPermissionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The identifier of the connection alias that you want to update permissions for.
*
*/
private String aliasId;
/**
*
* Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.
*
*/
private ConnectionAliasPermission connectionAliasPermission;
/**
*
* The identifier of the connection alias that you want to update permissions for.
*
*
* @param aliasId
* The identifier of the connection alias that you want to update permissions for.
*/
public void setAliasId(String aliasId) {
this.aliasId = aliasId;
}
/**
*
* The identifier of the connection alias that you want to update permissions for.
*
*
* @return The identifier of the connection alias that you want to update permissions for.
*/
public String getAliasId() {
return this.aliasId;
}
/**
*
* The identifier of the connection alias that you want to update permissions for.
*
*
* @param aliasId
* The identifier of the connection alias that you want to update permissions for.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateConnectionAliasPermissionRequest withAliasId(String aliasId) {
setAliasId(aliasId);
return this;
}
/**
*
* Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.
*
*
* @param connectionAliasPermission
* Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.
*/
public void setConnectionAliasPermission(ConnectionAliasPermission connectionAliasPermission) {
this.connectionAliasPermission = connectionAliasPermission;
}
/**
*
* Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.
*
*
* @return Indicates whether to share or unshare the connection alias with the specified Amazon Web Services
* account.
*/
public ConnectionAliasPermission getConnectionAliasPermission() {
return this.connectionAliasPermission;
}
/**
*
* Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.
*
*
* @param connectionAliasPermission
* Indicates whether to share or unshare the connection alias with the specified Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateConnectionAliasPermissionRequest withConnectionAliasPermission(ConnectionAliasPermission connectionAliasPermission) {
setConnectionAliasPermission(connectionAliasPermission);
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 (getAliasId() != null)
sb.append("AliasId: ").append(getAliasId()).append(",");
if (getConnectionAliasPermission() != null)
sb.append("ConnectionAliasPermission: ").append(getConnectionAliasPermission());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateConnectionAliasPermissionRequest == false)
return false;
UpdateConnectionAliasPermissionRequest other = (UpdateConnectionAliasPermissionRequest) obj;
if (other.getAliasId() == null ^ this.getAliasId() == null)
return false;
if (other.getAliasId() != null && other.getAliasId().equals(this.getAliasId()) == false)
return false;
if (other.getConnectionAliasPermission() == null ^ this.getConnectionAliasPermission() == null)
return false;
if (other.getConnectionAliasPermission() != null && other.getConnectionAliasPermission().equals(this.getConnectionAliasPermission()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAliasId() == null) ? 0 : getAliasId().hashCode());
hashCode = prime * hashCode + ((getConnectionAliasPermission() == null) ? 0 : getConnectionAliasPermission().hashCode());
return hashCode;
}
@Override
public UpdateConnectionAliasPermissionRequest clone() {
return (UpdateConnectionAliasPermissionRequest) super.clone();
}
}