de.captaingoldfish.scim.sdk.server.response.PartialListResponse Maven / Gradle / Ivy
// Generated by delombok at Sat Aug 24 10:10:59 CEST 2024
package de.captaingoldfish.scim.sdk.server.response;
import java.util.List;
import de.captaingoldfish.scim.sdk.common.constants.enums.SortOrder;
import de.captaingoldfish.scim.sdk.common.resources.ResourceNode;
import de.captaingoldfish.scim.sdk.common.schemas.SchemaAttribute;
import de.captaingoldfish.scim.sdk.server.endpoints.ResourceHandler;
import de.captaingoldfish.scim.sdk.server.endpoints.authorize.Authorization;
import de.captaingoldfish.scim.sdk.server.filter.FilterNode;
/**
* author Pascal Knueppel
* created at: 18.10.2019 - 17:50
*
* this type must be returned by
* {@link ResourceHandler#listResources(long, int, FilterNode, SchemaAttribute, SortOrder, List, List, Authorization)}
* methods
*/
public class PartialListResponse
{
/**
* the resources that have extracted at the listResources method
*/
private List resources;
/**
* the total number of results the given query request has found. This value should be known by the client
* since the found number of results might exceed the maximum number of results so the client will be able to
* use paging mechanisms
*/
private long totalResults;
/**
* Creates a new {@code PartialListResponse} instance.
*
* @param resources the resources that have extracted at the listResources method
* @param totalResults the total number of results the given query request has found. This value should be
* known by the client since the found number of results might exceed the maximum number of results
* so the client will be able to use paging mechanisms
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
PartialListResponse(final List resources, final long totalResults)
{
this.resources = resources;
this.totalResults = totalResults;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static class PartialListResponseBuilder
{
@java.lang.SuppressWarnings("all")
@lombok.Generated
private List resources;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private long totalResults;
@java.lang.SuppressWarnings("all")
@lombok.Generated
PartialListResponseBuilder()
{}
/**
* the resources that have extracted at the listResources method
*
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PartialListResponse.PartialListResponseBuilder resources(final List resources)
{
this.resources = resources;
return this;
}
/**
* the total number of results the given query request has found. This value should be known by the client
* since the found number of results might exceed the maximum number of results so the client will be able to
* use paging mechanisms
*
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PartialListResponse.PartialListResponseBuilder totalResults(final long totalResults)
{
this.totalResults = totalResults;
return this;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PartialListResponse build()
{
return new PartialListResponse(this.resources, this.totalResults);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString()
{
return "PartialListResponse.PartialListResponseBuilder(resources=" + this.resources + ", totalResults="
+ this.totalResults + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static PartialListResponse.PartialListResponseBuilder builder()
{
return new PartialListResponse.PartialListResponseBuilder();
}
/**
* the resources that have extracted at the listResources method
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public List getResources()
{
return this.resources;
}
/**
* the total number of results the given query request has found. This value should be known by the client
* since the found number of results might exceed the maximum number of results so the client will be able to
* use paging mechanisms
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public long getTotalResults()
{
return this.totalResults;
}
}