
com.amazonaws.services.config.model.OrganizationCustomPolicyRuleMetadata Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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;
/**
*
* An object that 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.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OrganizationCustomPolicyRuleMetadata implements Serializable, Cloneable, StructuredPojo {
/**
*
* The description that you provide for your organization Config Custom Policy rule.
*
*/
private String description;
/**
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules,
* Config supports change-initiated notification types:
*
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
*
*
*/
private com.amazonaws.internal.SdkInternalList organizationConfigRuleTriggerTypes;
/**
*
* A string, in JSON format, that is passed to your organization Config Custom Policy rule.
*
*/
private String inputParameters;
/**
*
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered
* when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
*
*/
private String maximumExecutionFrequency;
/**
*
* The type of the Amazon Web Services resource that was evaluated.
*
*/
private com.amazonaws.internal.SdkInternalList resourceTypesScope;
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*/
private String resourceIdScope;
/**
*
* One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more
* specific tag values.
*
*/
private String tagKeyScope;
/**
*
* The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category
* (key).
*
*/
private String tagValueScope;
/**
*
* The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that
* allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard,
* see the Guard GitHub Repository.
*
*/
private String policyRuntime;
/**
*
* The policy definition containing the logic for your organization Config Custom Policy rule.
*
*/
private String policyText;
/**
*
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is
* null when debug logging is enabled for all accounts.
*
*/
private com.amazonaws.internal.SdkInternalList debugLogDeliveryAccounts;
/**
*
* The description that you provide for your organization Config Custom Policy rule.
*
*
* @param description
* The description that you provide for your organization Config Custom Policy rule.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description that you provide for your organization Config Custom Policy rule.
*
*
* @return The description that you provide for your organization Config Custom Policy rule.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description that you provide for your organization Config Custom Policy rule.
*
*
* @param description
* The description that you provide for your organization Config Custom Policy rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules,
* Config supports change-initiated notification types:
*
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
*
*
*
* @return The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy
* rules, Config supports change-initiated notification types:
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
*
* @see OrganizationConfigRuleTriggerTypeNoSN
*/
public java.util.List getOrganizationConfigRuleTriggerTypes() {
if (organizationConfigRuleTriggerTypes == null) {
organizationConfigRuleTriggerTypes = new com.amazonaws.internal.SdkInternalList();
}
return organizationConfigRuleTriggerTypes;
}
/**
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules,
* Config supports change-initiated notification types:
*
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
*
*
*
* @param organizationConfigRuleTriggerTypes
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy
* rules, Config supports change-initiated notification types:
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
*
* @see OrganizationConfigRuleTriggerTypeNoSN
*/
public void setOrganizationConfigRuleTriggerTypes(java.util.Collection organizationConfigRuleTriggerTypes) {
if (organizationConfigRuleTriggerTypes == null) {
this.organizationConfigRuleTriggerTypes = null;
return;
}
this.organizationConfigRuleTriggerTypes = new com.amazonaws.internal.SdkInternalList(organizationConfigRuleTriggerTypes);
}
/**
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules,
* Config supports change-initiated notification types:
*
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOrganizationConfigRuleTriggerTypes(java.util.Collection)} or
* {@link #withOrganizationConfigRuleTriggerTypes(java.util.Collection)} if you want to override the existing
* values.
*
*
* @param organizationConfigRuleTriggerTypes
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy
* rules, Config supports change-initiated notification types:
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see OrganizationConfigRuleTriggerTypeNoSN
*/
public OrganizationCustomPolicyRuleMetadata withOrganizationConfigRuleTriggerTypes(String... organizationConfigRuleTriggerTypes) {
if (this.organizationConfigRuleTriggerTypes == null) {
setOrganizationConfigRuleTriggerTypes(new com.amazonaws.internal.SdkInternalList(organizationConfigRuleTriggerTypes.length));
}
for (String ele : organizationConfigRuleTriggerTypes) {
this.organizationConfigRuleTriggerTypes.add(ele);
}
return this;
}
/**
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules,
* Config supports change-initiated notification types:
*
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
*
*
*
* @param organizationConfigRuleTriggerTypes
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy
* rules, Config supports change-initiated notification types:
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see OrganizationConfigRuleTriggerTypeNoSN
*/
public OrganizationCustomPolicyRuleMetadata withOrganizationConfigRuleTriggerTypes(java.util.Collection organizationConfigRuleTriggerTypes) {
setOrganizationConfigRuleTriggerTypes(organizationConfigRuleTriggerTypes);
return this;
}
/**
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules,
* Config supports change-initiated notification types:
*
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
*
*
*
* @param organizationConfigRuleTriggerTypes
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy
* rules, Config supports change-initiated notification types:
*
* -
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
*
* -
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see OrganizationConfigRuleTriggerTypeNoSN
*/
public OrganizationCustomPolicyRuleMetadata withOrganizationConfigRuleTriggerTypes(
OrganizationConfigRuleTriggerTypeNoSN... organizationConfigRuleTriggerTypes) {
com.amazonaws.internal.SdkInternalList organizationConfigRuleTriggerTypesCopy = new com.amazonaws.internal.SdkInternalList(
organizationConfigRuleTriggerTypes.length);
for (OrganizationConfigRuleTriggerTypeNoSN value : organizationConfigRuleTriggerTypes) {
organizationConfigRuleTriggerTypesCopy.add(value.toString());
}
if (getOrganizationConfigRuleTriggerTypes() == null) {
setOrganizationConfigRuleTriggerTypes(organizationConfigRuleTriggerTypesCopy);
} else {
getOrganizationConfigRuleTriggerTypes().addAll(organizationConfigRuleTriggerTypesCopy);
}
return this;
}
/**
*
* A string, in JSON format, that is passed to your organization Config Custom Policy rule.
*
*
* @param inputParameters
* A string, in JSON format, that is passed to your organization Config Custom Policy rule.
*/
public void setInputParameters(String inputParameters) {
this.inputParameters = inputParameters;
}
/**
*
* A string, in JSON format, that is passed to your organization Config Custom Policy rule.
*
*
* @return A string, in JSON format, that is passed to your organization Config Custom Policy rule.
*/
public String getInputParameters() {
return this.inputParameters;
}
/**
*
* A string, in JSON format, that is passed to your organization Config Custom Policy rule.
*
*
* @param inputParameters
* A string, in JSON format, that is passed to your organization Config Custom Policy rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withInputParameters(String inputParameters) {
setInputParameters(inputParameters);
return this;
}
/**
*
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered
* when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
*
*
* @param maximumExecutionFrequency
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is
* triggered when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
* @see MaximumExecutionFrequency
*/
public void setMaximumExecutionFrequency(String maximumExecutionFrequency) {
this.maximumExecutionFrequency = maximumExecutionFrequency;
}
/**
*
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered
* when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
*
*
* @return The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is
* triggered when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
* @see MaximumExecutionFrequency
*/
public String getMaximumExecutionFrequency() {
return this.maximumExecutionFrequency;
}
/**
*
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered
* when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
*
*
* @param maximumExecutionFrequency
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is
* triggered when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MaximumExecutionFrequency
*/
public OrganizationCustomPolicyRuleMetadata withMaximumExecutionFrequency(String maximumExecutionFrequency) {
setMaximumExecutionFrequency(maximumExecutionFrequency);
return this;
}
/**
*
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered
* when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
*
*
* @param maximumExecutionFrequency
* The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is
* triggered when Config delivers the configuration snapshot. For more information, see
* ConfigSnapshotDeliveryProperties.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MaximumExecutionFrequency
*/
public OrganizationCustomPolicyRuleMetadata withMaximumExecutionFrequency(MaximumExecutionFrequency maximumExecutionFrequency) {
this.maximumExecutionFrequency = maximumExecutionFrequency.toString();
return this;
}
/**
*
* The type of the Amazon Web Services resource that was evaluated.
*
*
* @return The type of the Amazon Web Services resource that was evaluated.
*/
public java.util.List getResourceTypesScope() {
if (resourceTypesScope == null) {
resourceTypesScope = new com.amazonaws.internal.SdkInternalList();
}
return resourceTypesScope;
}
/**
*
* The type of the Amazon Web Services resource that was evaluated.
*
*
* @param resourceTypesScope
* The type of the Amazon Web Services resource that was evaluated.
*/
public void setResourceTypesScope(java.util.Collection resourceTypesScope) {
if (resourceTypesScope == null) {
this.resourceTypesScope = null;
return;
}
this.resourceTypesScope = new com.amazonaws.internal.SdkInternalList(resourceTypesScope);
}
/**
*
* The type of the Amazon Web Services resource that was evaluated.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setResourceTypesScope(java.util.Collection)} or {@link #withResourceTypesScope(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param resourceTypesScope
* The type of the Amazon Web Services resource that was evaluated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withResourceTypesScope(String... resourceTypesScope) {
if (this.resourceTypesScope == null) {
setResourceTypesScope(new com.amazonaws.internal.SdkInternalList(resourceTypesScope.length));
}
for (String ele : resourceTypesScope) {
this.resourceTypesScope.add(ele);
}
return this;
}
/**
*
* The type of the Amazon Web Services resource that was evaluated.
*
*
* @param resourceTypesScope
* The type of the Amazon Web Services resource that was evaluated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withResourceTypesScope(java.util.Collection resourceTypesScope) {
setResourceTypesScope(resourceTypesScope);
return this;
}
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*
* @param resourceIdScope
* The ID of the Amazon Web Services resource that was evaluated.
*/
public void setResourceIdScope(String resourceIdScope) {
this.resourceIdScope = resourceIdScope;
}
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*
* @return The ID of the Amazon Web Services resource that was evaluated.
*/
public String getResourceIdScope() {
return this.resourceIdScope;
}
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*
* @param resourceIdScope
* The ID of the Amazon Web Services resource that was evaluated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withResourceIdScope(String resourceIdScope) {
setResourceIdScope(resourceIdScope);
return this;
}
/**
*
* One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more
* specific tag values.
*
*
* @param tagKeyScope
* One part of a key-value pair that make up a tag. A key is a general label that acts like a category for
* more specific tag values.
*/
public void setTagKeyScope(String tagKeyScope) {
this.tagKeyScope = tagKeyScope;
}
/**
*
* One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more
* specific tag values.
*
*
* @return One part of a key-value pair that make up a tag. A key is a general label that acts like a category for
* more specific tag values.
*/
public String getTagKeyScope() {
return this.tagKeyScope;
}
/**
*
* One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more
* specific tag values.
*
*
* @param tagKeyScope
* One part of a key-value pair that make up a tag. A key is a general label that acts like a category for
* more specific tag values.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withTagKeyScope(String tagKeyScope) {
setTagKeyScope(tagKeyScope);
return this;
}
/**
*
* The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category
* (key).
*
*
* @param tagValueScope
* The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag
* category (key).
*/
public void setTagValueScope(String tagValueScope) {
this.tagValueScope = tagValueScope;
}
/**
*
* The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category
* (key).
*
*
* @return The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag
* category (key).
*/
public String getTagValueScope() {
return this.tagValueScope;
}
/**
*
* The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category
* (key).
*
*
* @param tagValueScope
* The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag
* category (key).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withTagValueScope(String tagValueScope) {
setTagValueScope(tagValueScope);
return this;
}
/**
*
* The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that
* allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard,
* see the Guard GitHub Repository.
*
*
* @param policyRuntime
* The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language
* that allows you to write policies that are enforced by Config Custom Policy rules. For more information
* about Guard, see the Guard GitHub
* Repository.
*/
public void setPolicyRuntime(String policyRuntime) {
this.policyRuntime = policyRuntime;
}
/**
*
* The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that
* allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard,
* see the Guard GitHub Repository.
*
*
* @return The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language
* that allows you to write policies that are enforced by Config Custom Policy rules. For more information
* about Guard, see the Guard GitHub
* Repository.
*/
public String getPolicyRuntime() {
return this.policyRuntime;
}
/**
*
* The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that
* allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard,
* see the Guard GitHub Repository.
*
*
* @param policyRuntime
* The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language
* that allows you to write policies that are enforced by Config Custom Policy rules. For more information
* about Guard, see the Guard GitHub
* Repository.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withPolicyRuntime(String policyRuntime) {
setPolicyRuntime(policyRuntime);
return this;
}
/**
*
* The policy definition containing the logic for your organization Config Custom Policy rule.
*
*
* @param policyText
* The policy definition containing the logic for your organization Config Custom Policy rule.
*/
public void setPolicyText(String policyText) {
this.policyText = policyText;
}
/**
*
* The policy definition containing the logic for your organization Config Custom Policy rule.
*
*
* @return The policy definition containing the logic for your organization Config Custom Policy rule.
*/
public String getPolicyText() {
return this.policyText;
}
/**
*
* The policy definition containing the logic for your organization Config Custom Policy rule.
*
*
* @param policyText
* The policy definition containing the logic for your organization Config Custom Policy rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withPolicyText(String policyText) {
setPolicyText(policyText);
return this;
}
/**
*
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is
* null when debug logging is enabled for all accounts.
*
*
* @return A list of accounts that you can enable debug logging for your organization Config Custom Policy rule.
* List is null when debug logging is enabled for all accounts.
*/
public java.util.List getDebugLogDeliveryAccounts() {
if (debugLogDeliveryAccounts == null) {
debugLogDeliveryAccounts = new com.amazonaws.internal.SdkInternalList();
}
return debugLogDeliveryAccounts;
}
/**
*
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is
* null when debug logging is enabled for all accounts.
*
*
* @param debugLogDeliveryAccounts
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List
* is null when debug logging is enabled for all accounts.
*/
public void setDebugLogDeliveryAccounts(java.util.Collection debugLogDeliveryAccounts) {
if (debugLogDeliveryAccounts == null) {
this.debugLogDeliveryAccounts = null;
return;
}
this.debugLogDeliveryAccounts = new com.amazonaws.internal.SdkInternalList(debugLogDeliveryAccounts);
}
/**
*
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is
* null when debug logging is enabled for all accounts.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDebugLogDeliveryAccounts(java.util.Collection)} or
* {@link #withDebugLogDeliveryAccounts(java.util.Collection)} if you want to override the existing values.
*
*
* @param debugLogDeliveryAccounts
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List
* is null when debug logging is enabled for all accounts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withDebugLogDeliveryAccounts(String... debugLogDeliveryAccounts) {
if (this.debugLogDeliveryAccounts == null) {
setDebugLogDeliveryAccounts(new com.amazonaws.internal.SdkInternalList(debugLogDeliveryAccounts.length));
}
for (String ele : debugLogDeliveryAccounts) {
this.debugLogDeliveryAccounts.add(ele);
}
return this;
}
/**
*
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is
* null when debug logging is enabled for all accounts.
*
*
* @param debugLogDeliveryAccounts
* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List
* is null when debug logging is enabled for all accounts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationCustomPolicyRuleMetadata withDebugLogDeliveryAccounts(java.util.Collection debugLogDeliveryAccounts) {
setDebugLogDeliveryAccounts(debugLogDeliveryAccounts);
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 (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getOrganizationConfigRuleTriggerTypes() != null)
sb.append("OrganizationConfigRuleTriggerTypes: ").append(getOrganizationConfigRuleTriggerTypes()).append(",");
if (getInputParameters() != null)
sb.append("InputParameters: ").append(getInputParameters()).append(",");
if (getMaximumExecutionFrequency() != null)
sb.append("MaximumExecutionFrequency: ").append(getMaximumExecutionFrequency()).append(",");
if (getResourceTypesScope() != null)
sb.append("ResourceTypesScope: ").append(getResourceTypesScope()).append(",");
if (getResourceIdScope() != null)
sb.append("ResourceIdScope: ").append(getResourceIdScope()).append(",");
if (getTagKeyScope() != null)
sb.append("TagKeyScope: ").append(getTagKeyScope()).append(",");
if (getTagValueScope() != null)
sb.append("TagValueScope: ").append(getTagValueScope()).append(",");
if (getPolicyRuntime() != null)
sb.append("PolicyRuntime: ").append(getPolicyRuntime()).append(",");
if (getPolicyText() != null)
sb.append("PolicyText: ").append(getPolicyText()).append(",");
if (getDebugLogDeliveryAccounts() != null)
sb.append("DebugLogDeliveryAccounts: ").append(getDebugLogDeliveryAccounts());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OrganizationCustomPolicyRuleMetadata == false)
return false;
OrganizationCustomPolicyRuleMetadata other = (OrganizationCustomPolicyRuleMetadata) obj;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getOrganizationConfigRuleTriggerTypes() == null ^ this.getOrganizationConfigRuleTriggerTypes() == null)
return false;
if (other.getOrganizationConfigRuleTriggerTypes() != null
&& other.getOrganizationConfigRuleTriggerTypes().equals(this.getOrganizationConfigRuleTriggerTypes()) == false)
return false;
if (other.getInputParameters() == null ^ this.getInputParameters() == null)
return false;
if (other.getInputParameters() != null && other.getInputParameters().equals(this.getInputParameters()) == false)
return false;
if (other.getMaximumExecutionFrequency() == null ^ this.getMaximumExecutionFrequency() == null)
return false;
if (other.getMaximumExecutionFrequency() != null && other.getMaximumExecutionFrequency().equals(this.getMaximumExecutionFrequency()) == false)
return false;
if (other.getResourceTypesScope() == null ^ this.getResourceTypesScope() == null)
return false;
if (other.getResourceTypesScope() != null && other.getResourceTypesScope().equals(this.getResourceTypesScope()) == false)
return false;
if (other.getResourceIdScope() == null ^ this.getResourceIdScope() == null)
return false;
if (other.getResourceIdScope() != null && other.getResourceIdScope().equals(this.getResourceIdScope()) == false)
return false;
if (other.getTagKeyScope() == null ^ this.getTagKeyScope() == null)
return false;
if (other.getTagKeyScope() != null && other.getTagKeyScope().equals(this.getTagKeyScope()) == false)
return false;
if (other.getTagValueScope() == null ^ this.getTagValueScope() == null)
return false;
if (other.getTagValueScope() != null && other.getTagValueScope().equals(this.getTagValueScope()) == false)
return false;
if (other.getPolicyRuntime() == null ^ this.getPolicyRuntime() == null)
return false;
if (other.getPolicyRuntime() != null && other.getPolicyRuntime().equals(this.getPolicyRuntime()) == false)
return false;
if (other.getPolicyText() == null ^ this.getPolicyText() == null)
return false;
if (other.getPolicyText() != null && other.getPolicyText().equals(this.getPolicyText()) == false)
return false;
if (other.getDebugLogDeliveryAccounts() == null ^ this.getDebugLogDeliveryAccounts() == null)
return false;
if (other.getDebugLogDeliveryAccounts() != null && other.getDebugLogDeliveryAccounts().equals(this.getDebugLogDeliveryAccounts()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getOrganizationConfigRuleTriggerTypes() == null) ? 0 : getOrganizationConfigRuleTriggerTypes().hashCode());
hashCode = prime * hashCode + ((getInputParameters() == null) ? 0 : getInputParameters().hashCode());
hashCode = prime * hashCode + ((getMaximumExecutionFrequency() == null) ? 0 : getMaximumExecutionFrequency().hashCode());
hashCode = prime * hashCode + ((getResourceTypesScope() == null) ? 0 : getResourceTypesScope().hashCode());
hashCode = prime * hashCode + ((getResourceIdScope() == null) ? 0 : getResourceIdScope().hashCode());
hashCode = prime * hashCode + ((getTagKeyScope() == null) ? 0 : getTagKeyScope().hashCode());
hashCode = prime * hashCode + ((getTagValueScope() == null) ? 0 : getTagValueScope().hashCode());
hashCode = prime * hashCode + ((getPolicyRuntime() == null) ? 0 : getPolicyRuntime().hashCode());
hashCode = prime * hashCode + ((getPolicyText() == null) ? 0 : getPolicyText().hashCode());
hashCode = prime * hashCode + ((getDebugLogDeliveryAccounts() == null) ? 0 : getDebugLogDeliveryAccounts().hashCode());
return hashCode;
}
@Override
public OrganizationCustomPolicyRuleMetadata clone() {
try {
return (OrganizationCustomPolicyRuleMetadata) 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.OrganizationCustomPolicyRuleMetadataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}