7ee6506120f8fe94fe6a6a1042a405e4f3a4d8c5
[transportpce.git] / dmaap-client / src / main / java / org / opendaylight / transportpce / dmaap / client / resource / EventsApi.java
1 /*
2  * Copyright © 2021 Orange, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.dmaap.client.resource;
9
10 import javax.ws.rs.Consumes;
11 import javax.ws.rs.POST;
12 import javax.ws.rs.Path;
13 import javax.ws.rs.PathParam;
14 import javax.ws.rs.Produces;
15 import javax.ws.rs.core.MediaType;
16 import org.opendaylight.transportpce.dmaap.client.resource.model.CreatedEvent;
17
18 import org.opendaylight.yang.gen.v1.nbi.notifications.rev230728.PublishNotificationProcessService;
19
20 @Path("/events")
21 public interface EventsApi {
22
23     @POST
24     @Consumes(MediaType.APPLICATION_JSON)
25     @Produces(MediaType.APPLICATION_JSON)
26     @Path("/{topic}")
27     CreatedEvent sendEvent(@PathParam("topic") String topic, PublishNotificationProcessService event);
28
29 }