/* * 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.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutOrganizationConfigRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name that you assign to an organization Config rule. *

*/ private String organizationConfigRuleName; /** *

* An OrganizationManagedRuleMetadata object. This object specifies organization managed rule metadata * such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

*/ private OrganizationManagedRuleMetadata organizationManagedRuleMetadata; /** *

* An OrganizationCustomRuleMetadata object. This object specifies organization custom rule metadata * such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger * types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

*/ private OrganizationCustomRuleMetadata organizationCustomRuleMetadata; /** *

* A comma-separated list of accounts that you want to exclude from an organization Config rule. *

*/ private com.amazonaws.internal.SdkInternalList excludedAccounts; /** *

* An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have * debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services * resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a * rule. *

*/ private OrganizationCustomPolicyRuleMetadata organizationCustomPolicyRuleMetadata; /** *

* The name that you assign to an organization Config rule. *

* * @param organizationConfigRuleName * The name that you assign to an organization Config rule. */ public void setOrganizationConfigRuleName(String organizationConfigRuleName) { this.organizationConfigRuleName = organizationConfigRuleName; } /** *

* The name that you assign to an organization Config rule. *

* * @return The name that you assign to an organization Config rule. */ public String getOrganizationConfigRuleName() { return this.organizationConfigRuleName; } /** *

* The name that you assign to an organization Config rule. *

* * @param organizationConfigRuleName * The name that you assign to an organization Config rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutOrganizationConfigRuleRequest withOrganizationConfigRuleName(String organizationConfigRuleName) { setOrganizationConfigRuleName(organizationConfigRuleName); return this; } /** *

* An OrganizationManagedRuleMetadata object. This object specifies organization managed rule metadata * such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

* * @param organizationManagedRuleMetadata * An OrganizationManagedRuleMetadata object. This object specifies organization managed rule * metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It * also provides the frequency with which you want Config to run evaluations for the rule if the trigger type * is periodic. */ public void setOrganizationManagedRuleMetadata(OrganizationManagedRuleMetadata organizationManagedRuleMetadata) { this.organizationManagedRuleMetadata = organizationManagedRuleMetadata; } /** *

* An OrganizationManagedRuleMetadata object. This object specifies organization managed rule metadata * such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

* * @return An OrganizationManagedRuleMetadata object. This object specifies organization managed rule * metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It * also provides the frequency with which you want Config to run evaluations for the rule if the trigger * type is periodic. */ public OrganizationManagedRuleMetadata getOrganizationManagedRuleMetadata() { return this.organizationManagedRuleMetadata; } /** *

* An OrganizationManagedRuleMetadata object. This object specifies organization managed rule metadata * such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

* * @param organizationManagedRuleMetadata * An OrganizationManagedRuleMetadata object. This object specifies organization managed rule * metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It * also provides the frequency with which you want Config to run evaluations for the rule if the trigger type * is periodic. * @return Returns a reference to this object so that method calls can be chained together. */ public PutOrganizationConfigRuleRequest withOrganizationManagedRuleMetadata(OrganizationManagedRuleMetadata organizationManagedRuleMetadata) { setOrganizationManagedRuleMetadata(organizationManagedRuleMetadata); return this; } /** *

* An OrganizationCustomRuleMetadata object. This object specifies organization custom rule metadata * such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger * types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

* * @param organizationCustomRuleMetadata * An OrganizationCustomRuleMetadata object. This object specifies organization custom rule * metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and * organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a * rule. It also provides the frequency with which you want Config to run evaluations for the rule if the * trigger type is periodic. */ public void setOrganizationCustomRuleMetadata(OrganizationCustomRuleMetadata organizationCustomRuleMetadata) { this.organizationCustomRuleMetadata = organizationCustomRuleMetadata; } /** *

* An OrganizationCustomRuleMetadata object. This object specifies organization custom rule metadata * such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger * types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

* * @return An OrganizationCustomRuleMetadata object. This object specifies organization custom rule * metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and * organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a * rule. It also provides the frequency with which you want Config to run evaluations for the rule if the * trigger type is periodic. */ public OrganizationCustomRuleMetadata getOrganizationCustomRuleMetadata() { return this.organizationCustomRuleMetadata; } /** *

* An OrganizationCustomRuleMetadata object. This object specifies organization custom rule metadata * such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger * types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the * frequency with which you want Config to run evaluations for the rule if the trigger type is periodic. *

* * @param organizationCustomRuleMetadata * An OrganizationCustomRuleMetadata object. This object specifies organization custom rule * metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and * organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a * rule. It also provides the frequency with which you want Config to run evaluations for the rule if the * trigger type is periodic. * @return Returns a reference to this object so that method calls can be chained together. */ public PutOrganizationConfigRuleRequest withOrganizationCustomRuleMetadata(OrganizationCustomRuleMetadata organizationCustomRuleMetadata) { setOrganizationCustomRuleMetadata(organizationCustomRuleMetadata); return this; } /** *

* A comma-separated list of accounts that you want to exclude from an organization Config rule. *

* * @return A comma-separated list of accounts that you want to exclude from an organization Config rule. */ public java.util.List getExcludedAccounts() { if (excludedAccounts == null) { excludedAccounts = new com.amazonaws.internal.SdkInternalList(); } return excludedAccounts; } /** *

* A comma-separated list of accounts that you want to exclude from an organization Config rule. *

* * @param excludedAccounts * A comma-separated list of accounts that you want to exclude from an organization Config rule. */ public void setExcludedAccounts(java.util.Collection excludedAccounts) { if (excludedAccounts == null) { this.excludedAccounts = null; return; } this.excludedAccounts = new com.amazonaws.internal.SdkInternalList(excludedAccounts); } /** *

* A comma-separated list of accounts that you want to exclude from an organization Config rule. *

*

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

* * @param excludedAccounts * A comma-separated list of accounts that you want to exclude from an organization Config rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutOrganizationConfigRuleRequest withExcludedAccounts(String... excludedAccounts) { if (this.excludedAccounts == null) { setExcludedAccounts(new com.amazonaws.internal.SdkInternalList(excludedAccounts.length)); } for (String ele : excludedAccounts) { this.excludedAccounts.add(ele); } return this; } /** *

* A comma-separated list of accounts that you want to exclude from an organization Config rule. *

* * @param excludedAccounts * A comma-separated list of accounts that you want to exclude from an organization Config rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutOrganizationConfigRuleRequest withExcludedAccounts(java.util.Collection excludedAccounts) { setExcludedAccounts(excludedAccounts); return this; } /** *

* An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have * debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services * resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a * rule. *

* * @param organizationCustomPolicyRuleMetadata * An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts * have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon * Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services * resources against a rule. */ public void setOrganizationCustomPolicyRuleMetadata(OrganizationCustomPolicyRuleMetadata organizationCustomPolicyRuleMetadata) { this.organizationCustomPolicyRuleMetadata = organizationCustomPolicyRuleMetadata; } /** *

* An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have * debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services * resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a * rule. *

* * @return An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts * have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon * Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web * Services resources against a rule. */ public OrganizationCustomPolicyRuleMetadata getOrganizationCustomPolicyRuleMetadata() { return this.organizationCustomPolicyRuleMetadata; } /** *

* An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have * debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services * resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a * rule. *

* * @param organizationCustomPolicyRuleMetadata * An OrganizationCustomPolicyRuleMetadata object. This object specifies metadata for your * organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts * have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon * Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services * resources against a rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutOrganizationConfigRuleRequest withOrganizationCustomPolicyRuleMetadata(OrganizationCustomPolicyRuleMetadata organizationCustomPolicyRuleMetadata) { setOrganizationCustomPolicyRuleMetadata(organizationCustomPolicyRuleMetadata); 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 (getOrganizationConfigRuleName() != null) sb.append("OrganizationConfigRuleName: ").append(getOrganizationConfigRuleName()).append(","); if (getOrganizationManagedRuleMetadata() != null) sb.append("OrganizationManagedRuleMetadata: ").append(getOrganizationManagedRuleMetadata()).append(","); if (getOrganizationCustomRuleMetadata() != null) sb.append("OrganizationCustomRuleMetadata: ").append(getOrganizationCustomRuleMetadata()).append(","); if (getExcludedAccounts() != null) sb.append("ExcludedAccounts: ").append(getExcludedAccounts()).append(","); if (getOrganizationCustomPolicyRuleMetadata() != null) sb.append("OrganizationCustomPolicyRuleMetadata: ").append(getOrganizationCustomPolicyRuleMetadata()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutOrganizationConfigRuleRequest == false) return false; PutOrganizationConfigRuleRequest other = (PutOrganizationConfigRuleRequest) obj; if (other.getOrganizationConfigRuleName() == null ^ this.getOrganizationConfigRuleName() == null) return false; if (other.getOrganizationConfigRuleName() != null && other.getOrganizationConfigRuleName().equals(this.getOrganizationConfigRuleName()) == false) return false; if (other.getOrganizationManagedRuleMetadata() == null ^ this.getOrganizationManagedRuleMetadata() == null) return false; if (other.getOrganizationManagedRuleMetadata() != null && other.getOrganizationManagedRuleMetadata().equals(this.getOrganizationManagedRuleMetadata()) == false) return false; if (other.getOrganizationCustomRuleMetadata() == null ^ this.getOrganizationCustomRuleMetadata() == null) return false; if (other.getOrganizationCustomRuleMetadata() != null && other.getOrganizationCustomRuleMetadata().equals(this.getOrganizationCustomRuleMetadata()) == false) return false; if (other.getExcludedAccounts() == null ^ this.getExcludedAccounts() == null) return false; if (other.getExcludedAccounts() != null && other.getExcludedAccounts().equals(this.getExcludedAccounts()) == false) return false; if (other.getOrganizationCustomPolicyRuleMetadata() == null ^ this.getOrganizationCustomPolicyRuleMetadata() == null) return false; if (other.getOrganizationCustomPolicyRuleMetadata() != null && other.getOrganizationCustomPolicyRuleMetadata().equals(this.getOrganizationCustomPolicyRuleMetadata()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOrganizationConfigRuleName() == null) ? 0 : getOrganizationConfigRuleName().hashCode()); hashCode = prime * hashCode + ((getOrganizationManagedRuleMetadata() == null) ? 0 : getOrganizationManagedRuleMetadata().hashCode()); hashCode = prime * hashCode + ((getOrganizationCustomRuleMetadata() == null) ? 0 : getOrganizationCustomRuleMetadata().hashCode()); hashCode = prime * hashCode + ((getExcludedAccounts() == null) ? 0 : getExcludedAccounts().hashCode()); hashCode = prime * hashCode + ((getOrganizationCustomPolicyRuleMetadata() == null) ? 0 : getOrganizationCustomPolicyRuleMetadata().hashCode()); return hashCode; } @Override public PutOrganizationConfigRuleRequest clone() { return (PutOrganizationConfigRuleRequest) super.clone(); } }