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 classImmutableMembershipCreate.BuilderBuilds instances of typeImmutableMembershipCreate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMembershipCreate.Builderbuilder()Creates a builder forImmutableMembershipCreate.static ImmutableMembershipCreatecopyOf(MembershipCreate instance)Creates an immutable copy of aMembershipCreatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableMembershipCreatethat have equal attribute values.inthashCode()Computes a hash code from attributes:role.Stringrole()The role that this user should have in the team.StringtoString()Prints the immutable valueMembershipCreatewith attribute values.ImmutableMembershipCreatewithRole(String value)Copy the current immutable object by setting a value for theroleattribute.
-
-
-
Method Detail
-
role
@Nullable public String role()
The role that this user should have in the team. Defaults to 'member'- Specified by:
rolein interfaceMembershipCreate
-
withRole
public final ImmutableMembershipCreate withRole(@Nullable String value)
Copy the current immutable object by setting a value for theroleattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableMembershipCreatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:role.
-
toString
public String toString()
Prints the immutable valueMembershipCreatewith attribute values.
-
copyOf
public static ImmutableMembershipCreate copyOf(MembershipCreate instance)
Creates an immutable copy of aMembershipCreatevalue. 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) // nullablerole.build();- Returns:
- A new ImmutableMembershipCreate builder
-
-