class AssetController {

    @ApiOperation(httpMethod = "GET", value = "Get Resource Created Date")
    @RequestMapping(path = "/v1/get-resource-created-date", method = RequestMethod.GET)
    @ResponseBody
    public ResponseEntity<Object> getResourceCreatedDate(
            @ApiParam(value = "Provide Valid Resource Id", required = true) @RequestParam(name = "resourceId", required = true) String resourceId,
            @ApiParam(value = "Provide Valid Resource Type", required = true) @RequestParam(name = "resourceType", required = false) String resourceType) {
        String response = assetService.getResourceCreatedDate(resourceId, resourceType);
        if (!Strings.isNullOrEmpty(response)) {
            return ResponseUtils.buildSucessResponse(response);
        } else {
            if (response != null) {
                return ResponseUtils.buildFailureResponse(new Exception("failure"), "Resource Creation Date Empty");
            } else {
                return ResponseUtils.buildFailureResponse(new Exception("failure"), "Resource Not Found");
            }
        }
    }

}