Class ImmutableCloudTask.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudTask.Builder
-
- Enclosing class:
- ImmutableCloudTask
public static final class ImmutableCloudTask.Builder extends Object
Builds instances of typeImmutableCloudTask. 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 ImmutableCloudTaskbuild()Builds a newImmutableCloudTask.ImmutableCloudTask.Buildercommand(String command)Initializes the value for thecommandattribute.ImmutableCloudTask.Builderfrom(CloudEntity instance)Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEntityinstance.ImmutableCloudTask.Builderfrom(CloudTask instance)Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudTaskinstance.ImmutableCloudTask.Builderlimits(CloudTask.Limits limits)Initializes the value for thelimitsattribute.ImmutableCloudTask.Buildermetadata(CloudMetadata metadata)Initializes the value for themetadataattribute.ImmutableCloudTask.Buildername(String name)Initializes the value for thenameattribute.ImmutableCloudTask.Builderresult(CloudTask.Result result)Initializes the value for theresultattribute.ImmutableCloudTask.Builderstate(CloudTask.State state)Initializes the value for thestateattribute.ImmutableCloudTask.Builderv3Metadata(org.cloudfoundry.client.v3.Metadata v3Metadata)Initializes the value for thev3Metadataattribute.
-
-
-
Method Detail
-
from
public final ImmutableCloudTask.Builder from(CloudTask instance)
Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudTaskinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableCloudTask.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
-
name
public final ImmutableCloudTask.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 ImmutableCloudTask.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 ImmutableCloudTask.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
-
command
public final ImmutableCloudTask.Builder command(String command)
Initializes the value for thecommandattribute.- Parameters:
command- The value for command (can benull)- Returns:
thisbuilder for use in a chained invocation
-
limits
public final ImmutableCloudTask.Builder limits(CloudTask.Limits limits)
Initializes the value for thelimitsattribute.- Parameters:
limits- The value for limits (can benull)- Returns:
thisbuilder for use in a chained invocation
-
result
public final ImmutableCloudTask.Builder result(CloudTask.Result result)
Initializes the value for theresultattribute.- Parameters:
result- The value for result (can benull)- Returns:
thisbuilder for use in a chained invocation
-
state
public final ImmutableCloudTask.Builder state(CloudTask.State state)
Initializes the value for thestateattribute.- Parameters:
state- The value for state (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCloudTask build()
Builds a newImmutableCloudTask.- Returns:
- An immutable instance of CloudTask
- Throws:
IllegalStateException- if any required attributes are missing
-
-