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 CreateUserProfile operation.

Creates a new 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 CreateUserProfileRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The user's 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 public SSH key.
 
     private String sshPublicKey;

    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User's Public SSH Key.
 
     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 CreateUserProfileRequest 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 CreateUserProfileRequest withSshUsername(String sshUsername) {
        this. = sshUsername;
        return this;
    }

    
The user's public SSH key.

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

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

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

Parameters:
sshPublicKey The user's public SSH key.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateUserProfileRequest 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 Setting an IAM User's Public SSH Key.

Returns:
Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User's Public SSH Key.
    public Boolean isAllowSelfManagement() {
        return ;
    }
    
    
Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User's Public SSH Key.

Parameters:
allowSelfManagement Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User's Public SSH Key.
    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 Setting an IAM User's Public SSH Key.

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 Setting an IAM User's Public SSH Key.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateUserProfileRequest 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 Setting an IAM User's Public SSH Key.

Returns:
Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User's Public SSH Key.
    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 CreateUserProfileRequest == falsereturn false;
        CreateUserProfileRequest other = (CreateUserProfileRequest)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 CreateUserProfileRequest clone() {
        
            return (CreateUserProfileRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X