// Path: public-api/src/main/java/info/rolandkrueger/userservice/api/resources/UserService.java
// public class UserService extends EmptyResource {
// 
//     private Link authoritiesLink;
//     private Link usersLink;
//     private Link registrationsLink;
// 
//     public UserService(Link self) {
//         super(self);
//     }
// 
//     /**
//      * Initializes the user service: reads all resource links from the resource document obtained from the server.
//      */
//     public void init() {
//         authoritiesLink = getLinkFor(getResponseEntity(), RestApiConstants.AUTHORITIES_RESOURCE);
//         usersLink = getLinkFor(getResponseEntity(), RestApiConstants.USERS_RESOURCE);
//         registrationsLink = getLinkFor(getResponseEntity(), RestApiConstants.REGISTRATIONS_RESOURCE);
//     }
// 
//     /**
//      * Provides the paged {@link AuthoritiesResource} with the given page parameters.
//      *
//      * @param page the required page number
//      * @param size the required page size
//      * @return paged resource for authorities
//      * @see AbstractPagedResource#getMetadata()
//      */
//     public AuthoritiesResource authorities(Integer page, Integer size) {
//         return authorities().goToPage(page, size);
//     }
// 
//     /**
//      * Provides the paged {@link AuthoritiesResource} with default paging parameters applied. These are configured by the user service.
//      */
//     public AuthoritiesResource authorities() {
//         return new AuthoritiesResource(authoritiesLink);
//     }
// 
//     /**
//      * Provides the paged {@link UsersResource} with default paging parameters applied. These are configured by the user service.
//      */
//     public UsersResource users() {
//         return new UsersResource(usersLink);
//     }
// 
//     /**
//      * Provides the paged {@link UsersResource} with the given page parameters.
//      *
//      * @param page the required page number
//      * @param size the required page size
//      * @return paged resource for users
//      * @see AbstractPagedResource#getMetadata()
//      */
//     public UsersResource users(Integer page, Integer size) {
//         return users().goToPage(page, size);
//     }
// 
//     /**
//      * Provides the {@link UserRegistrationsResource}.
//      */
//     public UserRegistrationsResource userRegistrations() {
//         return new UserRegistrationsResource(registrationsLink);
//     }
// }


import info.rolandkrueger.userservice.api.resources.UserService;
import org.springframework.hateoas.Link;
package info.rolandkrueger.userservice.api;


/**
 * Main class for the user service public API. Use this class to get a handle on the service's root resource
 * represented by class {@link UserService}. Using this handle, you can navigate through the whole service through
 * a fluent API.
 *
 * @author Roland Krüger
 */
public final class UserServiceAPI {

    private UserServiceAPI() {
    }

    /**
     * Initialize the client with the user service's URL. Only this base URL needs to be known to be able to use the
     * service. All of the service's resources can be reached through the fluent API provided by the returned
     * {@link UserService} object.
     * <p/>
     * The service's base URL can also be dynamically provided by a
     * {@link info.rolandkrueger.userservice.api.service.UserMicroserviceEndpointProvider}.
     *
     * @param targetURI base URL of the user micro-service
     * @return a {@link UserService} object that provides access to the service's resources
     * @see info.rolandkrueger.userservice.api.service.UserMicroserviceEndpointProvider
     */
// Path: public-api/src/main/java/info/rolandkrueger/userservice/api/resources/UserService.java
// public class UserService extends EmptyResource {
// 
//     private Link authoritiesLink;
//     private Link usersLink;
//     private Link registrationsLink;
// 
//     public UserService(Link self) {
//         super(self);
//     }
// 
//     /**
//      * Initializes the user service: reads all resource links from the resource document obtained from the server.
//      */
//     public void init() {
//         authoritiesLink = getLinkFor(getResponseEntity(), RestApiConstants.AUTHORITIES_RESOURCE);
//         usersLink = getLinkFor(getResponseEntity(), RestApiConstants.USERS_RESOURCE);
//         registrationsLink = getLinkFor(getResponseEntity(), RestApiConstants.REGISTRATIONS_RESOURCE);
//     }
// 
//     /**
//      * Provides the paged {@link AuthoritiesResource} with the given page parameters.
//      *
//      * @param page the required page number
//      * @param size the required page size
//      * @return paged resource for authorities
//      * @see AbstractPagedResource#getMetadata()
//      */
//     public AuthoritiesResource authorities(Integer page, Integer size) {
//         return authorities().goToPage(page, size);
//     }
// 
//     /**
//      * Provides the paged {@link AuthoritiesResource} with default paging parameters applied. These are configured by the user service.
//      */
//     public AuthoritiesResource authorities() {
//         return new AuthoritiesResource(authoritiesLink);
//     }
// 
//     /**
//      * Provides the paged {@link UsersResource} with default paging parameters applied. These are configured by the user service.
//      */
//     public UsersResource users() {
//         return new UsersResource(usersLink);
//     }
// 
//     /**
//      * Provides the paged {@link UsersResource} with the given page parameters.
//      *
//      * @param page the required page number
//      * @param size the required page size
//      * @return paged resource for users
//      * @see AbstractPagedResource#getMetadata()
//      */
//     public UsersResource users(Integer page, Integer size) {
//         return users().goToPage(page, size);
//     }
// 
//     /**
//      * Provides the {@link UserRegistrationsResource}.
//      */
//     public UserRegistrationsResource userRegistrations() {
//         return new UserRegistrationsResource(registrationsLink);
//     }
// }


// Path: public-api/src/main/java/info/rolandkrueger/userservice/api/UserServiceAPI.java
import info.rolandkrueger.userservice.api.resources.UserService;
import org.springframework.hateoas.Link;

package info.rolandkrueger.userservice.api;


/**
 * Main class for the user service public API. Use this class to get a handle on the service's root resource
 * represented by class {@link UserService}. Using this handle, you can navigate through the whole service through
 * a fluent API.
 *
 * @author Roland Krüger
 */
public final class UserServiceAPI {

    private UserServiceAPI() {
    }

    /**
     * Initialize the client with the user service's URL. Only this base URL needs to be known to be able to use the
     * service. All of the service's resources can be reached through the fluent API provided by the returned
     * {@link UserService} object.
     * <p/>
     * The service's base URL can also be dynamically provided by a
     * {@link info.rolandkrueger.userservice.api.service.UserMicroserviceEndpointProvider}.
     *
     * @param targetURI base URL of the user micro-service
     * @return a {@link UserService} object that provides access to the service's resources
     * @see info.rolandkrueger.userservice.api.service.UserMicroserviceEndpointProvider
     */
    public static UserService init(String targetURI) {