public static final class ServiceOffering.Builder extends Object
ServiceOffering.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ServiceOffering.Builder |
addAllServicePlans(Iterable<? extends ServicePlan> elements)
Adds elements to
servicePlans list. |
ServiceOffering |
build()
Builds a new
ServiceOffering. |
ServiceOffering.Builder |
description(String description)
Initializes the value for the
description attribute. |
ServiceOffering.Builder |
from(ServiceOffering instance)
Fill a builder with attribute values from the provided
ServiceOffering instance. |
ServiceOffering.Builder |
id(String id)
Initializes the value for the
id attribute. |
ServiceOffering.Builder |
label(String label)
Initializes the value for the
label attribute. |
ServiceOffering.Builder |
servicePlan(ServicePlan... elements)
Adds elements to
servicePlans list. |
ServiceOffering.Builder |
servicePlan(ServicePlan element)
Adds one element to
servicePlans list. |
ServiceOffering.Builder |
servicePlans(Iterable<? extends ServicePlan> elements)
Sets or replaces all elements for
servicePlans list. |
public final ServiceOffering.Builder from(ServiceOffering instance)
ServiceOffering instance.
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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ServiceOffering.Builder description(String description)
description attribute.description - The value for descriptionthis builder for use in a chained invocationpublic final ServiceOffering.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic final ServiceOffering.Builder label(String label)
label attribute.label - The value for labelthis builder for use in a chained invocationpublic final ServiceOffering.Builder servicePlan(ServicePlan element)
servicePlans list.element - A servicePlans elementthis builder for use in a chained invocationpublic final ServiceOffering.Builder servicePlan(ServicePlan... elements)
servicePlans list.elements - An array of servicePlans elementsthis builder for use in a chained invocationpublic final ServiceOffering.Builder servicePlans(Iterable<? extends ServicePlan> elements)
servicePlans list.elements - An iterable of servicePlans elementsthis builder for use in a chained invocationpublic final ServiceOffering.Builder addAllServicePlans(Iterable<? extends ServicePlan> elements)
servicePlans list.elements - An iterable of servicePlans elementsthis builder for use in a chained invocationpublic ServiceOffering build()
ServiceOffering.IllegalStateException - if any required attributes are missingCopyright © 2017 Pivotal Software, Inc.. All rights reserved.