Package com.ibm.cloud.is.vpc.v1.model
Class SecurityGroupRulePatch
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.GenericModel
-
- com.ibm.cloud.is.vpc.v1.model.SecurityGroupRulePatch
-
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class SecurityGroupRulePatch extends com.ibm.cloud.sdk.core.service.model.GenericModelSecurityGroupRulePatch.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSecurityGroupRulePatch.BuilderBuilder.static interfaceSecurityGroupRulePatch.DirectionThe direction of traffic to enforce.static interfaceSecurityGroupRulePatch.IpVersionThe IP version to enforce.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>asPatch()Construct a JSON merge-patch from the SecurityGroupRulePatch.Longcode()Gets the code.Stringdirection()Gets the direction.StringipVersion()Gets the ipVersion.SecurityGroupRulePatch.BuildernewBuilder()New builder.LongportMax()Gets the portMax.LongportMin()Gets the portMin.SecurityGroupRuleRemotePatchremote()Gets the remote.Longtype()Gets the type.
-
-
-
Method Detail
-
newBuilder
public SecurityGroupRulePatch.Builder newBuilder()
New builder.- Returns:
- a SecurityGroupRulePatch builder
-
code
public Long code()
Gets the code. The ICMP traffic code to allow. If set, `type` must also be set. Specify `null` to remove an existing ICMP traffic code.- Returns:
- the code
-
direction
public String direction()
Gets the direction. The direction of traffic to enforce.- Returns:
- the direction
-
ipVersion
public String ipVersion()
Gets the ipVersion. The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network interfaces) in that group matching this IP version.- Returns:
- the ipVersion
-
portMax
public Long portMax()
Gets the portMax. The inclusive upper bound of the protocol destination port range. If set, `port_min` must also be set, and must not be larger. Specify `null` to remove an existing upper bound.- Returns:
- the portMax
-
portMin
public Long portMin()
Gets the portMin. The inclusive lower bound of the protocol destination port range. If set, `port_max` must also be set, and must not be smaller. Specify `null` to remove an existing lower bound.- Returns:
- the portMin
-
remote
public SecurityGroupRuleRemotePatch remote()
Gets the remote. The remote IP addresses or security groups from which this rule will allow traffic (or to which, for outbound rules). Can be specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` will allow traffic from any source (or to any destination, for outbound rules).- Returns:
- the remote
-
type
public Long type()
Gets the type. The ICMP traffic type to allow. Specify `null` to remove an existing ICMP traffic type value.- Returns:
- the type
-
asPatch
public Map<String,Object> asPatch()
Construct a JSON merge-patch from the SecurityGroupRulePatch. Note that properties of the SecurityGroupRulePatch with null values are not represented in the constructed JSON merge-patch object, but can be explicitly set afterward to signify a property delete.- Returns:
- a JSON merge-patch for the SecurityGroupRulePatch
-
-