/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Details about an Amazon EC2 security group. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsEc2SecurityGroupDetails implements Serializable, Cloneable, StructuredPojo { /** ** The name of the security group. *
*/ private String groupName; /** ** The ID of the security group. *
*/ private String groupId; /** ** The Amazon Web Services account ID of the owner of the security group. *
*/ private String ownerId; /** ** [VPC only] The ID of the VPC for the security group. *
*/ private String vpcId; /** ** The inbound rules associated with the security group. *
*/ private java.util.List* [VPC only] The outbound rules associated with the security group. *
*/ private java.util.List* The name of the security group. *
* * @param groupName * The name of the security group. */ public void setGroupName(String groupName) { this.groupName = groupName; } /** ** The name of the security group. *
* * @return The name of the security group. */ public String getGroupName() { return this.groupName; } /** ** The name of the security group. *
* * @param groupName * The name of the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withGroupName(String groupName) { setGroupName(groupName); return this; } /** ** The ID of the security group. *
* * @param groupId * The ID of the security group. */ public void setGroupId(String groupId) { this.groupId = groupId; } /** ** The ID of the security group. *
* * @return The ID of the security group. */ public String getGroupId() { return this.groupId; } /** ** The ID of the security group. *
* * @param groupId * The ID of the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withGroupId(String groupId) { setGroupId(groupId); return this; } /** ** The Amazon Web Services account ID of the owner of the security group. *
* * @param ownerId * The Amazon Web Services account ID of the owner of the security group. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The Amazon Web Services account ID of the owner of the security group. *
* * @return The Amazon Web Services account ID of the owner of the security group. */ public String getOwnerId() { return this.ownerId; } /** ** The Amazon Web Services account ID of the owner of the security group. *
* * @param ownerId * The Amazon Web Services account ID of the owner of the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** [VPC only] The ID of the VPC for the security group. *
* * @param vpcId * [VPC only] The ID of the VPC for the security group. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** [VPC only] The ID of the VPC for the security group. *
* * @return [VPC only] The ID of the VPC for the security group. */ public String getVpcId() { return this.vpcId; } /** ** [VPC only] The ID of the VPC for the security group. *
* * @param vpcId * [VPC only] The ID of the VPC for the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The inbound rules associated with the security group. *
* * @return The inbound rules associated with the security group. */ public java.util.List* The inbound rules associated with the security group. *
* * @param ipPermissions * The inbound rules associated with the security group. */ public void setIpPermissions(java.util.Collection* The inbound rules associated with the security group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIpPermissions(java.util.Collection)} or {@link #withIpPermissions(java.util.Collection)} if you want * to override the existing values. *
* * @param ipPermissions * The inbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withIpPermissions(AwsEc2SecurityGroupIpPermission... ipPermissions) { if (this.ipPermissions == null) { setIpPermissions(new java.util.ArrayList* The inbound rules associated with the security group. *
* * @param ipPermissions * The inbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withIpPermissions(java.util.Collection* [VPC only] The outbound rules associated with the security group. *
* * @return [VPC only] The outbound rules associated with the security group. */ public java.util.List* [VPC only] The outbound rules associated with the security group. *
* * @param ipPermissionsEgress * [VPC only] The outbound rules associated with the security group. */ public void setIpPermissionsEgress(java.util.Collection* [VPC only] The outbound rules associated with the security group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIpPermissionsEgress(java.util.Collection)} or {@link #withIpPermissionsEgress(java.util.Collection)} * if you want to override the existing values. *
* * @param ipPermissionsEgress * [VPC only] The outbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withIpPermissionsEgress(AwsEc2SecurityGroupIpPermission... ipPermissionsEgress) { if (this.ipPermissionsEgress == null) { setIpPermissionsEgress(new java.util.ArrayList* [VPC only] The outbound rules associated with the security group. *
* * @param ipPermissionsEgress * [VPC only] The outbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2SecurityGroupDetails withIpPermissionsEgress(java.util.Collection