Package com.spotify.github.v3.repos
Class ImmutableDeployment
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableDeployment
-
- All Implemented Interfaces:
UpdateTracking,Deployment
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDeployment extends Object implements Deployment
Immutable implementation ofDeployment.Use the builder to create immutable instances:
ImmutableDeployment.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDeployment.BuilderBuilds instances of typeImmutableDeployment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeployment.Builderbuilder()Creates a builder forImmutableDeployment.static ImmutableDeploymentcopyOf(Deployment instance)Creates an immutable copy of aDeploymentvalue.GitHubInstantcreatedAt()Created dateUsercreator()Deployment creatorOptional<String>description()Optional short description.Stringenvironment()The name of the environment that was deployed to.booleanequals(Object another)This instance is equal to all instances ofImmutableDeploymentthat have equal attribute values.inthashCode()Computes a hash code from attributes:createdAt,updatedAt,url,id,sha,ref,task,payload,environment,description,creator,statusesUrl,repositoryUrl.Longid()The Deployment ID to list the statuses from.Optional<Map<String,String>>payload()Optional JSON payload with extra information about the deployment.Stringref()The name of the ref.URIrepositoryUrl()Deployment repository API URLStringsha()The SHA that was recorded at creation time.URIstatusesUrl()Deployment statuses API URLStringtask()The name of the taskStringtoString()Prints the immutable valueDeploymentwith attribute values.GitHubInstantupdatedAt()Updated dateURIurl()Deployment API URLImmutableDeploymentwithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableDeploymentwithCreator(User value)Copy the current immutable object by setting a value for thecreatorattribute.ImmutableDeploymentwithDescription(String value)Copy the current immutable object by setting a present value for the optionaldescriptionattribute.ImmutableDeploymentwithDescription(Optional<String> optional)Copy the current immutable object by setting an optional value for thedescriptionattribute.ImmutableDeploymentwithEnvironment(String value)Copy the current immutable object by setting a value for theenvironmentattribute.ImmutableDeploymentwithId(Long value)Copy the current immutable object by setting a value for theidattribute.ImmutableDeploymentwithPayload(Map<String,String> value)Copy the current immutable object by setting a present value for the optionalpayloadattribute.ImmutableDeploymentwithPayload(Optional<? extends Map<String,String>> optional)Copy the current immutable object by setting an optional value for thepayloadattribute.ImmutableDeploymentwithRef(String value)Copy the current immutable object by setting a value for therefattribute.ImmutableDeploymentwithRepositoryUrl(URI value)Copy the current immutable object by setting a value for therepositoryUrlattribute.ImmutableDeploymentwithSha(String value)Copy the current immutable object by setting a value for theshaattribute.ImmutableDeploymentwithStatusesUrl(URI value)Copy the current immutable object by setting a value for thestatusesUrlattribute.ImmutableDeploymentwithTask(String value)Copy the current immutable object by setting a value for thetaskattribute.ImmutableDeploymentwithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutableDeploymentwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAtin interfaceUpdateTracking- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAtin interfaceUpdateTracking- Returns:
- The date when the issue was updated
-
url
@Nullable public URI url()
Deployment API URL- Specified by:
urlin interfaceDeployment
-
id
@Nullable public Long id()
The Deployment ID to list the statuses from.- Specified by:
idin interfaceDeployment
-
sha
@Nullable public String sha()
The SHA that was recorded at creation time.- Specified by:
shain interfaceDeployment
-
ref
@Nullable public String ref()
The name of the ref. This can be a branch, tag, or SHA.- Specified by:
refin interfaceDeployment
-
task
@Nullable public String task()
The name of the task- Specified by:
taskin interfaceDeployment
-
payload
public Optional<Map<String,String>> payload()
Optional JSON payload with extra information about the deployment.- Specified by:
payloadin interfaceDeployment
-
environment
@Nullable public String environment()
The name of the environment that was deployed to. e.g. staging or production.- Specified by:
environmentin interfaceDeployment
-
description
public Optional<String> description()
Optional short description.- Specified by:
descriptionin interfaceDeployment
-
creator
@Nullable public User creator()
Deployment creator- Specified by:
creatorin interfaceDeployment
-
statusesUrl
@Nullable public URI statusesUrl()
Deployment statuses API URL- Specified by:
statusesUrlin interfaceDeployment
-
repositoryUrl
@Nullable public URI repositoryUrl()
Deployment repository API URL- Specified by:
repositoryUrlin interfaceDeployment
-
withCreatedAt
public final ImmutableDeployment withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createdAt (can benull)- Returns:
- A modified copy of the
thisobject
-
withUpdatedAt
public final ImmutableDeployment withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updatedAt (can benull)- Returns:
- A modified copy of the
thisobject
-
withUrl
public final ImmutableDeployment withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url (can benull)- Returns:
- A modified copy of the
thisobject
-
withId
public final ImmutableDeployment withId(@Nullable Long value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withSha
public final ImmutableDeployment withSha(@Nullable String value)
Copy the current immutable object by setting a value for theshaattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sha (can benull)- Returns:
- A modified copy of the
thisobject
-
withRef
public final ImmutableDeployment withRef(@Nullable String value)
Copy the current immutable object by setting a value for therefattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ref (can benull)- Returns:
- A modified copy of the
thisobject
-
withTask
public final ImmutableDeployment withTask(@Nullable String value)
Copy the current immutable object by setting a value for thetaskattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for task (can benull)- Returns:
- A modified copy of the
thisobject
-
withPayload
public final ImmutableDeployment withPayload(Map<String,String> value)
Copy the current immutable object by setting a present value for the optionalpayloadattribute.- Parameters:
value- The value for payload- Returns:
- A modified copy of
thisobject
-
withPayload
public final ImmutableDeployment withPayload(Optional<? extends Map<String,String>> optional)
Copy the current immutable object by setting an optional value for thepayloadattribute. 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 payload- Returns:
- A modified copy of
thisobject
-
withEnvironment
public final ImmutableDeployment withEnvironment(@Nullable String value)
Copy the current immutable object by setting a value for theenvironmentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for environment (can benull)- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableDeployment withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
public final ImmutableDeployment withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescriptionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for description- Returns:
- A modified copy of
thisobject
-
withCreator
public final ImmutableDeployment withCreator(@Nullable User value)
Copy the current immutable object by setting a value for thecreatorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for creator (can benull)- Returns:
- A modified copy of the
thisobject
-
withStatusesUrl
public final ImmutableDeployment withStatusesUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thestatusesUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for statusesUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withRepositoryUrl
public final ImmutableDeployment withRepositoryUrl(@Nullable URI value)
Copy the current immutable object by setting a value for therepositoryUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for repositoryUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableDeploymentthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:createdAt,updatedAt,url,id,sha,ref,task,payload,environment,description,creator,statusesUrl,repositoryUrl.
-
toString
public String toString()
Prints the immutable valueDeploymentwith attribute values.
-
copyOf
public static ImmutableDeployment copyOf(Deployment instance)
Creates an immutable copy of aDeploymentvalue. 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 Deployment instance
-
builder
public static ImmutableDeployment.Builder builder()
Creates a builder forImmutableDeployment.ImmutableDeployment.builder() .createdAt(com.spotify.github.GitHubInstant | null) // nullablecreatedAt.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt.url(java.net.URI | null) // nullableurl.id(Long | null) // nullableid.sha(String | null) // nullablesha.ref(String | null) // nullableref.task(String | null) // nullabletask.payload(Map<String, String>) // optionalpayload.environment(String | null) // nullableenvironment.description(String) // optionaldescription.creator(com.spotify.github.v3.User | null) // nullablecreator.statusesUrl(java.net.URI | null) // nullablestatusesUrl.repositoryUrl(java.net.URI | null) // nullablerepositoryUrl.build();- Returns:
- A new ImmutableDeployment builder
-
-