Class ImmutableCloudApplication
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.CloudEntity
-
- com.sap.cloudfoundry.client.facade.domain.CloudApplication
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudApplication
-
- All Implemented Interfaces:
Derivable<CloudApplication>
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableCloudApplication extends CloudApplication
Immutable implementation ofCloudApplication.Use the builder to create immutable instances:
ImmutableCloudApplication.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudApplication.BuilderBuilds instances of typeImmutableCloudApplication.-
Nested classes/interfaces inherited from class com.sap.cloudfoundry.client.facade.domain.CloudApplication
CloudApplication.State
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudApplication.Builderbuilder()Creates a builder forImmutableCloudApplication.static ImmutableCloudApplicationcopyOf(CloudApplication instance)Creates an immutable copy of aCloudApplicationvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCloudApplicationthat have equal attribute values.intgetDiskQuota()Map<String,String>getEnv()intgetInstances()intgetMemory()CloudMetadatagetMetadata()StringgetName()PackageStategetPackageState()intgetRunningInstances()List<String>getServices()CloudSpacegetSpace()StaginggetStaging()StringgetStagingError()CloudApplication.StategetState()List<String>getUris()org.cloudfoundry.client.v3.MetadatagetV3Metadata()inthashCode()Computes a hash code from attributes:name,metadata,v3Metadata,memory,diskQuota,instances,runningInstances,state,staging,packageState,stagingError,uris,services,env,space.StringtoString()Prints the immutable valueCloudApplicationwith attribute values.ImmutableCloudApplicationwithDiskQuota(int value)Copy the current immutable object by setting a value for thediskQuotaattribute.ImmutableCloudApplicationwithEnv(Map<String,? extends String> entries)Copy the current immutable object by replacing theenvmap with the specified map.ImmutableCloudApplicationwithInstances(int value)Copy the current immutable object by setting a value for theinstancesattribute.ImmutableCloudApplicationwithMemory(int value)Copy the current immutable object by setting a value for thememoryattribute.ImmutableCloudApplicationwithMetadata(CloudMetadata value)Copy the current immutable object by setting a value for themetadataattribute.ImmutableCloudApplicationwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCloudApplicationwithPackageState(PackageState value)Copy the current immutable object by setting a value for thepackageStateattribute.ImmutableCloudApplicationwithRunningInstances(int value)Copy the current immutable object by setting a value for therunningInstancesattribute.ImmutableCloudApplicationwithServices(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofservices.ImmutableCloudApplicationwithServices(String... elements)Copy the current immutable object with elements that replace the content ofservices.ImmutableCloudApplicationwithSpace(CloudSpace value)Copy the current immutable object by setting a value for thespaceattribute.ImmutableCloudApplicationwithStaging(Staging value)Copy the current immutable object by setting a value for thestagingattribute.ImmutableCloudApplicationwithStagingError(String value)Copy the current immutable object by setting a value for thestagingErrorattribute.ImmutableCloudApplicationwithState(CloudApplication.State value)Copy the current immutable object by setting a value for thestateattribute.ImmutableCloudApplicationwithUris(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofuris.ImmutableCloudApplicationwithUris(String... elements)Copy the current immutable object with elements that replace the content ofuris.ImmutableCloudApplicationwithV3Metadata(org.cloudfoundry.client.v3.Metadata value)Copy the current immutable object by setting a value for thev3Metadataattribute.-
Methods inherited from class com.sap.cloudfoundry.client.facade.domain.CloudApplication
derive
-
Methods inherited from class com.sap.cloudfoundry.client.facade.domain.CloudEntity
getGuid
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein classCloudEntity- Returns:
- The value of the
nameattribute
-
getMetadata
public CloudMetadata getMetadata()
- Specified by:
getMetadatain classCloudEntity- Returns:
- The value of the
metadataattribute
-
getV3Metadata
public org.cloudfoundry.client.v3.Metadata getV3Metadata()
- Specified by:
getV3Metadatain classCloudEntity- Returns:
- The value of the
v3Metadataattribute
-
getMemory
public int getMemory()
- Overrides:
getMemoryin classCloudApplication- Returns:
- The value of the
memoryattribute
-
getDiskQuota
public int getDiskQuota()
- Overrides:
getDiskQuotain classCloudApplication- Returns:
- The value of the
diskQuotaattribute
-
getInstances
public int getInstances()
- Overrides:
getInstancesin classCloudApplication- Returns:
- The value of the
instancesattribute
-
getRunningInstances
public int getRunningInstances()
- Overrides:
getRunningInstancesin classCloudApplication- Returns:
- The value of the
runningInstancesattribute
-
getState
public CloudApplication.State getState()
- Specified by:
getStatein classCloudApplication- Returns:
- The value of the
stateattribute
-
getStaging
public Staging getStaging()
- Specified by:
getStagingin classCloudApplication- Returns:
- The value of the
stagingattribute
-
getPackageState
public PackageState getPackageState()
- Specified by:
getPackageStatein classCloudApplication- Returns:
- The value of the
packageStateattribute
-
getStagingError
public String getStagingError()
- Specified by:
getStagingErrorin classCloudApplication- Returns:
- The value of the
stagingErrorattribute
-
getUris
public List<String> getUris()
- Specified by:
getUrisin classCloudApplication- Returns:
- The value of the
urisattribute
-
getServices
public List<String> getServices()
- Specified by:
getServicesin classCloudApplication- Returns:
- The value of the
servicesattribute
-
getEnv
public Map<String,String> getEnv()
- Specified by:
getEnvin classCloudApplication- Returns:
- The value of the
envattribute
-
getSpace
public CloudSpace getSpace()
- Specified by:
getSpacein classCloudApplication- Returns:
- The value of the
spaceattribute
-
withName
public final ImmutableCloudApplication withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withMetadata
public final ImmutableCloudApplication withMetadata(CloudMetadata value)
Copy the current immutable object by setting a value for themetadataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for metadata (can benull)- Returns:
- A modified copy of the
thisobject
-
withV3Metadata
public final ImmutableCloudApplication withV3Metadata(org.cloudfoundry.client.v3.Metadata value)
Copy the current immutable object by setting a value for thev3Metadataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for v3Metadata (can benull)- Returns:
- A modified copy of the
thisobject
-
withMemory
public final ImmutableCloudApplication withMemory(int value)
Copy the current immutable object by setting a value for thememoryattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for memory- Returns:
- A modified copy of the
thisobject
-
withDiskQuota
public final ImmutableCloudApplication withDiskQuota(int value)
Copy the current immutable object by setting a value for thediskQuotaattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for diskQuota- Returns:
- A modified copy of the
thisobject
-
withInstances
public final ImmutableCloudApplication withInstances(int value)
Copy the current immutable object by setting a value for theinstancesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for instances- Returns:
- A modified copy of the
thisobject
-
withRunningInstances
public final ImmutableCloudApplication withRunningInstances(int value)
Copy the current immutable object by setting a value for therunningInstancesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for runningInstances- Returns:
- A modified copy of the
thisobject
-
withState
public final ImmutableCloudApplication withState(CloudApplication.State value)
Copy the current immutable object by setting a value for thestateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state (can benull)- Returns:
- A modified copy of the
thisobject
-
withStaging
public final ImmutableCloudApplication withStaging(Staging value)
Copy the current immutable object by setting a value for thestagingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for staging (can benull)- Returns:
- A modified copy of the
thisobject
-
withPackageState
public final ImmutableCloudApplication withPackageState(PackageState value)
Copy the current immutable object by setting a value for thepackageStateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for packageState (can benull)- Returns:
- A modified copy of the
thisobject
-
withStagingError
public final ImmutableCloudApplication withStagingError(String value)
Copy the current immutable object by setting a value for thestagingErrorattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for stagingError (can benull)- Returns:
- A modified copy of the
thisobject
-
withUris
public final ImmutableCloudApplication withUris(String... elements)
Copy the current immutable object with elements that replace the content ofuris.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withUris
public final ImmutableCloudApplication withUris(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofuris. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of uris elements to set- Returns:
- A modified copy of
thisobject
-
withServices
public final ImmutableCloudApplication withServices(String... elements)
Copy the current immutable object with elements that replace the content ofservices.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withServices
public final ImmutableCloudApplication withServices(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofservices. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of services elements to set- Returns:
- A modified copy of
thisobject
-
withEnv
public final ImmutableCloudApplication withEnv(Map<String,? extends String> entries)
Copy the current immutable object by replacing theenvmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the env map- Returns:
- A modified copy of
thisobject
-
withSpace
public final ImmutableCloudApplication withSpace(CloudSpace value)
Copy the current immutable object by setting a value for thespaceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for space (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableCloudApplicationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,metadata,v3Metadata,memory,diskQuota,instances,runningInstances,state,staging,packageState,stagingError,uris,services,env,space.
-
toString
public String toString()
Prints the immutable valueCloudApplicationwith attribute values.
-
copyOf
public static ImmutableCloudApplication copyOf(CloudApplication instance)
Creates an immutable copy of aCloudApplicationvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CloudApplication instance
-
builder
public static ImmutableCloudApplication.Builder builder()
Creates a builder forImmutableCloudApplication.ImmutableCloudApplication.builder() .name(String | null) // nullablename.metadata(com.sap.cloudfoundry.client.facade.domain.CloudMetadata | null) // nullablemetadata.v3Metadata(org.cloudfoundry.client.v3.Metadata | null) // nullablev3Metadata.memory(int) // optionalmemory.diskQuota(int) // optionaldiskQuota.instances(int) // optionalinstances.runningInstances(int) // optionalrunningInstances.state(com.sap.cloudfoundry.client.facade.domain.CloudApplication.State | null) // nullablestate.staging(com.sap.cloudfoundry.client.facade.domain.Staging | null) // nullablestaging.packageState(com.sap.cloudfoundry.client.facade.domain.PackageState | null) // nullablepackageState.stagingError(String | null) // nullablestagingError.addUri|addAllUris(String) //uriselements .addService|addAllServices(String) //serviceselements .putEnv|putAllEnv(String => String) //envmappings .space(com.sap.cloudfoundry.client.facade.domain.CloudSpace | null) // nullablespace.build();- Returns:
- A new ImmutableCloudApplication builder
-
-