Class ImmutableCloudServiceInstance.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudServiceInstance.Builder
-
- Enclosing class:
- ImmutableCloudServiceInstance
public static final class ImmutableCloudServiceInstance.Builder extends Object
Builds instances of typeImmutableCloudServiceInstance. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCloudServiceInstance.BuilderaddAllTags(Iterable<String> elements)Adds elements totagslist.ImmutableCloudServiceInstance.BuilderaddTag(String element)Adds one element totagslist.ImmutableCloudServiceInstance.BuilderaddTags(String... elements)Adds elements totagslist.ImmutableCloudServiceInstance.Builderbroker(String broker)Initializes the value for thebrokerattribute.ImmutableCloudServiceInstancebuild()Builds a newImmutableCloudServiceInstance.ImmutableCloudServiceInstance.Buildercredentials(Map<String,? extends Object> entries)Sets or replaces all mappings from the specified map as entries for thecredentialsmap.ImmutableCloudServiceInstance.Builderfrom(CloudEntity instance)Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEntityinstance.ImmutableCloudServiceInstance.Builderfrom(CloudServiceInstance instance)Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudServiceInstanceinstance.ImmutableCloudServiceInstance.Builderlabel(String label)Initializes the value for thelabelattribute.ImmutableCloudServiceInstance.BuilderlastOperation(ServiceOperation lastOperation)Initializes the value for thelastOperationattribute.ImmutableCloudServiceInstance.Buildermetadata(CloudMetadata metadata)Initializes the value for themetadataattribute.ImmutableCloudServiceInstance.Buildername(String name)Initializes the value for thenameattribute.ImmutableCloudServiceInstance.Builderplan(String plan)Initializes the value for theplanattribute.ImmutableCloudServiceInstance.Builderprovider(String provider)Initializes the value for theproviderattribute.ImmutableCloudServiceInstance.BuilderputAllCredentials(Map<String,? extends Object> entries)Put all mappings from the specified map as entries tocredentialsmap.ImmutableCloudServiceInstance.BuilderputCredential(String key, Object value)Put one entry to thecredentialsmap.ImmutableCloudServiceInstance.BuilderputCredential(Map.Entry<String,? extends Object> entry)Put one entry to thecredentialsmap.ImmutableCloudServiceInstance.Buildertags(Iterable<String> elements)Sets or replaces all elements fortagslist.ImmutableCloudServiceInstance.Buildertype(ServiceInstanceType type)Initializes the value for thetypeattribute.ImmutableCloudServiceInstance.Builderv3Metadata(org.cloudfoundry.client.v3.Metadata v3Metadata)Initializes the value for thev3Metadataattribute.ImmutableCloudServiceInstance.Builderversion(String version)Initializes the value for theversionattribute.
-
-
-
Method Detail
-
from
public final ImmutableCloudServiceInstance.Builder from(CloudEntity instance)
Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEntityinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableCloudServiceInstance.Builder from(CloudServiceInstance instance)
Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudServiceInstanceinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
public final ImmutableCloudServiceInstance.Builder name(String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
metadata
public final ImmutableCloudServiceInstance.Builder metadata(CloudMetadata metadata)
Initializes the value for themetadataattribute.- Parameters:
metadata- The value for metadata (can benull)- Returns:
thisbuilder for use in a chained invocation
-
v3Metadata
public final ImmutableCloudServiceInstance.Builder v3Metadata(org.cloudfoundry.client.v3.Metadata v3Metadata)
Initializes the value for thev3Metadataattribute.- Parameters:
v3Metadata- The value for v3Metadata (can benull)- Returns:
thisbuilder for use in a chained invocation
-
label
public final ImmutableCloudServiceInstance.Builder label(String label)
Initializes the value for thelabelattribute.- Parameters:
label- The value for label (can benull)- Returns:
thisbuilder for use in a chained invocation
-
plan
public final ImmutableCloudServiceInstance.Builder plan(String plan)
Initializes the value for theplanattribute.- Parameters:
plan- The value for plan (can benull)- Returns:
thisbuilder for use in a chained invocation
-
provider
public final ImmutableCloudServiceInstance.Builder provider(String provider)
Initializes the value for theproviderattribute.- Parameters:
provider- The value for provider (can benull)- Returns:
thisbuilder for use in a chained invocation
-
broker
public final ImmutableCloudServiceInstance.Builder broker(String broker)
Initializes the value for thebrokerattribute.- Parameters:
broker- The value for broker (can benull)- Returns:
thisbuilder for use in a chained invocation
-
version
public final ImmutableCloudServiceInstance.Builder version(String version)
Initializes the value for theversionattribute.- Parameters:
version- The value for version (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putCredential
public final ImmutableCloudServiceInstance.Builder putCredential(String key, Object value)
Put one entry to thecredentialsmap.- Parameters:
key- The key in the credentials mapvalue- The associated value in the credentials map- Returns:
thisbuilder for use in a chained invocation
-
putCredential
public final ImmutableCloudServiceInstance.Builder putCredential(Map.Entry<String,? extends Object> entry)
Put one entry to thecredentialsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
credentials
public final ImmutableCloudServiceInstance.Builder credentials(Map<String,? extends Object> entries)
Sets or replaces all mappings from the specified map as entries for thecredentialsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the credentials map- Returns:
thisbuilder for use in a chained invocation
-
putAllCredentials
public final ImmutableCloudServiceInstance.Builder putAllCredentials(Map<String,? extends Object> entries)
Put all mappings from the specified map as entries tocredentialsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the credentials map- Returns:
thisbuilder for use in a chained invocation
-
addTag
public final ImmutableCloudServiceInstance.Builder addTag(String element)
Adds one element totagslist.- Parameters:
element- A tags element- Returns:
thisbuilder for use in a chained invocation
-
addTags
public final ImmutableCloudServiceInstance.Builder addTags(String... elements)
Adds elements totagslist.- Parameters:
elements- An array of tags elements- Returns:
thisbuilder for use in a chained invocation
-
tags
public final ImmutableCloudServiceInstance.Builder tags(Iterable<String> elements)
Sets or replaces all elements fortagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTags
public final ImmutableCloudServiceInstance.Builder addAllTags(Iterable<String> elements)
Adds elements totagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
type
public final ImmutableCloudServiceInstance.Builder type(ServiceInstanceType type)
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
lastOperation
public final ImmutableCloudServiceInstance.Builder lastOperation(ServiceOperation lastOperation)
Initializes the value for thelastOperationattribute.- Parameters:
lastOperation- The value for lastOperation (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCloudServiceInstance build()
Builds a newImmutableCloudServiceInstance.- Returns:
- An immutable instance of CloudServiceInstance
- Throws:
IllegalStateException- if any required attributes are missing
-
-