Class ImmutableMembershipCreate
- java.lang.Object
-
- com.spotify.github.v3.orgs.requests.ImmutableMembershipCreate
-
- All Implemented Interfaces:
MembershipCreate
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMembershipCreate extends Object implements MembershipCreate
Immutable implementation ofMembershipCreate
.Use the builder to create immutable instances:
ImmutableMembershipCreate.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableMembershipCreate.Builder
Builds instances of typeImmutableMembershipCreate
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMembershipCreate.Builder
builder()
Creates a builder forImmutableMembershipCreate
.static ImmutableMembershipCreate
copyOf(MembershipCreate instance)
Creates an immutable copy of aMembershipCreate
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableMembershipCreate
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:role
.String
role()
The role that this user should have in the team.String
toString()
Prints the immutable valueMembershipCreate
with attribute values.ImmutableMembershipCreate
withRole(String value)
Copy the current immutable object by setting a value for therole
attribute.
-
-
-
Method Detail
-
role
@Nullable public String role()
The role that this user should have in the team. Defaults to 'member'- Specified by:
role
in interfaceMembershipCreate
-
withRole
public final ImmutableMembershipCreate withRole(@Nullable String value)
Copy the current immutable object by setting a value for therole
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for role (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableMembershipCreate
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:role
.
-
toString
public String toString()
Prints the immutable valueMembershipCreate
with attribute values.
-
copyOf
public static ImmutableMembershipCreate copyOf(MembershipCreate instance)
Creates an immutable copy of aMembershipCreate
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 MembershipCreate instance
-
builder
public static ImmutableMembershipCreate.Builder builder()
Creates a builder forImmutableMembershipCreate
.ImmutableMembershipCreate.builder() .role(String | null) // nullable
role
.build();- Returns:
- A new ImmutableMembershipCreate builder
-
-