All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudesire.platform.apiclient.api.EventApi Maven / Gradle / Ivy

The newest version!
package com.cloudesire.platform.apiclient.api;

import com.cloudesire.platform.apiclient.query.EventQuery;
import com.cloudesire.platform.apiclient.dto.model.dto.EventDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

import java.util.List;

public interface EventApi
{
    @POST( "event" )
    Call create( @Body EventDTO event );

    @GET( "event" )
    Call> getAll();

    @GET( "event" )
    Call> getAll( @QueryMap EventQuery query );

    @GET( "event/annotated")
    Call> getAnnotated();

    @DELETE( "event" )
    Call delete();

    @DELETE( "event" )
    Call delete( @Query("eventType") DeleteEventType type );

    @DELETE( "event/{id}" )
    Call delete( @Path( "id" ) int id );

    enum EventType
    {
        ALL,
        ENTITY,
        TRUE,
        FALSE;

        @Override
        public String toString()
        {
            return name().toLowerCase();
        }
    }

    enum DeleteEventType
    {
        NOTIFIED,
        FAILED;

        @Override
        public String toString()
        {
            return name().toLowerCase();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy