Class ImmutableDeploymentEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableDeploymentEvent
-
- All Implemented Interfaces:
BaseEvent,DeploymentEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDeploymentEvent extends Object implements DeploymentEvent
Immutable implementation ofDeploymentEvent.Use the builder to create immutable instances:
ImmutableDeploymentEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDeploymentEvent.BuilderBuilds instances of typeImmutableDeploymentEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeploymentEvent.Builderbuilder()Creates a builder forImmutableDeploymentEvent.static ImmutableDeploymentEventcopyOf(DeploymentEvent instance)Creates an immutable copy of aDeploymentEventvalue.Deploymentdeployment()Deploymentbooleanequals(Object another)This instance is equal to all instances ofImmutableDeploymentEventthat have equal attribute values.EventInstallationeventInstallation()TheEventInstallation, if the event comes from a Github App.inthashCode()Computes a hash code from attributes:repository,sender,eventInstallation,deployment.Repositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valueDeploymentEventwith attribute values.ImmutableDeploymentEventwithDeployment(Deployment value)Copy the current immutable object by setting a value for thedeploymentattribute.ImmutableDeploymentEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutableDeploymentEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableDeploymentEventwithSender(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
-
deployment
@Nullable public Deployment deployment()
Deployment- Specified by:
deploymentin interfaceDeploymentEvent
-
withRepository
public final ImmutableDeploymentEvent 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 ImmutableDeploymentEvent 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 ImmutableDeploymentEvent 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
-
withDeployment
public final ImmutableDeploymentEvent 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 ofImmutableDeploymentEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,sender,eventInstallation,deployment.
-
toString
public String toString()
Prints the immutable valueDeploymentEventwith attribute values.
-
copyOf
public static ImmutableDeploymentEvent copyOf(DeploymentEvent instance)
Creates an immutable copy of aDeploymentEventvalue. 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 DeploymentEvent instance
-
builder
public static ImmutableDeploymentEvent.Builder builder()
Creates a builder forImmutableDeploymentEvent.ImmutableDeploymentEvent.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.deployment(com.spotify.github.v3.repos.Deployment | null) // nullabledeployment.build();- Returns:
- A new ImmutableDeploymentEvent builder
-
-