Class ImmutableRawCloudServiceOffering.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.adapters.ImmutableRawCloudServiceOffering.Builder
-
- Enclosing class:
- ImmutableRawCloudServiceOffering
public static final class ImmutableRawCloudServiceOffering.Builder extends Object
Builds instances of typeImmutableRawCloudServiceOffering. 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
-
-
-
Method Detail
-
from
public final ImmutableRawCloudServiceOffering.Builder from(RawCloudServiceOffering instance)
Fill a builder with attribute values from the providedRawCloudServiceOfferinginstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
resource
public final ImmutableRawCloudServiceOffering.Builder resource(org.cloudfoundry.client.v2.Resource<org.cloudfoundry.client.v2.services.ServiceEntity> resource)
Initializes the value for theresourceattribute.- Parameters:
resource- The value for resource- Returns:
thisbuilder for use in a chained invocation
-
addServicePlan
public final ImmutableRawCloudServiceOffering.Builder addServicePlan(Derivable<CloudServicePlan> element)
Adds one element toservicePlanslist.- Parameters:
element- A servicePlans element- Returns:
thisbuilder for use in a chained invocation
-
addServicePlans
@SafeVarargs public final ImmutableRawCloudServiceOffering.Builder addServicePlans(Derivable<CloudServicePlan>... elements)
Adds elements toservicePlanslist.- Parameters:
elements- An array of servicePlans elements- Returns:
thisbuilder for use in a chained invocation
-
servicePlans
public final ImmutableRawCloudServiceOffering.Builder servicePlans(Iterable<? extends Derivable<CloudServicePlan>> elements)
Sets or replaces all elements forservicePlanslist.- Parameters:
elements- An iterable of servicePlans elements- Returns:
thisbuilder for use in a chained invocation
-
addAllServicePlans
public final ImmutableRawCloudServiceOffering.Builder addAllServicePlans(Iterable<? extends Derivable<CloudServicePlan>> elements)
Adds elements toservicePlanslist.- Parameters:
elements- An iterable of servicePlans elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRawCloudServiceOffering build()
Builds a newImmutableRawCloudServiceOffering.- Returns:
- An immutable instance of RawCloudServiceOffering
- Throws:
IllegalStateException- if any required attributes are missing
-
-