/* * 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.config.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Organization Config rule creation or deletion status in each member account. This includes the name of the rule, the * status, error code and error message when the rule creation or deletion failed. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class MemberAccountStatus implements Serializable, Cloneable, StructuredPojo { /** ** The 12-digit account ID of a member account. *
*/ private String accountId; /** ** The name of Config rule deployed in the member account. *
*/ private String configRuleName; /** *
* Indicates deployment status for Config rule in the member account. When management account calls
* PutOrganizationConfigRule
action for the first time, Config rule status is created in the member
* account. When management account calls PutOrganizationConfigRule
action for the second time, Config
* rule status is updated in the member account. Config rule status is deleted when the management account deletes
* OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
*
* Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
* An error code that is returned when Config rule creation or deletion failed in the member account. *
*/ private String errorCode; /** ** An error message indicating that Config rule account creation or deletion has failed due to an error in the * member account. *
*/ private String errorMessage; /** ** The timestamp of the last status update. *
*/ private java.util.Date lastUpdateTime; /** ** The 12-digit account ID of a member account. *
* * @param accountId * The 12-digit account ID of a member account. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** ** The 12-digit account ID of a member account. *
* * @return The 12-digit account ID of a member account. */ public String getAccountId() { return this.accountId; } /** ** The 12-digit account ID of a member account. *
* * @param accountId * The 12-digit account ID of a member account. * @return Returns a reference to this object so that method calls can be chained together. */ public MemberAccountStatus withAccountId(String accountId) { setAccountId(accountId); return this; } /** ** The name of Config rule deployed in the member account. *
* * @param configRuleName * The name of Config rule deployed in the member account. */ public void setConfigRuleName(String configRuleName) { this.configRuleName = configRuleName; } /** ** The name of Config rule deployed in the member account. *
* * @return The name of Config rule deployed in the member account. */ public String getConfigRuleName() { return this.configRuleName; } /** ** The name of Config rule deployed in the member account. *
* * @param configRuleName * The name of Config rule deployed in the member account. * @return Returns a reference to this object so that method calls can be chained together. */ public MemberAccountStatus withConfigRuleName(String configRuleName) { setConfigRuleName(configRuleName); return this; } /** *
* Indicates deployment status for Config rule in the member account. When management account calls
* PutOrganizationConfigRule
action for the first time, Config rule status is created in the member
* account. When management account calls PutOrganizationConfigRule
action for the second time, Config
* rule status is updated in the member account. Config rule status is deleted when the management account deletes
* OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
*
* Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
PutOrganizationConfigRule
action for the first time, Config rule status is created in the
* member account. When management account calls PutOrganizationConfigRule
action for the second
* time, Config rule status is updated in the member account. Config rule status is deleted when the
* management account deletes OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
* * Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
* Indicates deployment status for Config rule in the member account. When management account calls
* PutOrganizationConfigRule
action for the first time, Config rule status is created in the member
* account. When management account calls PutOrganizationConfigRule
action for the second time, Config
* rule status is updated in the member account. Config rule status is deleted when the management account deletes
* OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
*
* Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
PutOrganizationConfigRule
action for the first time, Config rule status is created in the
* member account. When management account calls PutOrganizationConfigRule
action for the
* second time, Config rule status is updated in the member account. Config rule status is deleted when the
* management account deletes OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
* * Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
* Indicates deployment status for Config rule in the member account. When management account calls
* PutOrganizationConfigRule
action for the first time, Config rule status is created in the member
* account. When management account calls PutOrganizationConfigRule
action for the second time, Config
* rule status is updated in the member account. Config rule status is deleted when the management account deletes
* OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
*
* Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
PutOrganizationConfigRule
action for the first time, Config rule status is created in the
* member account. When management account calls PutOrganizationConfigRule
action for the second
* time, Config rule status is updated in the member account. Config rule status is deleted when the
* management account deletes OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
* * Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
* Indicates deployment status for Config rule in the member account. When management account calls
* PutOrganizationConfigRule
action for the first time, Config rule status is created in the member
* account. When management account calls PutOrganizationConfigRule
action for the second time, Config
* rule status is updated in the member account. Config rule status is deleted when the management account deletes
* OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
*
* Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
PutOrganizationConfigRule
action for the first time, Config rule status is created in the
* member account. When management account calls PutOrganizationConfigRule
action for the second
* time, Config rule status is updated in the member account. Config rule status is deleted when the
* management account deletes OrganizationConfigRule
and disables service access for
* config-multiaccountsetup.amazonaws.com
.
* * Config sets the state of the rule to: *
*
* CREATE_SUCCESSFUL
when Config rule has been created in the member account.
*
* CREATE_IN_PROGRESS
when Config rule is being created in the member account.
*
* CREATE_FAILED
when Config rule creation has failed in the member account.
*
* DELETE_FAILED
when Config rule deletion has failed in the member account.
*
* DELETE_IN_PROGRESS
when Config rule is being deleted in the member account.
*
* DELETE_SUCCESSFUL
when Config rule has been deleted in the member account.
*
* UPDATE_SUCCESSFUL
when Config rule has been updated in the member account.
*
* UPDATE_IN_PROGRESS
when Config rule is being updated in the member account.
*
* UPDATE_FAILED
when Config rule deletion has failed in the member account.
*
* An error code that is returned when Config rule creation or deletion failed in the member account. *
* * @param errorCode * An error code that is returned when Config rule creation or deletion failed in the member account. */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** ** An error code that is returned when Config rule creation or deletion failed in the member account. *
* * @return An error code that is returned when Config rule creation or deletion failed in the member account. */ public String getErrorCode() { return this.errorCode; } /** ** An error code that is returned when Config rule creation or deletion failed in the member account. *
* * @param errorCode * An error code that is returned when Config rule creation or deletion failed in the member account. * @return Returns a reference to this object so that method calls can be chained together. */ public MemberAccountStatus withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } /** ** An error message indicating that Config rule account creation or deletion has failed due to an error in the * member account. *
* * @param errorMessage * An error message indicating that Config rule account creation or deletion has failed due to an error in * the member account. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** ** An error message indicating that Config rule account creation or deletion has failed due to an error in the * member account. *
* * @return An error message indicating that Config rule account creation or deletion has failed due to an error in * the member account. */ public String getErrorMessage() { return this.errorMessage; } /** ** An error message indicating that Config rule account creation or deletion has failed due to an error in the * member account. *
* * @param errorMessage * An error message indicating that Config rule account creation or deletion has failed due to an error in * the member account. * @return Returns a reference to this object so that method calls can be chained together. */ public MemberAccountStatus withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); return this; } /** ** The timestamp of the last status update. *
* * @param lastUpdateTime * The timestamp of the last status update. */ public void setLastUpdateTime(java.util.Date lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } /** ** The timestamp of the last status update. *
* * @return The timestamp of the last status update. */ public java.util.Date getLastUpdateTime() { return this.lastUpdateTime; } /** ** The timestamp of the last status update. *
* * @param lastUpdateTime * The timestamp of the last status update. * @return Returns a reference to this object so that method calls can be chained together. */ public MemberAccountStatus withLastUpdateTime(java.util.Date lastUpdateTime) { setLastUpdateTime(lastUpdateTime); 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 (getConfigRuleName() != null) sb.append("ConfigRuleName: ").append(getConfigRuleName()).append(","); if (getMemberAccountRuleStatus() != null) sb.append("MemberAccountRuleStatus: ").append(getMemberAccountRuleStatus()).append(","); if (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()).append(","); if (getLastUpdateTime() != null) sb.append("LastUpdateTime: ").append(getLastUpdateTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof MemberAccountStatus == false) return false; MemberAccountStatus other = (MemberAccountStatus) obj; if (other.getAccountId() == null ^ this.getAccountId() == null) return false; if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false) return false; if (other.getConfigRuleName() == null ^ this.getConfigRuleName() == null) return false; if (other.getConfigRuleName() != null && other.getConfigRuleName().equals(this.getConfigRuleName()) == false) return false; if (other.getMemberAccountRuleStatus() == null ^ this.getMemberAccountRuleStatus() == null) return false; if (other.getMemberAccountRuleStatus() != null && other.getMemberAccountRuleStatus().equals(this.getMemberAccountRuleStatus()) == false) return false; if (other.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; if (other.getLastUpdateTime() == null ^ this.getLastUpdateTime() == null) return false; if (other.getLastUpdateTime() != null && other.getLastUpdateTime().equals(this.getLastUpdateTime()) == 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 + ((getConfigRuleName() == null) ? 0 : getConfigRuleName().hashCode()); hashCode = prime * hashCode + ((getMemberAccountRuleStatus() == null) ? 0 : getMemberAccountRuleStatus().hashCode()); hashCode = prime * hashCode + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); hashCode = prime * hashCode + ((getLastUpdateTime() == null) ? 0 : getLastUpdateTime().hashCode()); return hashCode; } @Override public MemberAccountStatus clone() { try { return (MemberAccountStatus) 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.config.model.transform.MemberAccountStatusMarshaller.getInstance().marshall(this, protocolMarshaller); } }