/* * Copyright 2018-2023 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; /** *
* The details about a member account. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Member implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Web Services account ID of the member account. *
*/ private String accountId; /** ** The email address of the member account. *
*/ private String email; /** *
* This is replaced by AdministratorID
.
*
* The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
*/ @Deprecated private String masterId; /** ** The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
*/ private String administratorId; /** ** The status of the relationship between the member account and its administrator account. *
** The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet invited
* the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member account
* has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web Services at
* the same time that the administrator account tried to enable the organization account as a member account.
*
* A timestamp for the date and time when the invitation was sent to the member account. *
*/ private java.util.Date invitedAt; /** ** The timestamp for the date and time when the member account was updated. *
*/ private java.util.Date updatedAt; /** ** The Amazon Web Services account ID of the member account. *
* * @param accountId * The Amazon Web Services account ID of the member account. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** ** The Amazon Web Services account ID of the member account. *
* * @return The Amazon Web Services account ID of the member account. */ public String getAccountId() { return this.accountId; } /** ** The Amazon Web Services account ID of the member account. *
* * @param accountId * The Amazon Web Services account ID of the member account. * @return Returns a reference to this object so that method calls can be chained together. */ public Member withAccountId(String accountId) { setAccountId(accountId); return this; } /** ** The email address of the member account. *
* * @param email * The email address of the member account. */ public void setEmail(String email) { this.email = email; } /** ** The email address of the member account. *
* * @return The email address of the member account. */ public String getEmail() { return this.email; } /** ** The email address of the member account. *
* * @param email * The email address of the member account. * @return Returns a reference to this object so that method calls can be chained together. */ public Member withEmail(String email) { setEmail(email); return this; } /** *
* This is replaced by AdministratorID
.
*
* The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
* * @param masterId * This is replaced byAdministratorID
.
* * The Amazon Web Services account ID of the Security Hub administrator account associated with this member * account. */ @Deprecated public void setMasterId(String masterId) { this.masterId = masterId; } /** *
* This is replaced by AdministratorID
.
*
* The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
* * @return This is replaced byAdministratorID
.
* * The Amazon Web Services account ID of the Security Hub administrator account associated with this member * account. */ @Deprecated public String getMasterId() { return this.masterId; } /** *
* This is replaced by AdministratorID
.
*
* The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
* * @param masterId * This is replaced byAdministratorID
.
* * The Amazon Web Services account ID of the Security Hub administrator account associated with this member * account. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public Member withMasterId(String masterId) { setMasterId(masterId); return this; } /** *
* The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
* * @param administratorId * The Amazon Web Services account ID of the Security Hub administrator account associated with this member * account. */ public void setAdministratorId(String administratorId) { this.administratorId = administratorId; } /** ** The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
* * @return The Amazon Web Services account ID of the Security Hub administrator account associated with this member * account. */ public String getAdministratorId() { return this.administratorId; } /** ** The Amazon Web Services account ID of the Security Hub administrator account associated with this member account. *
* * @param administratorId * The Amazon Web Services account ID of the Security Hub administrator account associated with this member * account. * @return Returns a reference to this object so that method calls can be chained together. */ public Member withAdministratorId(String administratorId) { setAdministratorId(administratorId); return this; } /** ** The status of the relationship between the member account and its administrator account. *
** The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet invited
* the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member account
* has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web Services at
* the same time that the administrator account tried to enable the organization account as a member account.
*
* The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet
* invited the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member
* account has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web
* Services at the same time that the administrator account tried to enable the organization account as a
* member account.
*
* The status of the relationship between the member account and its administrator account. *
** The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet invited
* the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member account
* has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web Services at
* the same time that the administrator account tried to enable the organization account as a member account.
*
* The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet
* invited the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member
* account has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web
* Services at the same time that the administrator account tried to enable the organization account as a
* member account.
*
* The status of the relationship between the member account and its administrator account. *
** The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet invited
* the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member account
* has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web Services at
* the same time that the administrator account tried to enable the organization account as a member account.
*
* The status can have one of the following values: *
*
* Created
- Indicates that the administrator account added the member account, but has not yet
* invited the member account.
*
* Invited
- Indicates that the administrator account invited the member account. The member
* account has not yet responded to the invitation.
*
* Enabled
- Indicates that the member account is currently active. For manually invited member
* accounts, indicates that the member account accepted the invitation.
*
* Removed
- Indicates that the administrator account disassociated the member account.
*
* Resigned
- Indicates that the member account disassociated themselves from the administrator
* account.
*
* Deleted
- Indicates that the administrator account deleted the member account.
*
* AccountSuspended
- Indicates that an organization account was suspended from Amazon Web
* Services at the same time that the administrator account tried to enable the organization account as a
* member account.
*
* A timestamp for the date and time when the invitation was sent to the member account. *
* * @param invitedAt * A timestamp for the date and time when the invitation was sent to the member account. */ public void setInvitedAt(java.util.Date invitedAt) { this.invitedAt = invitedAt; } /** ** A timestamp for the date and time when the invitation was sent to the member account. *
* * @return A timestamp for the date and time when the invitation was sent to the member account. */ public java.util.Date getInvitedAt() { return this.invitedAt; } /** ** A timestamp for the date and time when the invitation was sent to the member account. *
* * @param invitedAt * A timestamp for the date and time when the invitation was sent to the member account. * @return Returns a reference to this object so that method calls can be chained together. */ public Member withInvitedAt(java.util.Date invitedAt) { setInvitedAt(invitedAt); return this; } /** ** The timestamp for the date and time when the member account was updated. *
* * @param updatedAt * The timestamp for the date and time when the member account was updated. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** ** The timestamp for the date and time when the member account was updated. *
* * @return The timestamp for the date and time when the member account was updated. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** ** The timestamp for the date and time when the member account was updated. *
* * @param updatedAt * The timestamp for the date and time when the member account was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public Member withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); 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 (getAccountId() != null) sb.append("AccountId: ").append(getAccountId()).append(","); if (getEmail() != null) sb.append("Email: ").append(getEmail()).append(","); if (getMasterId() != null) sb.append("MasterId: ").append(getMasterId()).append(","); if (getAdministratorId() != null) sb.append("AdministratorId: ").append(getAdministratorId()).append(","); if (getMemberStatus() != null) sb.append("MemberStatus: ").append(getMemberStatus()).append(","); if (getInvitedAt() != null) sb.append("InvitedAt: ").append(getInvitedAt()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Member == false) return false; Member other = (Member) obj; if (other.getAccountId() == null ^ this.getAccountId() == null) return false; if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false) return false; if (other.getEmail() == null ^ this.getEmail() == null) return false; if (other.getEmail() != null && other.getEmail().equals(this.getEmail()) == false) return false; if (other.getMasterId() == null ^ this.getMasterId() == null) return false; if (other.getMasterId() != null && other.getMasterId().equals(this.getMasterId()) == false) return false; if (other.getAdministratorId() == null ^ this.getAdministratorId() == null) return false; if (other.getAdministratorId() != null && other.getAdministratorId().equals(this.getAdministratorId()) == false) return false; if (other.getMemberStatus() == null ^ this.getMemberStatus() == null) return false; if (other.getMemberStatus() != null && other.getMemberStatus().equals(this.getMemberStatus()) == false) return false; if (other.getInvitedAt() == null ^ this.getInvitedAt() == null) return false; if (other.getInvitedAt() != null && other.getInvitedAt().equals(this.getInvitedAt()) == false) return false; if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode()); hashCode = prime * hashCode + ((getEmail() == null) ? 0 : getEmail().hashCode()); hashCode = prime * hashCode + ((getMasterId() == null) ? 0 : getMasterId().hashCode()); hashCode = prime * hashCode + ((getAdministratorId() == null) ? 0 : getAdministratorId().hashCode()); hashCode = prime * hashCode + ((getMemberStatus() == null) ? 0 : getMemberStatus().hashCode()); hashCode = prime * hashCode + ((getInvitedAt() == null) ? 0 : getInvitedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); return hashCode; } @Override public Member clone() { try { return (Member) 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.MemberMarshaller.getInstance().marshall(this, protocolMarshaller); } }