class AssetGroupController {

	@ApiOperation(httpMethod = "POST", value = "API to create asset group", response = Response.class, produces = MediaType.APPLICATION_JSON_VALUE)
	@RequestMapping(path = "/create", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> createAssetGroupDetails(@AuthenticationPrincipal Principal user,
			@RequestBody CreateUpdateAssetGroupDetails assetGroupDetails) {
		try {
			return ResponseUtils
					.buildSucessResponse(assetGroupService.createAssetGroupDetails(assetGroupDetails, user.getName()));
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}