Package com.spotify.github.v3.apps
Class ImmutableInstallationRepositoriesResponse.Builder
- java.lang.Object
-
- com.spotify.github.v3.apps.ImmutableInstallationRepositoriesResponse.Builder
-
- Enclosing class:
- ImmutableInstallationRepositoriesResponse
@NotThreadSafe public static final class ImmutableInstallationRepositoriesResponse.Builder extends Object
Builds instances of typeImmutableInstallationRepositoriesResponse. 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
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableInstallationRepositoriesResponse.Builder from(InstallationRepositoriesResponse instance)
Fill a builder with attribute values from the providedInstallationRepositoriesResponseinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
totalCount
@CanIgnoreReturnValue public final ImmutableInstallationRepositoriesResponse.Builder totalCount(int totalCount)
Initializes the value for thetotalCountattribute.- Parameters:
totalCount- The value for totalCount- Returns:
thisbuilder for use in a chained invocation
-
addRepositories
@CanIgnoreReturnValue public final ImmutableInstallationRepositoriesResponse.Builder addRepositories(Repository element)
Adds one element torepositorieslist.- Parameters:
element- A repositories element- Returns:
thisbuilder for use in a chained invocation
-
addRepositories
@CanIgnoreReturnValue public final ImmutableInstallationRepositoriesResponse.Builder addRepositories(Repository... elements)
Adds elements torepositorieslist.- Parameters:
elements- An array of repositories elements- Returns:
thisbuilder for use in a chained invocation
-
repositories
@CanIgnoreReturnValue public final ImmutableInstallationRepositoriesResponse.Builder repositories(Iterable<? extends Repository> elements)
Sets or replaces all elements forrepositorieslist.- Parameters:
elements- An iterable of repositories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRepositories
@CanIgnoreReturnValue public final ImmutableInstallationRepositoriesResponse.Builder addAllRepositories(Iterable<? extends Repository> elements)
Adds elements torepositorieslist.- Parameters:
elements- An iterable of repositories elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableInstallationRepositoriesResponse build()
Builds a newImmutableInstallationRepositoriesResponse.- Returns:
- An immutable instance of InstallationRepositoriesResponse
- Throws:
IllegalStateException- if any required attributes are missing
-
-