package com.iqser.red.service.persistence.management.v1.processor.client.tenantusermanagementservice;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.iqser.red.service.persistence.management.v1.processor.service.users.model.User;

@FeignClient(name = "UsersClient", url = "${tenant-user-management-service.url}")
public interface UsersClient {

    String REFRESH_CACHE_PARAM = "refreshCache";
    String USER_REST_PATH = "/user";


    @ResponseBody
    @GetMapping(value = USER_REST_PATH, produces = MediaType.APPLICATION_JSON_VALUE)
    List<User> getAllUsers(@RequestParam(name = REFRESH_CACHE_PARAM, defaultValue = "false", required = false) boolean bypassCache);

}
