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

io.rancher.service.ImageVolumesService Maven / Gradle / Ivy

The newest version!
package io.rancher.service;

import io.rancher.base.Filters;
import io.rancher.base.TypeCollection;
import io.rancher.type.Volume;
import io.rancher.type.VolumeSnapshotInput;
import io.rancher.type.Snapshot;
import io.rancher.type.RestoreFromBackupInput;
import io.rancher.type.RevertToSnapshotInput;

import retrofit2.Call;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;

public interface ImageVolumesService {

    @GET("images/{projectId}/volume")
    Call> list(@Path("projectId") String projectId);

    @GET("images/{projectId}/volume")
    Call> list(@Path("projectId") String projectId, @QueryMap Filters filters);

    @GET("images/{projectId}/volume/{id}")
    Call get(@Path("projectId") String projectId, @Path("id") String id);

    @POST("images/{projectId}/volume")
    Call create(@Path("projectId") String projectId, @Body Volume volume);

    @PUT("images/{projectId}/volume/{id}")
    Call update(@Path("projectId") String projectId, @Path("id") String id, @Body Volume volume);

    @DELETE("images/{projectId}/volume/{id}")
    Call delete(@Path("projectId") String projectId, @Path("id") String id);
    
    @POST("images/{projectId}/volume/{id}?action=allocate")
    Call allocate(@Path("projectId") String projectId, @Path("id") String id);
    
    @POST("images/{projectId}/volume/{id}?action=deallocate")
    Call deallocate(@Path("projectId") String projectId, @Path("id") String id);
    
    @POST("images/{projectId}/volume/{id}?action=purge")
    Call purge(@Path("projectId") String projectId, @Path("id") String id);
    
    @POST("images/{projectId}/volume/{id}?action=remove")
    Call remove(@Path("projectId") String projectId, @Path("id") String id);
    
    @POST("images/{projectId}/volume/{id}?action=restorefrombackup")
    Call restorefrombackup(@Path("projectId") String projectId, @Path("id") String id, @Body RestoreFromBackupInput restoreFromBackupInput);
    
    @POST("images/{projectId}/volume/{id}?action=reverttosnapshot")
    Call reverttosnapshot(@Path("projectId") String projectId, @Path("id") String id, @Body RevertToSnapshotInput revertToSnapshotInput);
    
    @POST("images/{projectId}/volume/{id}?action=snapshot")
    Call snapshot(@Path("projectId") String projectId, @Path("id") String id, @Body VolumeSnapshotInput volumeSnapshotInput);
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy