Package com.vmware.nsx_policy.model
Class ResourceAllocation.Builder
- java.lang.Object
-
- com.vmware.nsx_policy.model.ResourceAllocation.Builder
-
- Enclosing class:
- ResourceAllocation
public static final class ResourceAllocation.Builder extends java.lang.Object
Builder class forResourceAllocation
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Constructor with parameters for the required properties ofResourceAllocation
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceAllocation
build()
ResourceAllocation.Builder
setLimit(java.lang.Double limit)
The limit property specifies the maximum bandwidth allocation for a given traffic type and is expressed in percentage.ResourceAllocation.Builder
setReservation(java.lang.Double reservation)
Minimum guaranteed bandwidth percentageResourceAllocation.Builder
setShares(java.lang.Long shares)
Shares format: int32ResourceAllocation.Builder
setTrafficType(HostInfraTrafficType trafficType)
-
-
-
Constructor Detail
-
Builder
public Builder()
Constructor with parameters for the required properties ofResourceAllocation
.
-
-
Method Detail
-
setLimit
public ResourceAllocation.Builder setLimit(java.lang.Double limit)
The limit property specifies the maximum bandwidth allocation for a given traffic type and is expressed in percentage. The default value for this field is set to -1 which means the traffic is unbounded for the traffic type. All other negative values for this property is not supported and will be rejected by the API.- Parameters:
limit
- New value for the property.
-
setReservation
public ResourceAllocation.Builder setReservation(java.lang.Double reservation)
Minimum guaranteed bandwidth percentage- Parameters:
reservation
- New value for the property.
-
setShares
public ResourceAllocation.Builder setShares(java.lang.Long shares)
Shares format: int32- Parameters:
shares
- New value for the property.
-
setTrafficType
public ResourceAllocation.Builder setTrafficType(HostInfraTrafficType trafficType)
- Parameters:
trafficType
- New value for the property.
-
build
public ResourceAllocation build()
-
-