Package com.spotify.github.v3.search
Class ImmutableSearchUsers
- java.lang.Object
-
- com.spotify.github.v3.search.ImmutableSearchUsers
-
- All Implemented Interfaces:
Search,SearchUsers
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSearchUsers extends Object implements SearchUsers
Immutable implementation ofSearchUsers.Use the builder to create immutable instances:
ImmutableSearchUsers.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSearchUsers.BuilderBuilds instances of typeImmutableSearchUsers.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSearchUsers.Builderbuilder()Creates a builder forImmutableSearchUsers.static ImmutableSearchUserscopyOf(SearchUsers instance)Creates an immutable copy of aSearchUsersvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSearchUsersthat have equal attribute values.inthashCode()Computes a hash code from attributes:totalCount,incompleteResults,items.BooleanincompleteResults()Are returned results incompleteList<User>items()Users search resultsStringtoString()Prints the immutable valueSearchUserswith attribute values.IntegertotalCount()Total count of search hitsImmutableSearchUserswithIncompleteResults(Boolean value)Copy the current immutable object by setting a value for theincompleteResultsattribute.ImmutableSearchUserswithItems(User... elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableSearchUserswithItems(Iterable<? extends User> elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableSearchUserswithTotalCount(Integer value)Copy the current immutable object by setting a value for thetotalCountattribute.
-
-
-
Method Detail
-
totalCount
@Nullable public Integer totalCount()
Total count of search hits- Specified by:
totalCountin interfaceSearch
-
incompleteResults
@Nullable public Boolean incompleteResults()
Are returned results incomplete- Specified by:
incompleteResultsin interfaceSearch
-
items
@Nullable public List<User> items()
Users search results- Specified by:
itemsin interfaceSearchUsers
-
withTotalCount
public final ImmutableSearchUsers withTotalCount(@Nullable Integer value)
Copy the current immutable object by setting a value for thetotalCountattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for totalCount (can benull)- Returns:
- A modified copy of the
thisobject
-
withIncompleteResults
public final ImmutableSearchUsers withIncompleteResults(@Nullable Boolean value)
Copy the current immutable object by setting a value for theincompleteResultsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for incompleteResults (can benull)- Returns:
- A modified copy of the
thisobject
-
withItems
public final ImmutableSearchUsers withItems(@Nullable User... elements)
Copy the current immutable object with elements that replace the content ofitems.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withItems
public final ImmutableSearchUsers withItems(@Nullable Iterable<? extends User> elements)
Copy the current immutable object with elements that replace the content ofitems. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of items elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSearchUsersthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount,incompleteResults,items.
-
toString
public String toString()
Prints the immutable valueSearchUserswith attribute values.
-
copyOf
public static ImmutableSearchUsers copyOf(SearchUsers instance)
Creates an immutable copy of aSearchUsersvalue. 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 SearchUsers instance
-
builder
public static ImmutableSearchUsers.Builder builder()
Creates a builder forImmutableSearchUsers.ImmutableSearchUsers.builder() .totalCount(Integer | null) // nullabletotalCount.incompleteResults(Boolean | null) // nullableincompleteResults.items(List<com.spotify.github.v3.User> | null) // nullableitems.build();- Returns:
- A new ImmutableSearchUsers builder
-
-