/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.6.0-SNAPSHOT).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
package org.etsi.osl.tmf.pm628.api;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.etsi.osl.tmf.common.model.Error;
import org.etsi.osl.tmf.pm628.model.*;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.context.request.NativeWebRequest;

import javax.annotation.Generated;
import java.util.Optional;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT")
@Validated
@Tag(name = "notification listener", description = "Notifications for Resource Lifecycle and event notifications")
public interface ListenerApi {

    default Optional<NativeWebRequest> getRequest() {
        return Optional.empty();
    }

    /**
     * POST /listener/measurementCollectionJobAttributeValueChangeEvent : Client listener for entity MeasurementCollectionJobAttributeValueChangeEvent
     * Example of a client listener for receiving the notification MeasurementCollectionJobAttributeValueChangeEvent
     *
     * @param measurementCollectionJobAttributeValueChangeEvent MeasurementCollectionJob attributeValueChange Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "measurementCollectionJobAttributeValueChangeEvent",
        summary = "Client listener for entity MeasurementCollectionJobAttributeValueChangeEvent",
        description = "Example of a client listener for receiving the notification MeasurementCollectionJobAttributeValueChangeEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/measurementCollectionJobAttributeValueChangeEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> measurementCollectionJobAttributeValueChangeEvent(
        @Parameter(name = "MeasurementCollectionJobAttributeValueChangeEvent", description = "MeasurementCollectionJob attributeValueChange Event payload", required = true) @Valid @RequestBody MeasurementCollectionJobAttributeValueChangeEvent measurementCollectionJobAttributeValueChangeEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/measurementCollectionJobCreateEvent : Client listener for entity MeasurementCollectionJobCreateEvent
     * Example of a client listener for receiving the notification MeasurementCollectionJobCreateEvent
     *
     * @param measurementCollectionJobCreateEvent MeasurementCollectionJob create Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "measurementCollectionJobCreateEvent",
        summary = "Client listener for entity MeasurementCollectionJobCreateEvent",
        description = "Example of a client listener for receiving the notification MeasurementCollectionJobCreateEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/measurementCollectionJobCreateEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> measurementCollectionJobCreateEvent(
        @Parameter(name = "MeasurementCollectionJobCreateEvent", description = "MeasurementCollectionJob create Event payload", required = true) @Valid @RequestBody MeasurementCollectionJobCreateEvent measurementCollectionJobCreateEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/measurementCollectionJobDeleteEvent : Client listener for entity MeasurementCollectionJobDeleteEvent
     * Example of a client listener for receiving the notification MeasurementCollectionJobDeleteEvent
     *
     * @param measurementCollectionJobDeleteEvent MeasurementCollectionJob delete Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "measurementCollectionJobDeleteEvent",
        summary = "Client listener for entity MeasurementCollectionJobDeleteEvent",
        description = "Example of a client listener for receiving the notification MeasurementCollectionJobDeleteEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/measurementCollectionJobDeleteEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> measurementCollectionJobDeleteEvent(
        @Parameter(name = "MeasurementCollectionJobDeleteEvent", description = "MeasurementCollectionJob delete Event payload", required = true) @Valid @RequestBody MeasurementCollectionJobDeleteEvent measurementCollectionJobDeleteEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/measurementCollectionJobExecutionStateChangeEvent : Client listener for entity MeasurementCollectionJobExecutionStateChangeEvent
     * Example of a client listener for receiving the notification MeasurementCollectionJobExecutionStateChangeEvent
     *
     * @param measurementCollectionJobExecutionStateChangeEvent MeasurementCollectionJob executionStateChange Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "measurementCollectionJobExecutionStateChangeEvent",
        summary = "Client listener for entity MeasurementCollectionJobExecutionStateChangeEvent",
        description = "Example of a client listener for receiving the notification MeasurementCollectionJobExecutionStateChangeEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/measurementCollectionJobExecutionStateChangeEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> measurementCollectionJobExecutionStateChangeEvent(
        @Parameter(name = "MeasurementCollectionJobExecutionStateChangeEvent", description = "MeasurementCollectionJob executionStateChange Event payload", required = true) @Valid @RequestBody MeasurementCollectionJobExecutionStateChangeEvent measurementCollectionJobExecutionStateChangeEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/measurementCollectionJobFilesPreparationErrorEvent : Client listener for entity MeasurementCollectionJobFilesPreparationErrorEvent
     * Example of a client listener for receiving the notification MeasurementCollectionJobFilesPreparationErrorEvent
     *
     * @param measurementCollectionJobFilesPreparationErrorEvent MeasurementCollectionJob filesPreparationError Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "measurementCollectionJobFilesPreparationErrorEvent",
        summary = "Client listener for entity MeasurementCollectionJobFilesPreparationErrorEvent",
        description = "Example of a client listener for receiving the notification MeasurementCollectionJobFilesPreparationErrorEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/measurementCollectionJobFilesPreparationErrorEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> measurementCollectionJobFilesPreparationErrorEvent(
        @Parameter(name = "MeasurementCollectionJobFilesPreparationErrorEvent", description = "MeasurementCollectionJob filesPreparationError Event payload", required = true) @Valid @RequestBody MeasurementCollectionJobFilesPreparationErrorEvent measurementCollectionJobFilesPreparationErrorEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/measurementCollectionJobFilesReadyEvent : Client listener for entity MeasurementCollectionJobFilesReadyEvent
     * Example of a client listener for receiving the notification MeasurementCollectionJobFilesReadyEvent
     *
     * @param measurementCollectionJobFilesReadyEvent MeasurementCollectionJob filesReady Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "measurementCollectionJobFilesReadyEvent",
        summary = "Client listener for entity MeasurementCollectionJobFilesReadyEvent",
        description = "Example of a client listener for receiving the notification MeasurementCollectionJobFilesReadyEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/measurementCollectionJobFilesReadyEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> measurementCollectionJobFilesReadyEvent(
        @Parameter(name = "MeasurementCollectionJobFilesReadyEvent", description = "MeasurementCollectionJob filesReady Event payload", required = true) @Valid @RequestBody MeasurementCollectionJobFilesReadyEvent measurementCollectionJobFilesReadyEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/performanceMeasurementCollectionReadyEvent : Client listener for entity PerformanceMeasurementCollectionReadyEvent
     * Example of a client listener for receiving the notification PerformanceMeasurementCollectionReadyEvent
     *
     * @param performanceMeasurementCollectionReadyEvent PerformanceMeasurement collectionReady Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "performanceMeasurementCollectionReadyEvent",
        summary = "Client listener for entity PerformanceMeasurementCollectionReadyEvent",
        description = "Example of a client listener for receiving the notification PerformanceMeasurementCollectionReadyEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/performanceMeasurementCollectionReadyEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> performanceMeasurementCollectionReadyEvent(
        @Parameter(name = "PerformanceMeasurementCollectionReadyEvent", description = "PerformanceMeasurement collectionReady Event payload", required = true) @Valid @RequestBody PerformanceMeasurementCollectionReadyEvent performanceMeasurementCollectionReadyEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }


    /**
     * POST /listener/performanceMeasurementCreateEvent : Client listener for entity PerformanceMeasurementCreateEvent
     * Example of a client listener for receiving the notification PerformanceMeasurementCreateEvent
     *
     * @param performanceMeasurementCreateEvent PerformanceMeasurement create Event payload (required)
     * @return Notified (status code 204)
     *         or Error (status code 200)
     */
    @Operation(
        operationId = "performanceMeasurementCreateEvent",
        summary = "Client listener for entity PerformanceMeasurementCreateEvent",
        description = "Example of a client listener for receiving the notification PerformanceMeasurementCreateEvent",
        tags = { "notification listener" },
        responses = {
            @ApiResponse(responseCode = "204", description = "Notified"),
            @ApiResponse(responseCode = "default", description = "Error", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/listener/performanceMeasurementCreateEvent",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    default ResponseEntity<Void> performanceMeasurementCreateEvent(
        @Parameter(name = "PerformanceMeasurementCreateEvent", description = "PerformanceMeasurement create Event payload", required = true) @Valid @RequestBody PerformanceMeasurementCreateEvent performanceMeasurementCreateEvent
    ) {
        getRequest().ifPresent(request -> {
            for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
                if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
                    String exampleString = "{ \"reason\" : \"reason\", \"code\" : \"code\", \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"@schemaLocation\" : \"@schemaLocation\", \"message\" : \"message\", \"referenceError\" : \"referenceError\", \"status\" : \"status\" }";
                    ApiUtil.setExampleResponse(request, "application/json", exampleString);
                    break;
                }
            }
        });
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);

    }

}
