aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/CostResource.java
blob: 95c2df47aa5aaac7692603552868a2caec2992e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.application.v4;

import com.yahoo.vespa.hosted.controller.api.application.v4.model.CostMonths;
import com.yahoo.vespa.hosted.controller.api.application.v4.model.CostResult;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * @author ogronnesby
 */
@Path("")  //Ensures that the produces annotation is inherited
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface CostResource {
    String API_PATH = "cost";

    @GET
    @Path("/")
    CostMonths costMonths();

    @GET
    @Path("/{month}")
    CostResult cost(@PathParam("month") String month);
}