Class ImmutableOrgMembershipCreate
- java.lang.Object
-
- com.spotify.github.v3.orgs.requests.ImmutableOrgMembershipCreate
-
- All Implemented Interfaces:
OrgMembershipCreate
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableOrgMembershipCreate extends Object implements OrgMembershipCreate
Immutable implementation ofOrgMembershipCreate.Use the builder to create immutable instances:
ImmutableOrgMembershipCreate.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableOrgMembershipCreate.BuilderBuilds instances of typeImmutableOrgMembershipCreate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableOrgMembershipCreate.Builderbuilder()Creates a builder forImmutableOrgMembershipCreate.static ImmutableOrgMembershipCreatecopyOf(OrgMembershipCreate instance)Creates an immutable copy of aOrgMembershipCreatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableOrgMembershipCreatethat have equal attribute values.inthashCode()Computes a hash code from attributes:role.Stringrole()The role that this user should have in the org.StringtoString()Prints the immutable valueOrgMembershipCreatewith attribute values.ImmutableOrgMembershipCreatewithRole(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 org. Defaults to 'member'- Specified by:
rolein interfaceOrgMembershipCreate
-
withRole
public final ImmutableOrgMembershipCreate 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 ofImmutableOrgMembershipCreatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:role.
-
toString
public String toString()
Prints the immutable valueOrgMembershipCreatewith attribute values.
-
copyOf
public static ImmutableOrgMembershipCreate copyOf(OrgMembershipCreate instance)
Creates an immutable copy of aOrgMembershipCreatevalue. 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 OrgMembershipCreate instance
-
builder
public static ImmutableOrgMembershipCreate.Builder builder()
Creates a builder forImmutableOrgMembershipCreate.ImmutableOrgMembershipCreate.builder() .role(String | null) // nullablerole.build();- Returns:
- A new ImmutableOrgMembershipCreate builder
-
-