public static final class ServiceInstance.Builder extends Object
ServiceInstance.
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 |
|---|---|
ServiceInstance.Builder |
addAllSharedTo(Iterable<? extends Share> elements)
Adds elements to
sharedTo list. |
ServiceInstance.Builder |
boundApplicationCount(Integer boundApplicationCount)
Initializes the value for the
boundApplicationCount attribute. |
ServiceInstance |
build()
Builds a new
ServiceInstance. |
ServiceInstance.Builder |
dashboardUrl(String dashboardUrl)
Initializes the value for the
dashboardUrl attribute. |
ServiceInstance.Builder |
from(ServiceInstance instance)
Fill a builder with attribute values from the provided
ServiceInstance instance. |
ServiceInstance.Builder |
id(String id)
Initializes the value for the
id attribute. |
ServiceInstance.Builder |
lastOperation(LastOperation lastOperation)
Initializes the value for the
lastOperation attribute. |
ServiceInstance.Builder |
maintenanceInfo(MaintenanceInfo maintenanceInfo)
Initializes the value for the
maintenanceInfo attribute. |
ServiceInstance.Builder |
name(String name)
Initializes the value for the
name attribute. |
ServiceInstance.Builder |
serviceBrokerName(String serviceBrokerName)
Initializes the value for the
serviceBrokerName attribute. |
ServiceInstance.Builder |
servicePlan(Plan servicePlan)
Initializes the value for the
servicePlan attribute. |
ServiceInstance.Builder |
sharedFrom(Share sharedFrom)
Initializes the value for the
sharedFrom attribute. |
ServiceInstance.Builder |
sharedTo(Iterable<? extends Share> elements)
Sets or replaces all elements for
sharedTo list. |
ServiceInstance.Builder |
sharedTo(Share... elements)
Adds elements to
sharedTo list. |
ServiceInstance.Builder |
sharedTo(Share element)
Adds one element to
sharedTo list. |
ServiceInstance.Builder |
type(String type)
Initializes the value for the
type attribute. |
public final ServiceInstance.Builder from(ServiceInstance instance)
ServiceInstance 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 ServiceInstance.Builder boundApplicationCount(Integer boundApplicationCount)
boundApplicationCount attribute.boundApplicationCount - The value for boundApplicationCount (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder dashboardUrl(String dashboardUrl)
dashboardUrl attribute.dashboardUrl - The value for dashboardUrl (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder id(String id)
id attribute.id - The value for id (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder lastOperation(LastOperation lastOperation)
lastOperation attribute.lastOperation - The value for lastOperation (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder maintenanceInfo(MaintenanceInfo maintenanceInfo)
maintenanceInfo attribute.maintenanceInfo - The value for maintenanceInfo (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder name(String name)
name attribute.name - The value for name (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder serviceBrokerName(String serviceBrokerName)
serviceBrokerName attribute.serviceBrokerName - The value for serviceBrokerName (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder servicePlan(Plan servicePlan)
servicePlan attribute.servicePlan - The value for servicePlan (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder sharedFrom(Share sharedFrom)
sharedFrom attribute.sharedFrom - The value for sharedFrom (can be null)this builder for use in a chained invocationpublic final ServiceInstance.Builder sharedTo(Share element)
sharedTo list.element - A sharedTo elementthis builder for use in a chained invocationpublic final ServiceInstance.Builder sharedTo(Share... elements)
sharedTo list.elements - An array of sharedTo elementsthis builder for use in a chained invocationpublic final ServiceInstance.Builder sharedTo(Iterable<? extends Share> elements)
sharedTo list.elements - An iterable of sharedTo elementsthis builder for use in a chained invocationpublic final ServiceInstance.Builder addAllSharedTo(Iterable<? extends Share> elements)
sharedTo list.elements - An iterable of sharedTo elementsthis builder for use in a chained invocationpublic final ServiceInstance.Builder type(String type)
type attribute.type - The value for type (can be null)this builder for use in a chained invocationpublic ServiceInstance build()
ServiceInstance.IllegalStateException - if any required attributes are missingCopyright © 2020. All rights reserved.