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 class
ImmutableOrgMembershipCreate.Builder
Builds instances of typeImmutableOrgMembershipCreate
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableOrgMembershipCreate.Builder
builder()
Creates a builder forImmutableOrgMembershipCreate
.static ImmutableOrgMembershipCreate
copyOf(OrgMembershipCreate instance)
Creates an immutable copy of aOrgMembershipCreate
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableOrgMembershipCreate
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 org.String
toString()
Prints the immutable valueOrgMembershipCreate
with attribute values.ImmutableOrgMembershipCreate
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 org. Defaults to 'member'- Specified by:
role
in interfaceOrgMembershipCreate
-
withRole
public final ImmutableOrgMembershipCreate 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 ofImmutableOrgMembershipCreate
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:role
.
-
toString
public String toString()
Prints the immutable valueOrgMembershipCreate
with attribute values.
-
copyOf
public static ImmutableOrgMembershipCreate copyOf(OrgMembershipCreate instance)
Creates an immutable copy of aOrgMembershipCreate
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 OrgMembershipCreate instance
-
builder
public static ImmutableOrgMembershipCreate.Builder builder()
Creates a builder forImmutableOrgMembershipCreate
.ImmutableOrgMembershipCreate.builder() .role(String | null) // nullable
role
.build();- Returns:
- A new ImmutableOrgMembershipCreate builder
-
-