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.Builder
is 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.Builder
avatarUrl(URI avatarUrl)
Initializes the value for theavatarUrl
attribute.ImmutableOrganization
build()
Builds a newImmutableOrganization
.ImmutableOrganization.Builder
eventsUrl(URI eventsUrl)
Initializes the value for theeventsUrl
attribute.ImmutableOrganization.Builder
from(Organization instance)
Fill a builder with attribute values from the providedOrganization
instance.ImmutableOrganization.Builder
id(Long id)
Initializes the value for theid
attribute.ImmutableOrganization.Builder
login(String login)
Initializes the value for thelogin
attribute.ImmutableOrganization.Builder
membersUrl(String membersUrl)
Initializes the value for themembersUrl
attribute.ImmutableOrganization.Builder
publicMembersUrl(String publicMembersUrl)
Initializes the value for thepublicMembersUrl
attribute.ImmutableOrganization.Builder
reposUrl(URI reposUrl)
Initializes the value for thereposUrl
attribute.ImmutableOrganization.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableOrganization.Builder from(Organization instance)
Fill a builder with attribute values from the providedOrganization
instance. 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:
this
builder for use in a chained invocation
-
login
@CanIgnoreReturnValue public final ImmutableOrganization.Builder login(@Nullable String login)
Initializes the value for thelogin
attribute.- Parameters:
login
- The value for login (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableOrganization.Builder id(@Nullable Long id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableOrganization.Builder url(@Nullable URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
reposUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder reposUrl(@Nullable URI reposUrl)
Initializes the value for thereposUrl
attribute.- Parameters:
reposUrl
- The value for reposUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
eventsUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder eventsUrl(@Nullable URI eventsUrl)
Initializes the value for theeventsUrl
attribute.- Parameters:
eventsUrl
- The value for eventsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
membersUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder membersUrl(@Nullable String membersUrl)
Initializes the value for themembersUrl
attribute.- Parameters:
membersUrl
- The value for membersUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
publicMembersUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder publicMembersUrl(@Nullable String publicMembersUrl)
Initializes the value for thepublicMembersUrl
attribute.- Parameters:
publicMembersUrl
- The value for publicMembersUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
avatarUrl
@CanIgnoreReturnValue public final ImmutableOrganization.Builder avatarUrl(@Nullable URI avatarUrl)
Initializes the value for theavatarUrl
attribute.- Parameters:
avatarUrl
- The value for avatarUrl (can benull
)- Returns:
this
builder 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
-
-