Package com.spotify.github.v3.orgs
Class ImmutableOrgMembership
- java.lang.Object
-
- com.spotify.github.v3.orgs.ImmutableOrgMembership
-
- All Implemented Interfaces:
OrgMembership
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableOrgMembership extends Object implements OrgMembership
Immutable implementation ofOrgMembership.Use the builder to create immutable instances:
ImmutableOrgMembership.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableOrgMembership.BuilderBuilds instances of typeImmutableOrgMembership.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableOrgMembership.Builderbuilder()Creates a builder forImmutableOrgMembership.static ImmutableOrgMembershipcopyOf(OrgMembership instance)Creates an immutable copy of aOrgMembershipvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableOrgMembershipthat have equal attribute values.inthashCode()Computes a hash code from attributes:url,role,state,organization,user.Organizationorganization()Stringrole()ROLEStringstate()STATEStringtoString()Prints the immutable valueOrgMembershipwith attribute values.URIurl()URLUseruser()USERImmutableOrgMembershipwithOrganization(Organization value)Copy the current immutable object by setting a value for theorganizationattribute.ImmutableOrgMembershipwithRole(String value)Copy the current immutable object by setting a value for theroleattribute.ImmutableOrgMembershipwithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableOrgMembershipwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.ImmutableOrgMembershipwithUser(User value)Copy the current immutable object by setting a value for theuserattribute.
-
-
-
Method Detail
-
url
@Nullable public URI url()
URL- Specified by:
urlin interfaceOrgMembership
-
role
@Nullable public String role()
ROLE- Specified by:
rolein interfaceOrgMembership
-
state
@Nullable public String state()
STATE- Specified by:
statein interfaceOrgMembership
-
organization
@Nullable public Organization organization()
- Specified by:
organizationin interfaceOrgMembership- Returns:
- The value of the
organizationattribute
-
user
@Nullable public User user()
USER- Specified by:
userin interfaceOrgMembership
-
withUrl
public final ImmutableOrgMembership withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url (can benull)- Returns:
- A modified copy of the
thisobject
-
withRole
public final ImmutableOrgMembership 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
-
withState
public final ImmutableOrgMembership withState(@Nullable String value)
Copy the current immutable object by setting a value for thestateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state (can benull)- Returns:
- A modified copy of the
thisobject
-
withOrganization
public final ImmutableOrgMembership withOrganization(@Nullable Organization value)
Copy the current immutable object by setting a value for theorganizationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for organization (can benull)- Returns:
- A modified copy of the
thisobject
-
withUser
public final ImmutableOrgMembership withUser(@Nullable User value)
Copy the current immutable object by setting a value for theuserattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableOrgMembershipthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:url,role,state,organization,user.
-
toString
public String toString()
Prints the immutable valueOrgMembershipwith attribute values.
-
copyOf
public static ImmutableOrgMembership copyOf(OrgMembership instance)
Creates an immutable copy of aOrgMembershipvalue. 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 OrgMembership instance
-
builder
public static ImmutableOrgMembership.Builder builder()
Creates a builder forImmutableOrgMembership.ImmutableOrgMembership.builder() .url(java.net.URI | null) // nullableurl.role(String | null) // nullablerole.state(String | null) // nullablestate.organization(com.spotify.github.v3.repos.Organization | null) // nullableorganization.user(com.spotify.github.v3.User | null) // nullableuser.build();- Returns:
- A new ImmutableOrgMembership builder
-
-