Class ImmutableSecurityGroupRule
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableSecurityGroupRule
-
- All Implemented Interfaces:
SecurityGroupRule
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableSecurityGroupRule extends Object implements SecurityGroupRule
Immutable implementation ofSecurityGroupRule.Use the builder to create immutable instances:
ImmutableSecurityGroupRule.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSecurityGroupRule.BuilderBuilds instances of typeImmutableSecurityGroupRule.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSecurityGroupRule.Builderbuilder()Creates a builder forImmutableSecurityGroupRule.static ImmutableSecurityGroupRulecopyOf(SecurityGroupRule instance)Creates an immutable copy of aSecurityGroupRulevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSecurityGroupRulethat have equal attribute values.IntegergetCode()StringgetDestination()BooleangetLog()StringgetPorts()StringgetProtocol()IntegergetType()inthashCode()Computes a hash code from attributes:protocol,ports,destination,log,type,code.StringtoString()Prints the immutable valueSecurityGroupRulewith attribute values.ImmutableSecurityGroupRulewithCode(Integer value)Copy the current immutable object by setting a value for thecodeattribute.ImmutableSecurityGroupRulewithDestination(String value)Copy the current immutable object by setting a value for thedestinationattribute.ImmutableSecurityGroupRulewithLog(Boolean value)Copy the current immutable object by setting a value for thelogattribute.ImmutableSecurityGroupRulewithPorts(String value)Copy the current immutable object by setting a value for theportsattribute.ImmutableSecurityGroupRulewithProtocol(String value)Copy the current immutable object by setting a value for theprotocolattribute.ImmutableSecurityGroupRulewithType(Integer value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfaceSecurityGroupRule- Returns:
- The value of the
protocolattribute
-
getPorts
public String getPorts()
- Specified by:
getPortsin interfaceSecurityGroupRule- Returns:
- The value of the
portsattribute
-
getDestination
public String getDestination()
- Specified by:
getDestinationin interfaceSecurityGroupRule- Returns:
- The value of the
destinationattribute
-
getLog
public Boolean getLog()
- Specified by:
getLogin interfaceSecurityGroupRule- Returns:
- The value of the
logattribute
-
getType
public Integer getType()
- Specified by:
getTypein interfaceSecurityGroupRule- Returns:
- The value of the
typeattribute
-
getCode
public Integer getCode()
- Specified by:
getCodein interfaceSecurityGroupRule- Returns:
- The value of the
codeattribute
-
withProtocol
public final ImmutableSecurityGroupRule withProtocol(String value)
Copy the current immutable object by setting a value for theprotocolattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for protocol- Returns:
- A modified copy of the
thisobject
-
withPorts
public final ImmutableSecurityGroupRule withPorts(String value)
Copy the current immutable object by setting a value for theportsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ports- Returns:
- A modified copy of the
thisobject
-
withDestination
public final ImmutableSecurityGroupRule withDestination(String value)
Copy the current immutable object by setting a value for thedestinationattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for destination- Returns:
- A modified copy of the
thisobject
-
withLog
public final ImmutableSecurityGroupRule withLog(Boolean value)
Copy the current immutable object by setting a value for thelogattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for log (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableSecurityGroupRule withType(Integer value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withCode
public final ImmutableSecurityGroupRule withCode(Integer value)
Copy the current immutable object by setting a value for thecodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for code (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableSecurityGroupRulethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:protocol,ports,destination,log,type,code.
-
toString
public String toString()
Prints the immutable valueSecurityGroupRulewith attribute values.
-
copyOf
public static ImmutableSecurityGroupRule copyOf(SecurityGroupRule instance)
Creates an immutable copy of aSecurityGroupRulevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SecurityGroupRule instance
-
builder
public static ImmutableSecurityGroupRule.Builder builder()
Creates a builder forImmutableSecurityGroupRule.ImmutableSecurityGroupRule.builder() .protocol(String) // requiredprotocol.ports(String) // requiredports.destination(String) // requireddestination.log(Boolean | null) // nullablelog.type(Integer | null) // nullabletype.code(Integer | null) // nullablecode.build();- Returns:
- A new ImmutableSecurityGroupRule builder
-
-