Class ImmutableSecurityGroupRule.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableSecurityGroupRule.Builder
-
- Enclosing class:
- ImmutableSecurityGroupRule
public static final class ImmutableSecurityGroupRule.Builder extends Object
Builds instances of typeImmutableSecurityGroupRule. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableSecurityGroupRulebuild()Builds a newImmutableSecurityGroupRule.ImmutableSecurityGroupRule.Buildercode(Integer code)Initializes the value for thecodeattribute.ImmutableSecurityGroupRule.Builderdestination(String destination)Initializes the value for thedestinationattribute.ImmutableSecurityGroupRule.Builderfrom(SecurityGroupRule instance)Fill a builder with attribute values from the providedSecurityGroupRuleinstance.ImmutableSecurityGroupRule.Builderlog(Boolean log)Initializes the value for thelogattribute.ImmutableSecurityGroupRule.Builderports(String ports)Initializes the value for theportsattribute.ImmutableSecurityGroupRule.Builderprotocol(String protocol)Initializes the value for theprotocolattribute.ImmutableSecurityGroupRule.Buildertype(Integer type)Initializes the value for thetypeattribute.
-
-
-
Method Detail
-
from
public final ImmutableSecurityGroupRule.Builder from(SecurityGroupRule instance)
Fill a builder with attribute values from the providedSecurityGroupRuleinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
protocol
public final ImmutableSecurityGroupRule.Builder protocol(String protocol)
Initializes the value for theprotocolattribute.- Parameters:
protocol- The value for protocol- Returns:
thisbuilder for use in a chained invocation
-
ports
public final ImmutableSecurityGroupRule.Builder ports(String ports)
Initializes the value for theportsattribute.- Parameters:
ports- The value for ports- Returns:
thisbuilder for use in a chained invocation
-
destination
public final ImmutableSecurityGroupRule.Builder destination(String destination)
Initializes the value for thedestinationattribute.- Parameters:
destination- The value for destination- Returns:
thisbuilder for use in a chained invocation
-
log
public final ImmutableSecurityGroupRule.Builder log(Boolean log)
Initializes the value for thelogattribute.- Parameters:
log- The value for log (can benull)- Returns:
thisbuilder for use in a chained invocation
-
type
public final ImmutableSecurityGroupRule.Builder type(Integer type)
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
code
public final ImmutableSecurityGroupRule.Builder code(Integer code)
Initializes the value for thecodeattribute.- Parameters:
code- The value for code (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableSecurityGroupRule build()
Builds a newImmutableSecurityGroupRule.- Returns:
- An immutable instance of SecurityGroupRule
- Throws:
IllegalStateException- if any required attributes are missing
-
-