/* * 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 an EC2 instance resource. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsEc2InstanceViolation implements Serializable, Cloneable, StructuredPojo { /** ** The resource ID of the EC2 instance. *
*/ private String violationTarget; /** ** Violation detail for network interfaces associated with the EC2 instance. *
*/ private java.util.List* The resource ID of the EC2 instance. *
* * @param violationTarget * The resource ID of the EC2 instance. */ public void setViolationTarget(String violationTarget) { this.violationTarget = violationTarget; } /** ** The resource ID of the EC2 instance. *
* * @return The resource ID of the EC2 instance. */ public String getViolationTarget() { return this.violationTarget; } /** ** The resource ID of the EC2 instance. *
* * @param violationTarget * The resource ID of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2InstanceViolation withViolationTarget(String violationTarget) { setViolationTarget(violationTarget); return this; } /** ** Violation detail for network interfaces associated with the EC2 instance. *
* * @return Violation detail for network interfaces associated with the EC2 instance. */ public java.util.List* Violation detail for network interfaces associated with the EC2 instance. *
* * @param awsEc2NetworkInterfaceViolations * Violation detail for network interfaces associated with the EC2 instance. */ public void setAwsEc2NetworkInterfaceViolations(java.util.Collection* Violation detail for network interfaces associated with the EC2 instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAwsEc2NetworkInterfaceViolations(java.util.Collection)} or * {@link #withAwsEc2NetworkInterfaceViolations(java.util.Collection)} if you want to override the existing values. *
* * @param awsEc2NetworkInterfaceViolations * Violation detail for network interfaces associated with the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2InstanceViolation withAwsEc2NetworkInterfaceViolations(AwsEc2NetworkInterfaceViolation... awsEc2NetworkInterfaceViolations) { if (this.awsEc2NetworkInterfaceViolations == null) { setAwsEc2NetworkInterfaceViolations(new java.util.ArrayList* Violation detail for network interfaces associated with the EC2 instance. *
* * @param awsEc2NetworkInterfaceViolations * Violation detail for network interfaces associated with the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2InstanceViolation withAwsEc2NetworkInterfaceViolations(java.util.Collection