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

com.amazonaws.services.securityhub.model.AwsIamUserDetails Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2017-2022 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.securityhub.model;

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

/**
 * 

* Information about an IAM user. *

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

* A list of the managed policies that are attached to the user. *

*/ private java.util.List attachedManagedPolicies; /** *

* Indicates when the user was created. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

*/ private String createDate; /** *

* A list of IAM groups that the user belongs to. *

*/ private java.util.List groupList; /** *

* The path to the user. *

*/ private String path; /** *

* The permissions boundary for the user. *

*/ private AwsIamPermissionsBoundary permissionsBoundary; /** *

* The unique identifier for the user. *

*/ private String userId; /** *

* The name of the user. *

*/ private String userName; /** *

* The list of inline policies that are embedded in the user. *

*/ private java.util.List userPolicyList; /** *

* A list of the managed policies that are attached to the user. *

* * @return A list of the managed policies that are attached to the user. */ public java.util.List getAttachedManagedPolicies() { return attachedManagedPolicies; } /** *

* A list of the managed policies that are attached to the user. *

* * @param attachedManagedPolicies * A list of the managed policies that are attached to the user. */ public void setAttachedManagedPolicies(java.util.Collection attachedManagedPolicies) { if (attachedManagedPolicies == null) { this.attachedManagedPolicies = null; return; } this.attachedManagedPolicies = new java.util.ArrayList(attachedManagedPolicies); } /** *

* A list of the managed policies that are attached to the user. *

*

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

* * @param attachedManagedPolicies * A list of the managed policies that are attached to the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withAttachedManagedPolicies(AwsIamAttachedManagedPolicy... attachedManagedPolicies) { if (this.attachedManagedPolicies == null) { setAttachedManagedPolicies(new java.util.ArrayList(attachedManagedPolicies.length)); } for (AwsIamAttachedManagedPolicy ele : attachedManagedPolicies) { this.attachedManagedPolicies.add(ele); } return this; } /** *

* A list of the managed policies that are attached to the user. *

* * @param attachedManagedPolicies * A list of the managed policies that are attached to the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withAttachedManagedPolicies(java.util.Collection attachedManagedPolicies) { setAttachedManagedPolicies(attachedManagedPolicies); return this; } /** *

* Indicates when the user was created. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

* * @param createDate * Indicates when the user was created.

*

* Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time * Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z. */ public void setCreateDate(String createDate) { this.createDate = createDate; } /** *

* Indicates when the user was created. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

* * @return Indicates when the user was created.

*

* Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time * Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z. */ public String getCreateDate() { return this.createDate; } /** *

* Indicates when the user was created. *

*

* Uses the date-time format specified in RFC * 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, * 2020-03-22T13:22:13.933Z. *

* * @param createDate * Indicates when the user was created.

*

* Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time * Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withCreateDate(String createDate) { setCreateDate(createDate); return this; } /** *

* A list of IAM groups that the user belongs to. *

* * @return A list of IAM groups that the user belongs to. */ public java.util.List getGroupList() { return groupList; } /** *

* A list of IAM groups that the user belongs to. *

* * @param groupList * A list of IAM groups that the user belongs to. */ public void setGroupList(java.util.Collection groupList) { if (groupList == null) { this.groupList = null; return; } this.groupList = new java.util.ArrayList(groupList); } /** *

* A list of IAM groups that the user belongs to. *

*

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

* * @param groupList * A list of IAM groups that the user belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withGroupList(String... groupList) { if (this.groupList == null) { setGroupList(new java.util.ArrayList(groupList.length)); } for (String ele : groupList) { this.groupList.add(ele); } return this; } /** *

* A list of IAM groups that the user belongs to. *

* * @param groupList * A list of IAM groups that the user belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withGroupList(java.util.Collection groupList) { setGroupList(groupList); return this; } /** *

* The path to the user. *

* * @param path * The path to the user. */ public void setPath(String path) { this.path = path; } /** *

* The path to the user. *

* * @return The path to the user. */ public String getPath() { return this.path; } /** *

* The path to the user. *

* * @param path * The path to the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withPath(String path) { setPath(path); return this; } /** *

* The permissions boundary for the user. *

* * @param permissionsBoundary * The permissions boundary for the user. */ public void setPermissionsBoundary(AwsIamPermissionsBoundary permissionsBoundary) { this.permissionsBoundary = permissionsBoundary; } /** *

* The permissions boundary for the user. *

* * @return The permissions boundary for the user. */ public AwsIamPermissionsBoundary getPermissionsBoundary() { return this.permissionsBoundary; } /** *

* The permissions boundary for the user. *

* * @param permissionsBoundary * The permissions boundary for the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withPermissionsBoundary(AwsIamPermissionsBoundary permissionsBoundary) { setPermissionsBoundary(permissionsBoundary); return this; } /** *

* The unique identifier for the user. *

* * @param userId * The unique identifier for the user. */ public void setUserId(String userId) { this.userId = userId; } /** *

* The unique identifier for the user. *

* * @return The unique identifier for the user. */ public String getUserId() { return this.userId; } /** *

* The unique identifier for the user. *

* * @param userId * The unique identifier for the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withUserId(String userId) { setUserId(userId); return this; } /** *

* The name of the user. *

* * @param userName * The name of the user. */ public void setUserName(String userName) { this.userName = userName; } /** *

* The name of the user. *

* * @return The name of the user. */ public String getUserName() { return this.userName; } /** *

* The name of the user. *

* * @param userName * The name of the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withUserName(String userName) { setUserName(userName); return this; } /** *

* The list of inline policies that are embedded in the user. *

* * @return The list of inline policies that are embedded in the user. */ public java.util.List getUserPolicyList() { return userPolicyList; } /** *

* The list of inline policies that are embedded in the user. *

* * @param userPolicyList * The list of inline policies that are embedded in the user. */ public void setUserPolicyList(java.util.Collection userPolicyList) { if (userPolicyList == null) { this.userPolicyList = null; return; } this.userPolicyList = new java.util.ArrayList(userPolicyList); } /** *

* The list of inline policies that are embedded in the user. *

*

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

* * @param userPolicyList * The list of inline policies that are embedded in the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withUserPolicyList(AwsIamUserPolicy... userPolicyList) { if (this.userPolicyList == null) { setUserPolicyList(new java.util.ArrayList(userPolicyList.length)); } for (AwsIamUserPolicy ele : userPolicyList) { this.userPolicyList.add(ele); } return this; } /** *

* The list of inline policies that are embedded in the user. *

* * @param userPolicyList * The list of inline policies that are embedded in the user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsIamUserDetails withUserPolicyList(java.util.Collection userPolicyList) { setUserPolicyList(userPolicyList); 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 (getAttachedManagedPolicies() != null) sb.append("AttachedManagedPolicies: ").append(getAttachedManagedPolicies()).append(","); if (getCreateDate() != null) sb.append("CreateDate: ").append(getCreateDate()).append(","); if (getGroupList() != null) sb.append("GroupList: ").append(getGroupList()).append(","); if (getPath() != null) sb.append("Path: ").append(getPath()).append(","); if (getPermissionsBoundary() != null) sb.append("PermissionsBoundary: ").append(getPermissionsBoundary()).append(","); if (getUserId() != null) sb.append("UserId: ").append(getUserId()).append(","); if (getUserName() != null) sb.append("UserName: ").append(getUserName()).append(","); if (getUserPolicyList() != null) sb.append("UserPolicyList: ").append(getUserPolicyList()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsIamUserDetails == false) return false; AwsIamUserDetails other = (AwsIamUserDetails) obj; if (other.getAttachedManagedPolicies() == null ^ this.getAttachedManagedPolicies() == null) return false; if (other.getAttachedManagedPolicies() != null && other.getAttachedManagedPolicies().equals(this.getAttachedManagedPolicies()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null) return false; if (other.getCreateDate() != null && other.getCreateDate().equals(this.getCreateDate()) == false) return false; if (other.getGroupList() == null ^ this.getGroupList() == null) return false; if (other.getGroupList() != null && other.getGroupList().equals(this.getGroupList()) == false) return false; if (other.getPath() == null ^ this.getPath() == null) return false; if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; if (other.getPermissionsBoundary() == null ^ this.getPermissionsBoundary() == null) return false; if (other.getPermissionsBoundary() != null && other.getPermissionsBoundary().equals(this.getPermissionsBoundary()) == false) return false; if (other.getUserId() == null ^ this.getUserId() == null) return false; if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == false) return false; if (other.getUserName() == null ^ this.getUserName() == null) return false; if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false) return false; if (other.getUserPolicyList() == null ^ this.getUserPolicyList() == null) return false; if (other.getUserPolicyList() != null && other.getUserPolicyList().equals(this.getUserPolicyList()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttachedManagedPolicies() == null) ? 0 : getAttachedManagedPolicies().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getGroupList() == null) ? 0 : getGroupList().hashCode()); hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getPermissionsBoundary() == null) ? 0 : getPermissionsBoundary().hashCode()); hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getUserPolicyList() == null) ? 0 : getUserPolicyList().hashCode()); return hashCode; } @Override public AwsIamUserDetails clone() { try { return (AwsIamUserDetails) 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.securityhub.model.transform.AwsIamUserDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy