Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.opsworks.model;
 

Describes a user's SSH information.

 
 public class UserProfile implements SerializableCloneable {

    
The user's IAM ARN.
 
     private String iamUserArn;

    
The user's name.
 
     private String name;

    
The user's SSH user name.
 
     private String sshUsername;

    
The user's SSH public key.
 
     private String sshPublicKey;

    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.
 
     private Boolean allowSelfManagement;

    
The user's IAM ARN.

Returns:
The user's IAM ARN.
 
     public String getIamUserArn() {
         return ;
     }
    
    
The user's IAM ARN.

Parameters:
iamUserArn The user's IAM ARN.
 
     public void setIamUserArn(String iamUserArn) {
         this. = iamUserArn;
     }
    
    
The user's IAM ARN.

Returns a reference to this object so that method calls can be chained together.

Parameters:
iamUserArn The user's IAM ARN.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public UserProfile withIamUserArn(String iamUserArn) {
         this. = iamUserArn;
         return this;
     }

    
The user's name.

Returns:
The user's name.
 
     public String getName() {
         return ;
     }
    
    
The user's name.

Parameters:
name The user's name.
    public void setName(String name) {
        this. = name;
    }
    
    
The user's name.

Returns a reference to this object so that method calls can be chained together.

Parameters:
name The user's name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UserProfile withName(String name) {
        this. = name;
        return this;
    }

    
The user's SSH user name.

Returns:
The user's SSH user name.
    public String getSshUsername() {
        return ;
    }
    
    
The user's SSH user name.

Parameters:
sshUsername The user's SSH user name.
    public void setSshUsername(String sshUsername) {
        this. = sshUsername;
    }
    
    
The user's SSH user name.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sshUsername The user's SSH user name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UserProfile withSshUsername(String sshUsername) {
        this. = sshUsername;
        return this;
    }

    
The user's SSH public key.

Returns:
The user's SSH public key.
    public String getSshPublicKey() {
        return ;
    }
    
    
The user's SSH public key.

Parameters:
sshPublicKey The user's SSH public key.
    public void setSshPublicKey(String sshPublicKey) {
        this. = sshPublicKey;
    }
    
    
The user's SSH public key.

Returns a reference to this object so that method calls can be chained together.

Parameters:
sshPublicKey The user's SSH public key.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UserProfile withSshPublicKey(String sshPublicKey) {
        this. = sshPublicKey;
        return this;
    }

    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Returns:
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.
    public Boolean isAllowSelfManagement() {
        return ;
    }
    
    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Parameters:
allowSelfManagement Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.
    public void setAllowSelfManagement(Boolean allowSelfManagement) {
        this. = allowSelfManagement;
    }
    
    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Returns a reference to this object so that method calls can be chained together.

Parameters:
allowSelfManagement Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UserProfile withAllowSelfManagement(Boolean allowSelfManagement) {
        this. = allowSelfManagement;
        return this;
    }

    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Returns:
Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.
    public Boolean getAllowSelfManagement() {
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getIamUserArn() != nullsb.append("IamUserArn: " + getIamUserArn() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getSshUsername() != nullsb.append("SshUsername: " + getSshUsername() + ",");
        if (getSshPublicKey() != nullsb.append("SshPublicKey: " + getSshPublicKey() + ",");
        if (isAllowSelfManagement() != nullsb.append("AllowSelfManagement: " + isAllowSelfManagement() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIamUserArn() == null) ? 0 : getIamUserArn().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getSshUsername() == null) ? 0 : getSshUsername().hashCode()); 
        hashCode = prime * hashCode + ((getSshPublicKey() == null) ? 0 : getSshPublicKey().hashCode()); 
        hashCode = prime * hashCode + ((isAllowSelfManagement() == null) ? 0 : isAllowSelfManagement().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UserProfile == falsereturn false;
        UserProfile other = (UserProfile)obj;
        
        if (other.getIamUserArn() == null ^ this.getIamUserArn() == nullreturn false;
        if (other.getIamUserArn() != null && other.getIamUserArn().equals(this.getIamUserArn()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getSshUsername() == null ^ this.getSshUsername() == nullreturn false;
        if (other.getSshUsername() != null && other.getSshUsername().equals(this.getSshUsername()) == falsereturn false
        if (other.getSshPublicKey() == null ^ this.getSshPublicKey() == nullreturn false;
        if (other.getSshPublicKey() != null && other.getSshPublicKey().equals(this.getSshPublicKey()) == falsereturn false
        if (other.isAllowSelfManagement() == null ^ this.isAllowSelfManagement() == nullreturn false;
        if (other.isAllowSelfManagement() != null && other.isAllowSelfManagement().equals(this.isAllowSelfManagement()) == falsereturn false
        return true;
    }
    
    @Override
    public UserProfile clone() {
        try {
            return (UserProfilesuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X