/* * 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.fms.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Violation detail for the rule violation in a security group when compared to the primary security group of the * Firewall Manager policy. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsVPCSecurityGroupViolation implements Serializable, Cloneable, StructuredPojo { /** ** The security group rule that is being evaluated. *
*/ private String violationTarget; /** ** A description of the security group that violates the policy. *
*/ private String violationTargetDescription; /** *
* List of rules specified in the security group of the Firewall Manager policy that partially match the
* ViolationTarget
rule.
*
* Remediation options for the rule specified in the ViolationTarget
.
*
* The security group rule that is being evaluated. *
* * @param violationTarget * The security group rule that is being evaluated. */ public void setViolationTarget(String violationTarget) { this.violationTarget = violationTarget; } /** ** The security group rule that is being evaluated. *
* * @return The security group rule that is being evaluated. */ public String getViolationTarget() { return this.violationTarget; } /** ** The security group rule that is being evaluated. *
* * @param violationTarget * The security group rule that is being evaluated. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsVPCSecurityGroupViolation withViolationTarget(String violationTarget) { setViolationTarget(violationTarget); return this; } /** ** A description of the security group that violates the policy. *
* * @param violationTargetDescription * A description of the security group that violates the policy. */ public void setViolationTargetDescription(String violationTargetDescription) { this.violationTargetDescription = violationTargetDescription; } /** ** A description of the security group that violates the policy. *
* * @return A description of the security group that violates the policy. */ public String getViolationTargetDescription() { return this.violationTargetDescription; } /** ** A description of the security group that violates the policy. *
* * @param violationTargetDescription * A description of the security group that violates the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsVPCSecurityGroupViolation withViolationTargetDescription(String violationTargetDescription) { setViolationTargetDescription(violationTargetDescription); return this; } /** *
* List of rules specified in the security group of the Firewall Manager policy that partially match the
* ViolationTarget
rule.
*
ViolationTarget
rule.
*/
public java.util.List
* List of rules specified in the security group of the Firewall Manager policy that partially match the
* ViolationTarget
rule.
*
ViolationTarget
rule.
*/
public void setPartialMatches(java.util.Collection
* List of rules specified in the security group of the Firewall Manager policy that partially match the
* ViolationTarget
rule.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPartialMatches(java.util.Collection)} or {@link #withPartialMatches(java.util.Collection)} if you want * to override the existing values. *
* * @param partialMatches * List of rules specified in the security group of the Firewall Manager policy that partially match the *ViolationTarget
rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsVPCSecurityGroupViolation withPartialMatches(PartialMatch... partialMatches) {
if (this.partialMatches == null) {
setPartialMatches(new java.util.ArrayList
* List of rules specified in the security group of the Firewall Manager policy that partially match the
* ViolationTarget
rule.
*
ViolationTarget
rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsVPCSecurityGroupViolation withPartialMatches(java.util.Collection
* Remediation options for the rule specified in the ViolationTarget
.
*
ViolationTarget
.
*/
public java.util.List
* Remediation options for the rule specified in the ViolationTarget
.
*
ViolationTarget
.
*/
public void setPossibleSecurityGroupRemediationActions(java.util.Collection
* Remediation options for the rule specified in the ViolationTarget
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPossibleSecurityGroupRemediationActions(java.util.Collection)} or * {@link #withPossibleSecurityGroupRemediationActions(java.util.Collection)} if you want to override the existing * values. *
* * @param possibleSecurityGroupRemediationActions * Remediation options for the rule specified in theViolationTarget
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsVPCSecurityGroupViolation withPossibleSecurityGroupRemediationActions(SecurityGroupRemediationAction... possibleSecurityGroupRemediationActions) {
if (this.possibleSecurityGroupRemediationActions == null) {
setPossibleSecurityGroupRemediationActions(new java.util.ArrayList
* Remediation options for the rule specified in the ViolationTarget
.
*
ViolationTarget
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsVPCSecurityGroupViolation withPossibleSecurityGroupRemediationActions(
java.util.Collection