Class ImmutableDeploymentStatusEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableDeploymentStatusEvent
-
- All Implemented Interfaces:
BaseEvent,DeploymentStatusEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDeploymentStatusEvent extends Object implements DeploymentStatusEvent
Immutable implementation ofDeploymentStatusEvent.Use the builder to create immutable instances:
ImmutableDeploymentStatusEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDeploymentStatusEvent.BuilderBuilds instances of typeImmutableDeploymentStatusEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeploymentStatusEvent.Builderbuilder()Creates a builder forImmutableDeploymentStatusEvent.static ImmutableDeploymentStatusEventcopyOf(DeploymentStatusEvent instance)Creates an immutable copy of aDeploymentStatusEventvalue.Deploymentdeployment()DeploymentStatusdeploymentStatus()The deployment status.booleanequals(Object another)This instance is equal to all instances ofImmutableDeploymentStatusEventthat have equal attribute values.EventInstallationeventInstallation()TheEventInstallation, if the event comes from a Github App.inthashCode()Computes a hash code from attributes:repository,sender,eventInstallation,deploymentStatus,deployment.Repositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valueDeploymentStatusEventwith attribute values.ImmutableDeploymentStatusEventwithDeployment(Deployment value)Copy the current immutable object by setting a value for thedeploymentattribute.ImmutableDeploymentStatusEventwithDeploymentStatus(Status value)Copy the current immutable object by setting a value for thedeploymentStatusattribute.ImmutableDeploymentStatusEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutableDeploymentStatusEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableDeploymentStatusEventwithSender(User value)Copy the current immutable object by setting a value for thesenderattribute.
-
-
-
Method Detail
-
repository
@Nullable public Repository repository()
TheRepository- Specified by:
repositoryin interfaceBaseEvent
-
eventInstallation
@Nullable public EventInstallation eventInstallation()
TheEventInstallation, if the event comes from a Github App.- Specified by:
eventInstallationin interfaceBaseEvent
-
deploymentStatus
@Nullable public Status deploymentStatus()
The deployment status.- Specified by:
deploymentStatusin interfaceDeploymentStatusEvent
-
deployment
@Nullable public Deployment deployment()
Deployment- Specified by:
deploymentin interfaceDeploymentStatusEvent
-
withRepository
public final ImmutableDeploymentStatusEvent withRepository(@Nullable Repository value)
Copy the current immutable object by setting a value for therepositoryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for repository (can benull)- Returns:
- A modified copy of the
thisobject
-
withSender
public final ImmutableDeploymentStatusEvent withSender(@Nullable User value)
Copy the current immutable object by setting a value for thesenderattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sender (can benull)- Returns:
- A modified copy of the
thisobject
-
withEventInstallation
public final ImmutableDeploymentStatusEvent withEventInstallation(@Nullable EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for eventInstallation (can benull)- Returns:
- A modified copy of the
thisobject
-
withDeploymentStatus
public final ImmutableDeploymentStatusEvent withDeploymentStatus(@Nullable Status value)
Copy the current immutable object by setting a value for thedeploymentStatusattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deploymentStatus (can benull)- Returns:
- A modified copy of the
thisobject
-
withDeployment
public final ImmutableDeploymentStatusEvent withDeployment(@Nullable Deployment value)
Copy the current immutable object by setting a value for thedeploymentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deployment (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableDeploymentStatusEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,sender,eventInstallation,deploymentStatus,deployment.
-
toString
public String toString()
Prints the immutable valueDeploymentStatusEventwith attribute values.
-
copyOf
public static ImmutableDeploymentStatusEvent copyOf(DeploymentStatusEvent instance)
Creates an immutable copy of aDeploymentStatusEventvalue. 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 DeploymentStatusEvent instance
-
builder
public static ImmutableDeploymentStatusEvent.Builder builder()
Creates a builder forImmutableDeploymentStatusEvent.ImmutableDeploymentStatusEvent.builder() .repository(com.spotify.github.v3.repos.Repository | null) // nullablerepository.sender(com.spotify.github.v3.User | null) // nullablesender.eventInstallation(com.spotify.github.v3.activity.events.EventInstallation | null) // nullableeventInstallation.deploymentStatus(com.spotify.github.v3.repos.Status | null) // nullabledeploymentStatus.deployment(com.spotify.github.v3.repos.Deployment | null) // nullabledeployment.build();- Returns:
- A new ImmutableDeploymentStatusEvent builder
-
-