Package com.spotify.github.v3.repos
Class ImmutableOrganization.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableOrganization.Builder
-
- Enclosing class:
- ImmutableOrganization
@NotThreadSafe public static final class ImmutableOrganization.Builder extends Object
Builds instances of typeImmutableOrganization. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableOrganization.BuilderavatarUrl(URI avatarUrl)Initializes the value for theavatarUrlattribute.ImmutableOrganizationbuild()Builds a newImmutableOrganization.ImmutableOrganization.BuildereventsUrl(URI eventsUrl)Initializes the value for theeventsUrlattribute.ImmutableOrganization.Builderfrom(Organization instance)Fill a builder with attribute values from the providedOrganizationinstance.ImmutableOrganization.Builderid(Long id)Initializes the value for theidattribute.ImmutableOrganization.Builderlogin(String login)Initializes the value for theloginattribute.ImmutableOrganization.BuildermembersUrl(String membersUrl)Initializes the value for themembersUrlattribute.ImmutableOrganization.BuilderpublicMembersUrl(String publicMembersUrl)Initializes the value for thepublicMembersUrlattribute.ImmutableOrganization.BuilderreposUrl(URI reposUrl)Initializes the value for thereposUrlattribute.ImmutableOrganization.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableOrganization.Builder from(Organization instance)
Fill a builder with attribute values from the providedOrganizationinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
login
@CanIgnoreReturnValue public final ImmutableOrganization.Builder login(@Nullable String login)
Initializes the value for theloginattribute.- Parameters:
login- The value for login (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableOrganization.Builder id(@Nullable Long id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableOrganization.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
reposUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder reposUrl(@Nullable URI reposUrl)
Initializes the value for thereposUrlattribute.- Parameters:
reposUrl- The value for reposUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
eventsUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder eventsUrl(@Nullable URI eventsUrl)
Initializes the value for theeventsUrlattribute.- Parameters:
eventsUrl- The value for eventsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
membersUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder membersUrl(@Nullable String membersUrl)
Initializes the value for themembersUrlattribute.- Parameters:
membersUrl- The value for membersUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
publicMembersUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder publicMembersUrl(@Nullable String publicMembersUrl)
Initializes the value for thepublicMembersUrlattribute.- Parameters:
publicMembersUrl- The value for publicMembersUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
avatarUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder avatarUrl(@Nullable URI avatarUrl)
Initializes the value for theavatarUrlattribute.- Parameters:
avatarUrl- The value for avatarUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableOrganization build()
Builds a newImmutableOrganization.- Returns:
- An immutable instance of Organization
- Throws:
IllegalStateException- if any required attributes are missing
-
-