forked from kirkbrauer/jumpstarter-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.proto
More file actions
170 lines (150 loc) · 5.77 KB
/
Copy pathclient.proto
File metadata and controls
170 lines (150 loc) · 5.77 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
// Copyright 2024 The Jumpstarter Authors
// (-- api-linter: core::0215::foreign-type-reference=disabled
// (-- api-linter: core::0192::has-comments=disabled
// (-- api-linter: core::0191::java-package=disabled
// (-- api-linter: core::0191::java-outer-classname=disabled
// (-- api-linter: core::0191::java-multiple-files=disabled
syntax = "proto3";
package jumpstarter.client.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "jumpstarter/v1/kubernetes.proto";
import "jumpstarter/v1/common.proto";
service ClientService {
rpc GetExporter(GetExporterRequest) returns (Exporter) {
option (google.api.http) = {get: "/v1/{name=namespaces/*/exporters/*}"};
option (google.api.method_signature) = "name";
}
rpc ListExporters(ListExportersRequest) returns (ListExportersResponse) {
option (google.api.http) = {get: "/v1/{parent=namespaces/*}/exporters"};
option (google.api.method_signature) = "parent";
}
rpc GetLease(GetLeaseRequest) returns (Lease) {
option (google.api.http) = {get: "/v1/{name=namespaces/*/leases/*}"};
option (google.api.method_signature) = "name";
}
rpc ListLeases(ListLeasesRequest) returns (ListLeasesResponse) {
option (google.api.http) = {get: "/v1/{parent=namespaces/*}/leases"};
option (google.api.method_signature) = "parent";
}
rpc CreateLease(CreateLeaseRequest) returns (Lease) {
option (google.api.http) = {
post: "/v1/{parent=namespaces/*}/leases"
body: "lease"
};
option (google.api.method_signature) = "parent,lease,lease_id";
}
rpc UpdateLease(UpdateLeaseRequest) returns (Lease) {
option (google.api.http) = {
patch: "/v1/{lease.name=namespaces/*/leases/*}"
body: "lease"
};
option (google.api.method_signature) = "lease,update_mask";
}
rpc DeleteLease(DeleteLeaseRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/v1/{name=namespaces/*/leases/*}"};
option (google.api.method_signature) = "name";
}
}
message Exporter {
option (google.api.resource) = {
type: "jumpstarter.dev/Exporter"
pattern: "namespaces/{namespace}/exporters/{exporter}"
singular: "exporter"
plural: "exporters"
};
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
map<string, string> labels = 2;
bool online = 3 [(google.api.field_behavior) = OUTPUT_ONLY, deprecated = true];
jumpstarter.v1.ExporterStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message Lease {
option (google.api.resource) = {
type: "jumpstarter.dev/Lease"
pattern: "namespaces/{namespace}/leases/{lease}"
singular: "lease"
plural: "leases"
};
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
string selector = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
optional google.protobuf.Duration duration = 3;
google.protobuf.Duration effective_duration = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
optional google.protobuf.Timestamp begin_time = 5;
optional google.protobuf.Timestamp effective_begin_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
optional google.protobuf.Timestamp end_time = 7;
optional google.protobuf.Timestamp effective_end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
optional string client = 9 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {type: "jumpstarter.dev/Client"}
];
optional string exporter = 10 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {type: "jumpstarter.dev/Exporter"}
];
repeated jumpstarter.v1.Condition conditions = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message GetExporterRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {type: "jumpstarter.dev/Exporter"}
];
}
message ListExportersRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {child_type: "jumpstarter.dev/Exporter"}
];
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
}
message ListExportersResponse {
repeated Exporter exporters = 1;
string next_page_token = 2;
}
message GetLeaseRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {type: "jumpstarter.dev/Lease"}
];
}
message ListLeasesRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {child_type: "jumpstarter.dev/Lease"}
];
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
}
message ListLeasesResponse {
repeated Lease leases = 1;
string next_page_token = 2;
}
message CreateLeaseRequest {
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {child_type: "jumpstarter.dev/Lease"}
];
string lease_id = 2 [(google.api.field_behavior) = OPTIONAL];
Lease lease = 3 [(google.api.field_behavior) = REQUIRED];
}
message UpdateLeaseRequest {
Lease lease = 1 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
}
message DeleteLeaseRequest {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {type: "jumpstarter.dev/Lease"}
];
}