Package com.io7m.coffeepick.runtime
Class RuntimeRepositoryDescription
- java.lang.Object
-
- com.io7m.coffeepick.runtime.RuntimeRepositoryDescription
-
- All Implemented Interfaces:
RuntimeRepositoryDescriptionType
public final class RuntimeRepositoryDescription extends java.lang.Object implements RuntimeRepositoryDescriptionType
A repository of runtimes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRuntimeRepositoryDescription.BuilderBuilds instances of typeRuntimeRepositoryDescription.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeRepositoryBrandingbranding()static RuntimeRepositoryDescription.Builderbuilder()Creates a builder forRuntimeRepositoryDescription.static RuntimeRepositoryDescriptioncopyOf(RuntimeRepositoryDescriptionType instance)Creates an immutable copy of aRuntimeRepositoryDescriptionTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryDescriptionthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,updated,runtimes,branding.java.net.URIid()java.util.Map<java.lang.String,RuntimeDescription>runtimes()java.lang.StringtoString()Prints the immutable valueRuntimeRepositoryDescriptionwith attribute values.java.util.Optional<java.time.OffsetDateTime>updated()RuntimeRepositoryDescriptionwithBranding(RuntimeRepositoryBranding value)Copy the current immutable object by setting a value for thebrandingattribute.RuntimeRepositoryDescriptionwithId(java.net.URI value)Copy the current immutable object by setting a value for theidattribute.RuntimeRepositoryDescriptionwithRuntimes(java.util.Map<java.lang.String,? extends RuntimeDescription> entries)Copy the current immutable object by replacing theruntimesmap with the specified map.RuntimeRepositoryDescriptionwithUpdated(java.time.OffsetDateTime value)Copy the current immutable object by setting a present value for the optionalupdatedattribute.RuntimeRepositoryDescriptionwithUpdated(java.util.Optional<? extends java.time.OffsetDateTime> optional)Copy the current immutable object by setting an optional value for theupdatedattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.coffeepick.runtime.RuntimeRepositoryDescriptionType
checkPreconditions
-
-
-
-
Method Detail
-
id
public java.net.URI id()
- Specified by:
idin interfaceRuntimeRepositoryDescriptionType- Returns:
- The unique ID of the repository
-
updated
public java.util.Optional<java.time.OffsetDateTime> updated()
- Specified by:
updatedin interfaceRuntimeRepositoryDescriptionType- Returns:
- The time of the last update of the repository
-
runtimes
public java.util.Map<java.lang.String,RuntimeDescription> runtimes()
- Specified by:
runtimesin interfaceRuntimeRepositoryDescriptionType- Returns:
- The runtimes available in the repository
-
branding
public RuntimeRepositoryBranding branding()
- Specified by:
brandingin interfaceRuntimeRepositoryDescriptionType- Returns:
- Branding information for the repository
-
withId
public final RuntimeRepositoryDescription withId(java.net.URI value)
Copy the current immutable object by setting a value for theidattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withUpdated
public final RuntimeRepositoryDescription withUpdated(java.time.OffsetDateTime value)
Copy the current immutable object by setting a present value for the optionalupdatedattribute.- Parameters:
value- The value for updated- Returns:
- A modified copy of
thisobject
-
withUpdated
public final RuntimeRepositoryDescription withUpdated(java.util.Optional<? extends java.time.OffsetDateTime> optional)
Copy the current immutable object by setting an optional value for theupdatedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for updated- Returns:
- A modified copy of
thisobject
-
withRuntimes
public final RuntimeRepositoryDescription withRuntimes(java.util.Map<java.lang.String,? extends RuntimeDescription> entries)
Copy the current immutable object by replacing theruntimesmap 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 runtimes map- Returns:
- A modified copy of
thisobject
-
withBranding
public final RuntimeRepositoryDescription withBranding(RuntimeRepositoryBranding value)
Copy the current immutable object by setting a value for thebrandingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for branding- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofRuntimeRepositoryDescriptionthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,updated,runtimes,branding.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueRuntimeRepositoryDescriptionwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static RuntimeRepositoryDescription copyOf(RuntimeRepositoryDescriptionType instance)
Creates an immutable copy of aRuntimeRepositoryDescriptionTypevalue. 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 RuntimeRepositoryDescription instance
-
builder
public static RuntimeRepositoryDescription.Builder builder()
Creates a builder forRuntimeRepositoryDescription.RuntimeRepositoryDescription.builder() .setId(java.net.URI) // requiredid.setUpdated(java.time.OffsetDateTime) // optionalupdated.putRuntimes|putAllRuntimes(String => RuntimeDescription) //runtimesmappings .setBranding(com.io7m.coffeepick.runtime.RuntimeRepositoryBranding) // requiredbranding.build();- Returns:
- A new RuntimeRepositoryDescription builder
-
-