Add support for cba enrich, publish, draft, remove
[ccsdk/cds.git] / components / model-catalog / proto-definition / proto / BluePrintManagement.proto
1 syntax = "proto3";
2 import "google/protobuf/struct.proto";
3 import "BluePrintCommon.proto";
4 option java_multiple_files = true;
5 package org.onap.ccsdk.cds.controllerblueprints.management.api;
6
7 message BluePrintUploadInput {
8     org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
9     FileChunk fileChunk = 2;
10     org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 3;
11     // Extra optional dynamic properties used during upload.
12     google.protobuf.Struct properties = 4;
13 }
14
15 message BluePrintDownloadInput {
16     org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
17     org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
18     // Extra optional dynamic properties used to download.
19     google.protobuf.Struct properties = 3;
20 }
21
22 message BluePrintRemoveInput {
23     org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
24     string blueprintName = 2;
25     string blueprintVersion = 3;
26 }
27
28 message BluePrintManagementOutput {
29     org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
30     // Optional file chunk sent back to the client for Enrich and Download this is mandatory.
31     FileChunk fileChunk = 2;
32     org.onap.ccsdk.cds.controllerblueprints.common.api.Status status = 3;
33     // Extra optional dynamic properties.
34     google.protobuf.Struct properties = 4;
35 }
36
37 message FileChunk {
38     bytes chunk = 1;
39 }
40 // Values used in BluePrintDownloadInput/actionIdentifiers/action
41 enum DownloadAction {
42     // Default is SEARCH the cba and download the cba
43     SEARCH = 0;
44     // Download the starter cba with corresponding property options
45     STARTER = 1;
46     // clone cba with corresponding property options
47     CLONE = 2;
48 }
49
50 enum UploadAction {
51     // Default is DRAFT
52     DRAFT = 0;
53     ENRICH = 1;
54     VALIDATE = 2;
55     PUBLISH = 3;
56 }
57
58 service BluePrintManagementService {
59     rpc downloadBlueprint (BluePrintDownloadInput) returns (BluePrintManagementOutput);
60     rpc uploadBlueprint (BluePrintUploadInput) returns (BluePrintManagementOutput);
61     rpc removeBlueprint (BluePrintRemoveInput) returns (BluePrintManagementOutput);
62 }