Class ImmutableRawCloudServiceKey.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.adapters.ImmutableRawCloudServiceKey.Builder
-
- Enclosing class:
- ImmutableRawCloudServiceKey
public static final class ImmutableRawCloudServiceKey.Builder extends Object
Builds instances of typeImmutableRawCloudServiceKey. 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 ImmutableRawCloudServiceKeybuild()Builds a newImmutableRawCloudServiceKey.ImmutableRawCloudServiceKey.Buildercredentials(Map<String,? extends Object> entries)Sets or replaces all mappings from the specified map as entries for thecredentialsmap.ImmutableRawCloudServiceKey.Builderfrom(RawCloudServiceKey instance)Fill a builder with attribute values from the providedRawCloudServiceKeyinstance.ImmutableRawCloudServiceKey.BuilderputAllCredentials(Map<String,? extends Object> entries)Put all mappings from the specified map as entries tocredentialsmap.ImmutableRawCloudServiceKey.BuilderputCredential(String key, Object value)Put one entry to thecredentialsmap.ImmutableRawCloudServiceKey.BuilderputCredential(Map.Entry<String,? extends Object> entry)Put one entry to thecredentialsmap.ImmutableRawCloudServiceKey.BuilderserviceBindingResource(org.cloudfoundry.client.v3.servicebindings.ServiceBindingResource serviceBindingResource)Initializes the value for theserviceBindingResourceattribute.ImmutableRawCloudServiceKey.BuilderserviceInstance(Derivable<CloudServiceInstance> serviceInstance)Initializes the value for theserviceInstanceattribute.
-
-
-
Method Detail
-
from
public final ImmutableRawCloudServiceKey.Builder from(RawCloudServiceKey instance)
Fill a builder with attribute values from the providedRawCloudServiceKeyinstance. 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
-
serviceBindingResource
public final ImmutableRawCloudServiceKey.Builder serviceBindingResource(org.cloudfoundry.client.v3.servicebindings.ServiceBindingResource serviceBindingResource)
Initializes the value for theserviceBindingResourceattribute.- Parameters:
serviceBindingResource- The value for serviceBindingResource- Returns:
thisbuilder for use in a chained invocation
-
putCredential
public final ImmutableRawCloudServiceKey.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 ImmutableRawCloudServiceKey.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 ImmutableRawCloudServiceKey.Builder credentials(Map<String,? extends Object> entries)
Sets or replaces all mappings from the specified map as entries for thecredentialsmap. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries- The entries that will be added to the credentials map- Returns:
thisbuilder for use in a chained invocation
-
putAllCredentials
public final ImmutableRawCloudServiceKey.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
-
serviceInstance
public final ImmutableRawCloudServiceKey.Builder serviceInstance(Derivable<CloudServiceInstance> serviceInstance)
Initializes the value for theserviceInstanceattribute.- Parameters:
serviceInstance- The value for serviceInstance- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRawCloudServiceKey build()
Builds a newImmutableRawCloudServiceKey.- Returns:
- An immutable instance of RawCloudServiceKey
- Throws:
IllegalStateException- if any required attributes are missing
-
-