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 class
ImmutableDeployment.Builder
Builds instances of typeImmutableDeployment
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeployment.Builder
builder()
Creates a builder forImmutableDeployment
.static ImmutableDeployment
copyOf(Deployment instance)
Creates an immutable copy of aDeployment
value.GitHubInstant
createdAt()
Created dateUser
creator()
Deployment creatorOptional<String>
description()
Optional short description.String
environment()
The name of the environment that was deployed to.boolean
equals(Object another)
This instance is equal to all instances ofImmutableDeployment
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,url
,id
,sha
,ref
,task
,payload
,environment
,description
,creator
,statusesUrl
,repositoryUrl
.Long
id()
The Deployment ID to list the statuses from.Optional<Map<String,String>>
payload()
Optional JSON payload with extra information about the deployment.String
ref()
The name of the ref.URI
repositoryUrl()
Deployment repository API URLString
sha()
The SHA that was recorded at creation time.URI
statusesUrl()
Deployment statuses API URLString
task()
The name of the taskString
toString()
Prints the immutable valueDeployment
with attribute values.GitHubInstant
updatedAt()
Updated dateURI
url()
Deployment API URLImmutableDeployment
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableDeployment
withCreator(User value)
Copy the current immutable object by setting a value for thecreator
attribute.ImmutableDeployment
withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.ImmutableDeployment
withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute.ImmutableDeployment
withEnvironment(String value)
Copy the current immutable object by setting a value for theenvironment
attribute.ImmutableDeployment
withId(Long value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableDeployment
withPayload(Map<String,String> value)
Copy the current immutable object by setting a present value for the optionalpayload
attribute.ImmutableDeployment
withPayload(Optional<? extends Map<String,String>> optional)
Copy the current immutable object by setting an optional value for thepayload
attribute.ImmutableDeployment
withRef(String value)
Copy the current immutable object by setting a value for theref
attribute.ImmutableDeployment
withRepositoryUrl(URI value)
Copy the current immutable object by setting a value for therepositoryUrl
attribute.ImmutableDeployment
withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute.ImmutableDeployment
withStatusesUrl(URI value)
Copy the current immutable object by setting a value for thestatusesUrl
attribute.ImmutableDeployment
withTask(String value)
Copy the current immutable object by setting a value for thetask
attribute.ImmutableDeployment
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute.ImmutableDeployment
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was updated
-
url
@Nullable public URI url()
Deployment API URL- Specified by:
url
in interfaceDeployment
-
id
@Nullable public Long id()
The Deployment ID to list the statuses from.- Specified by:
id
in interfaceDeployment
-
sha
@Nullable public String sha()
The SHA that was recorded at creation time.- Specified by:
sha
in interfaceDeployment
-
ref
@Nullable public String ref()
The name of the ref. This can be a branch, tag, or SHA.- Specified by:
ref
in interfaceDeployment
-
task
@Nullable public String task()
The name of the task- Specified by:
task
in interfaceDeployment
-
payload
public Optional<Map<String,String>> payload()
Optional JSON payload with extra information about the deployment.- Specified by:
payload
in interfaceDeployment
-
environment
@Nullable public String environment()
The name of the environment that was deployed to. e.g. staging or production.- Specified by:
environment
in interfaceDeployment
-
description
public Optional<String> description()
Optional short description.- Specified by:
description
in interfaceDeployment
-
creator
@Nullable public User creator()
Deployment creator- Specified by:
creator
in interfaceDeployment
-
statusesUrl
@Nullable public URI statusesUrl()
Deployment statuses API URL- Specified by:
statusesUrl
in interfaceDeployment
-
repositoryUrl
@Nullable public URI repositoryUrl()
Deployment repository API URL- Specified by:
repositoryUrl
in interfaceDeployment
-
withCreatedAt
public final ImmutableDeployment withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute. 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
this
object
-
withUpdatedAt
public final ImmutableDeployment withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute. 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
this
object
-
withUrl
public final ImmutableDeployment withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. 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
this
object
-
withId
public final ImmutableDeployment withId(@Nullable Long value)
Copy the current immutable object by setting a value for theid
attribute. 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
this
object
-
withSha
public final ImmutableDeployment withSha(@Nullable String value)
Copy the current immutable object by setting a value for thesha
attribute. 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
this
object
-
withRef
public final ImmutableDeployment withRef(@Nullable String value)
Copy the current immutable object by setting a value for theref
attribute. 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
this
object
-
withTask
public final ImmutableDeployment withTask(@Nullable String value)
Copy the current immutable object by setting a value for thetask
attribute. 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
this
object
-
withPayload
public final ImmutableDeployment withPayload(Map<String,String> value)
Copy the current immutable object by setting a present value for the optionalpayload
attribute.- Parameters:
value
- The value for payload- Returns:
- A modified copy of
this
object
-
withPayload
public final ImmutableDeployment withPayload(Optional<? extends Map<String,String>> optional)
Copy the current immutable object by setting an optional value for thepayload
attribute. 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
this
object
-
withEnvironment
public final ImmutableDeployment withEnvironment(@Nullable String value)
Copy the current immutable object by setting a value for theenvironment
attribute. 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
this
object
-
withDescription
public final ImmutableDeployment withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.- Parameters:
value
- The value for description- Returns:
- A modified copy of
this
object
-
withDescription
public final ImmutableDeployment withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute. 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
this
object
-
withCreator
public final ImmutableDeployment withCreator(@Nullable User value)
Copy the current immutable object by setting a value for thecreator
attribute. 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
this
object
-
withStatusesUrl
public final ImmutableDeployment withStatusesUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thestatusesUrl
attribute. 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
this
object
-
withRepositoryUrl
public final ImmutableDeployment withRepositoryUrl(@Nullable URI value)
Copy the current immutable object by setting a value for therepositoryUrl
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDeployment
that 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 valueDeployment
with attribute values.
-
copyOf
public static ImmutableDeployment copyOf(Deployment instance)
Creates an immutable copy of aDeployment
value. 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) // nullable
createdAt
.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
-
-