package io.delphiplatform.api.v3.view;

import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import io.delphiplatform.api.v3.model.Label;

@Validated
public interface LabelsApi {

    /**
     * GET /labels/{label_id} : Get one Label Resource route for getting a single &#x60;Label&#x60; by passed label_id
     *
     * @param labelId Primary key identifier for a (local) &#x60;Label&#x60;. (required)
     * @return &#x60;Label&#x60; response object (status code 200) or A &#x60;400 Bad Request&#x60; response status
     * indicates a problem with the input provided by a client request. If you are receiving this error, check your
     * request parameters are valid.  (status code 400) or A &#x60;401 Unauthorized&#x60; response status indicates that
     * the request did not include a required Authorization header, or that there was a problem authenticating the
     * client. Possible problems include an expired or invalid token, or the Authorization header is not in the expected
     * format.  (status code 401) or A &#x60;404 Not Found&#x60; response status is returned when a single item queried
     * by primary key identifier was not found in the database, or an endpoint path was provided that does not exist.
     * (status code 404) or A &#x60;500 Internal Error&#x60; response status is returned for any application and server
     * level errors that are not already associated with another error status. A 500 is used as a generic fallback
     * error.  (status code 500)
     */
    @RequestMapping(value = "/labels/{label_id}",
        produces = {"application/json"},
        method = RequestMethod.GET)
    default ResponseEntity<Label> labelsGet(@PathVariable("label_id") String labelId) {
        return findOne(labelId);
    }

    ResponseEntity<Label> findOne(String labelId);

}
