/* * Copyright 2010-2018 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.ec2.model; import java.io.Serializable; /** *
* Describes a stale rule in a security group. *
*/ public class StaleIpPermission implements Serializable { /** * The start of the port range for the TCP and UDP protocols, or an ICMP * type number. A value of-1
indicates all ICMP types.
*/
private Integer fromPort;
/**
* The IP protocol name (for tcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*/
private String ipProtocol;
/**
* One or more IP ranges. Not applicable for stale security group rules.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag-1
indicates all ICMP types.
*/
private Integer toPort;
/**
* One or more security group pairs. Returns the ID of the referenced
* security group and VPC, and the ID and status of the VPC peering
* connection.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag-1
indicates all ICMP types.
*
* @return The start of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*/
public Integer getFromPort() {
return fromPort;
}
/**
* The start of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*
* @param fromPort The start of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*/
public void setFromPort(Integer fromPort) {
this.fromPort = fromPort;
}
/**
* The start of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param fromPort The start of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withFromPort(Integer fromPort) {
this.fromPort = fromPort;
return this;
}
/**
* The IP protocol name (for tcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*
* @return The IP protocol name (for tcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*/
public String getIpProtocol() {
return ipProtocol;
}
/**
* The IP protocol name (for tcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*
* @param ipProtocol The IP protocol name (for tcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*/
public void setIpProtocol(String ipProtocol) {
this.ipProtocol = ipProtocol;
}
/**
* The IP protocol name (for tcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param ipProtocol The IP protocol name (for
* Returns a reference to this object so that method calls can be chained together.
*
* @param ipRanges One or more IP ranges. Not applicable for stale security group rules.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withIpRanges(String... ipRanges) {
if (getIpRanges() == null) setIpRanges(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param ipRanges One or more IP ranges. Not applicable for stale security group rules.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withIpRanges(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param prefixListIds One or more prefix list IDs for an AWS service. Not applicable for
* stale security group rules.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withPrefixListIds(String... prefixListIds) {
if (getPrefixListIds() == null) setPrefixListIds(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param prefixListIds One or more prefix list IDs for an AWS service. Not applicable for
* stale security group rules.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withPrefixListIds(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param toPort The end of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of
* Returns a reference to this object so that method calls can be chained together.
*
* @param userIdGroupPairs One or more security group pairs. Returns the ID of the referenced
* security group and VPC, and the ID and status of the VPC peering
* connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs) {
if (getUserIdGroupPairs() == null) setUserIdGroupPairs(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param userIdGroupPairs One or more security group pairs. Returns the ID of the referenced
* security group and VPC, and the ID and status of the VPC peering
* connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withUserIdGroupPairs(java.util.Collectiontcp
, udp
, and
* icmp
) or number (see Protocol
* Numbers).
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withIpProtocol(String ipProtocol) {
this.ipProtocol = ipProtocol;
return this;
}
/**
* One or more IP ranges. Not applicable for stale security group rules.
*
* @return One or more IP ranges. Not applicable for stale security group rules.
*/
public java.util.List-1
indicates all ICMP types.
*
* @return The end of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*/
public Integer getToPort() {
return toPort;
}
/**
* The end of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*
* @param toPort The end of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
*/
public void setToPort(Integer toPort) {
this.toPort = toPort;
}
/**
* The end of the port range for the TCP and UDP protocols, or an ICMP
* type number. A value of -1
indicates all ICMP types.
* -1
indicates all ICMP types.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public StaleIpPermission withToPort(Integer toPort) {
this.toPort = toPort;
return this;
}
/**
* One or more security group pairs. Returns the ID of the referenced
* security group and VPC, and the ID and status of the VPC peering
* connection.
*
* @return One or more security group pairs. Returns the ID of the referenced
* security group and VPC, and the ID and status of the VPC peering
* connection.
*/
public java.util.List