class FailoverEndpoint {
    @Autowired
    private FailoverResource failoverResource;

    @RequestMapping(path = "/create/{failoverType}/{group}", method = RequestMethod.POST)
    @ApiOperation(value = "全局订阅方式，创建故障转移", notes = "", response = ResponseEntity.class, httpMethod = "POST")
    @ResponseBody
    public ResponseEntity<?> createFailover(@PathVariable(value = "failoverType") @ApiParam(value = "故障转移类型。取值：version-prefer | version-failover | region-transfer | region-failover | env-failover | zone-failover | address-failover", defaultValue = "version-failover", required = true) String failoverType, @PathVariable(value = "group") @ApiParam(value = "组名", required = true) String group, @RequestBody @ApiParam(value = "故障转移值，Json格式或者非Json格式", required = true) String failoverValue) {
        return doCreateFailover(failoverType, group, failoverValue);
    }

    @RequestMapping(path = "/clear/{failoverType}/{group}", method = RequestMethod.POST)
    @ApiOperation(value = "全局订阅方式，清除故障转移", notes = "", response = ResponseEntity.class, httpMethod = "POST")
    @ResponseBody
    public ResponseEntity<?> clearFailover(@PathVariable(value = "failoverType") @ApiParam(value = "故障转移类型。取值：version-prefer | version-failover | region-transfer | region-failover | env-failover | zone-failover | address-failover", defaultValue = "version-failover", required = true) String failoverType, @PathVariable(value = "group") @ApiParam(value = "组名", required = true) String group) {
        return doClearFailover(failoverType, group);
    }

    @RequestMapping(path = "/create/{failoverType}/{group}/{serviceId}", method = RequestMethod.POST)
    @ApiOperation(value = "局部订阅方式，创建故障转移", notes = "", response = ResponseEntity.class, httpMethod = "POST")
    @ResponseBody
    public ResponseEntity<?> createFailover(@PathVariable(value = "failoverType") @ApiParam(value = "故障转移类型。取值：version-prefer | version-failover | region-transfer | region-failover | env-failover | zone-failover | address-failover", defaultValue = "version-failover", required = true) String failoverType, @PathVariable(value = "group") @ApiParam(value = "组名", required = true) String group, @PathVariable(value = "serviceId") @ApiParam(value = "服务名", required = true) String serviceId, @RequestBody @ApiParam(value = "故障转移值，Json格式或者非Json格式", required = true) String failoverValue) {
        return doCreateFailover(failoverType, group, serviceId, failoverValue);
    }

    @RequestMapping(path = "/clear/{failoverType}/{group}/{serviceId}", method = RequestMethod.POST)
    @ApiOperation(value = "局部订阅方式，清除故障转移", notes = "", response = ResponseEntity.class, httpMethod = "POST")
    @ResponseBody
    public ResponseEntity<?> clearFailover(@PathVariable(value = "failoverType") @ApiParam(value = "故障转移类型。取值：version-prefer | version-failover | region-transfer | region-failover | env-failover | zone-failover | address-failover", defaultValue = "version-failover", required = true) String failoverType, @PathVariable(value = "group") @ApiParam(value = "组名", required = true) String group, @PathVariable(value = "serviceId") @ApiParam(value = "服务名", required = true) String serviceId) {
        return doClearFailover(failoverType, group, serviceId);
    }

    private ResponseEntity<?> doCreateFailover(String failoverType, String group, String failoverValue) {
        try {
            String result = failoverResource.createFailover(FailoverType.fromString(failoverType), group, failoverValue);

            return ResponseUtil.getSuccessResponse(result);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }

    private ResponseEntity<?> doClearFailover(String failoverType, String group) {<FILL_FUNCTION_BODY>}

    private ResponseEntity<?> doCreateFailover(String failoverType, String group, String serviceId, String failoverValue) {
        try {
            String result = failoverResource.createFailover(FailoverType.fromString(failoverType), group, serviceId, failoverValue);

            return ResponseUtil.getSuccessResponse(result);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }

    private ResponseEntity<?> doClearFailover(String failoverType, String group, String serviceId) {
        try {
            String result = failoverResource.clearFailover(FailoverType.fromString(failoverType), group, serviceId);

            return ResponseUtil.getSuccessResponse(result);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    }
}

        try {
            String result = failoverResource.clearFailover(FailoverType.fromString(failoverType), group);

            return ResponseUtil.getSuccessResponse(result);
        } catch (Exception e) {
            return ResponseUtil.getFailureResponse(e);
        }
    
<no_super_class>