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;
 
 
Container for the parameters to the UpdateUserProfile operation.

Updates a specified user profile.

Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .

 
 public class UpdateUserProfileRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The user IAM ARN.
 
     private String iamUserArn;

    
The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.
 
     private String sshUsername;

    
The user's new 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 IAM ARN.

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

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

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

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

    
The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.

Returns:
The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.
    public String getSshUsername() {
        return ;
    }
    
    
The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.

Parameters:
sshUsername The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.
    public void setSshUsername(String sshUsername) {
        this. = sshUsername;
    }
    
    
The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.

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

Parameters:
sshUsername The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, AWS OpsWorks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks generates one from the IAM user name.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateUserProfileRequest withSshUsername(String sshUsername) {
        this. = sshUsername;
        return this;
    }

    
The user's new SSH public key.

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

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

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

Parameters:
sshPublicKey The user's new SSH public key.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateUserProfileRequest 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 UpdateUserProfileRequest 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 (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 + ((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 UpdateUserProfileRequest == falsereturn false;
        UpdateUserProfileRequest other = (UpdateUserProfileRequest)obj;
        
        if (other.getIamUserArn() == null ^ this.getIamUserArn() == nullreturn false;
        if (other.getIamUserArn() != null && other.getIamUserArn().equals(this.getIamUserArn()) == 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 UpdateUserProfileRequest clone() {
        
            return (UpdateUserProfileRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X