metalstack.cloud 0.15.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- buf/__init__.py +0 -0
- buf/validate/__init__.py +0 -0
- buf/validate/validate_pb2.py +450 -0
- buf/validate/validate_pb2.pyi +631 -0
- buf/validate/validate_pb2_grpc.py +4 -0
- metalstack_cloud-0.15.2.dist-info/METADATA +26 -0
- metalstack_cloud-0.15.2.dist-info/RECORD +111 -0
- metalstack_cloud-0.15.2.dist-info/WHEEL +5 -0
- metalstack_cloud-0.15.2.dist-info/top_level.txt +2 -0
- metalstackcloud/__init__.py +0 -0
- metalstackcloud/admin/__init__.py +0 -0
- metalstackcloud/admin/v1/__init__.py +0 -0
- metalstackcloud/admin/v1/cluster_connecpy.py +214 -0
- metalstackcloud/admin/v1/cluster_pb2.py +70 -0
- metalstackcloud/admin/v1/cluster_pb2.pyi +93 -0
- metalstackcloud/admin/v1/cluster_pb2_grpc.py +169 -0
- metalstackcloud/admin/v1/machine_pb2.py +42 -0
- metalstackcloud/admin/v1/machine_pb2.pyi +76 -0
- metalstackcloud/admin/v1/machine_pb2_grpc.py +4 -0
- metalstackcloud/admin/v1/payment_connecpy.py +158 -0
- metalstackcloud/admin/v1/payment_pb2.py +51 -0
- metalstackcloud/admin/v1/payment_pb2.pyi +33 -0
- metalstackcloud/admin/v1/payment_pb2_grpc.py +125 -0
- metalstackcloud/admin/v1/project_connecpy.py +102 -0
- metalstackcloud/admin/v1/project_pb2.py +49 -0
- metalstackcloud/admin/v1/project_pb2.pyi +34 -0
- metalstackcloud/admin/v1/project_pb2_grpc.py +81 -0
- metalstackcloud/admin/v1/storage_connecpy.py +214 -0
- metalstackcloud/admin/v1/storage_pb2.py +75 -0
- metalstackcloud/admin/v1/storage_pb2.pyi +149 -0
- metalstackcloud/admin/v1/storage_pb2_grpc.py +169 -0
- metalstackcloud/admin/v1/tenant_connecpy.py +270 -0
- metalstackcloud/admin/v1/tenant_pb2.py +66 -0
- metalstackcloud/admin/v1/tenant_pb2.pyi +72 -0
- metalstackcloud/admin/v1/tenant_pb2_grpc.py +213 -0
- metalstackcloud/admin/v1/token_connecpy.py +158 -0
- metalstackcloud/admin/v1/token_pb2.py +56 -0
- metalstackcloud/admin/v1/token_pb2.pyi +34 -0
- metalstackcloud/admin/v1/token_pb2_grpc.py +125 -0
- metalstackcloud/api/__init__.py +0 -0
- metalstackcloud/api/v1/__init__.py +0 -0
- metalstackcloud/api/v1/asset_connecpy.py +102 -0
- metalstackcloud/api/v1/asset_pb2.py +76 -0
- metalstackcloud/api/v1/asset_pb2.pyi +132 -0
- metalstackcloud/api/v1/asset_pb2_grpc.py +81 -0
- metalstackcloud/api/v1/audit_connecpy.py +158 -0
- metalstackcloud/api/v1/audit_pb2.py +84 -0
- metalstackcloud/api/v1/audit_pb2.pyi +95 -0
- metalstackcloud/api/v1/audit_pb2_grpc.py +125 -0
- metalstackcloud/api/v1/cluster_connecpy.py +494 -0
- metalstackcloud/api/v1/cluster_pb2.py +183 -0
- metalstackcloud/api/v1/cluster_pb2.pyi +311 -0
- metalstackcloud/api/v1/cluster_pb2_grpc.py +389 -0
- metalstackcloud/api/v1/common_pb2.py +52 -0
- metalstackcloud/api/v1/common_pb2.pyi +98 -0
- metalstackcloud/api/v1/common_pb2_grpc.py +4 -0
- metalstackcloud/api/v1/health_connecpy.py +102 -0
- metalstackcloud/api/v1/health_pb2.py +58 -0
- metalstackcloud/api/v1/health_pb2.pyi +74 -0
- metalstackcloud/api/v1/health_pb2_grpc.py +81 -0
- metalstackcloud/api/v1/ip_connecpy.py +326 -0
- metalstackcloud/api/v1/ip_pb2.py +110 -0
- metalstackcloud/api/v1/ip_pb2.pyi +122 -0
- metalstackcloud/api/v1/ip_pb2_grpc.py +257 -0
- metalstackcloud/api/v1/method_connecpy.py +158 -0
- metalstackcloud/api/v1/method_pb2.py +62 -0
- metalstackcloud/api/v1/method_pb2.pyi +50 -0
- metalstackcloud/api/v1/method_pb2_grpc.py +128 -0
- metalstackcloud/api/v1/payment_connecpy.py +550 -0
- metalstackcloud/api/v1/payment_pb2.py +134 -0
- metalstackcloud/api/v1/payment_pb2.pyi +291 -0
- metalstackcloud/api/v1/payment_pb2_grpc.py +433 -0
- metalstackcloud/api/v1/project_connecpy.py +718 -0
- metalstackcloud/api/v1/project_pb2.py +156 -0
- metalstackcloud/api/v1/project_pb2.pyi +234 -0
- metalstackcloud/api/v1/project_pb2_grpc.py +565 -0
- metalstackcloud/api/v1/snapshot_connecpy.py +214 -0
- metalstackcloud/api/v1/snapshot_pb2.py +75 -0
- metalstackcloud/api/v1/snapshot_pb2.pyi +109 -0
- metalstackcloud/api/v1/snapshot_pb2_grpc.py +169 -0
- metalstackcloud/api/v1/tenant_connecpy.py +774 -0
- metalstackcloud/api/v1/tenant_pb2.py +159 -0
- metalstackcloud/api/v1/tenant_pb2.pyi +305 -0
- metalstackcloud/api/v1/tenant_pb2_grpc.py +609 -0
- metalstackcloud/api/v1/token_connecpy.py +326 -0
- metalstackcloud/api/v1/token_pb2.py +131 -0
- metalstackcloud/api/v1/token_pb2.pyi +175 -0
- metalstackcloud/api/v1/token_pb2_grpc.py +257 -0
- metalstackcloud/api/v1/user_connecpy.py +102 -0
- metalstackcloud/api/v1/user_pb2.py +48 -0
- metalstackcloud/api/v1/user_pb2.pyi +42 -0
- metalstackcloud/api/v1/user_pb2_grpc.py +81 -0
- metalstackcloud/api/v1/version_connecpy.py +102 -0
- metalstackcloud/api/v1/version_pb2.py +46 -0
- metalstackcloud/api/v1/version_pb2.pyi +29 -0
- metalstackcloud/api/v1/version_pb2_grpc.py +81 -0
- metalstackcloud/api/v1/volume_connecpy.py +270 -0
- metalstackcloud/api/v1/volume_pb2.py +91 -0
- metalstackcloud/api/v1/volume_pb2.pyi +165 -0
- metalstackcloud/api/v1/volume_pb2_grpc.py +213 -0
- metalstackcloud/client.py +139 -0
- metalstackcloud/status/__init__.py +0 -0
- metalstackcloud/status/v1/__init__.py +0 -0
- metalstackcloud/status/v1/message_connecpy.py +102 -0
- metalstackcloud/status/v1/message_pb2.py +51 -0
- metalstackcloud/status/v1/message_pb2.pyi +65 -0
- metalstackcloud/status/v1/message_pb2_grpc.py +84 -0
- metalstackcloud/status/v1/status_connecpy.py +102 -0
- metalstackcloud/status/v1/status_pb2.py +45 -0
- metalstackcloud/status/v1/status_pb2.pyi +24 -0
- metalstackcloud/status/v1/status_pb2_grpc.py +84 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by https://github.com/i2y/connecpy/protoc-gen-connecpy. DO NOT EDIT!
|
|
3
|
+
# source: api/v1/token.proto
|
|
4
|
+
|
|
5
|
+
from typing import Optional, Protocol, Union
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from connecpy.async_client import AsyncConnecpyClient
|
|
10
|
+
from connecpy.base import Endpoint
|
|
11
|
+
from connecpy.server import ConnecpyServer
|
|
12
|
+
from connecpy.client import ConnecpyClient
|
|
13
|
+
from connecpy.context import ClientContext, ServiceContext
|
|
14
|
+
import metalstackcloud.api.v1.token_pb2 as api_dot_v1_dot_token__pb2
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TokenService(Protocol):
|
|
18
|
+
async def Get(self, req: api_dot_v1_dot_token__pb2.TokenServiceGetRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceGetResponse: ...
|
|
19
|
+
async def Create(self, req: api_dot_v1_dot_token__pb2.TokenServiceCreateRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceCreateResponse: ...
|
|
20
|
+
async def Update(self, req: api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse: ...
|
|
21
|
+
async def List(self, req: api_dot_v1_dot_token__pb2.TokenServiceListRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceListResponse: ...
|
|
22
|
+
async def Revoke(self, req: api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse: ...
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class TokenServiceServer(ConnecpyServer):
|
|
26
|
+
def __init__(self, *, service: TokenService, server_path_prefix=""):
|
|
27
|
+
super().__init__()
|
|
28
|
+
self._prefix = f"{server_path_prefix}/api.v1.TokenService"
|
|
29
|
+
self._endpoints = {
|
|
30
|
+
"Get": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceGetRequest, api_dot_v1_dot_token__pb2.TokenServiceGetResponse](
|
|
31
|
+
service_name="TokenService",
|
|
32
|
+
name="Get",
|
|
33
|
+
function=getattr(service, "Get"),
|
|
34
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceGetRequest,
|
|
35
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceGetResponse,
|
|
36
|
+
allowed_methods=("POST",),
|
|
37
|
+
),
|
|
38
|
+
"Create": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceCreateRequest, api_dot_v1_dot_token__pb2.TokenServiceCreateResponse](
|
|
39
|
+
service_name="TokenService",
|
|
40
|
+
name="Create",
|
|
41
|
+
function=getattr(service, "Create"),
|
|
42
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceCreateRequest,
|
|
43
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceCreateResponse,
|
|
44
|
+
allowed_methods=("POST",),
|
|
45
|
+
),
|
|
46
|
+
"Update": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest, api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse](
|
|
47
|
+
service_name="TokenService",
|
|
48
|
+
name="Update",
|
|
49
|
+
function=getattr(service, "Update"),
|
|
50
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest,
|
|
51
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse,
|
|
52
|
+
allowed_methods=("POST",),
|
|
53
|
+
),
|
|
54
|
+
"List": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceListRequest, api_dot_v1_dot_token__pb2.TokenServiceListResponse](
|
|
55
|
+
service_name="TokenService",
|
|
56
|
+
name="List",
|
|
57
|
+
function=getattr(service, "List"),
|
|
58
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceListRequest,
|
|
59
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceListResponse,
|
|
60
|
+
allowed_methods=("POST",),
|
|
61
|
+
),
|
|
62
|
+
"Revoke": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest, api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse](
|
|
63
|
+
service_name="TokenService",
|
|
64
|
+
name="Revoke",
|
|
65
|
+
function=getattr(service, "Revoke"),
|
|
66
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest,
|
|
67
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse,
|
|
68
|
+
allowed_methods=("POST",),
|
|
69
|
+
),
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
def serviceName(self):
|
|
73
|
+
return "api.v1.TokenService"
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class TokenServiceSync(Protocol):
|
|
77
|
+
def Get(self, req: api_dot_v1_dot_token__pb2.TokenServiceGetRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceGetResponse: ...
|
|
78
|
+
def Create(self, req: api_dot_v1_dot_token__pb2.TokenServiceCreateRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceCreateResponse: ...
|
|
79
|
+
def Update(self, req: api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse: ...
|
|
80
|
+
def List(self, req: api_dot_v1_dot_token__pb2.TokenServiceListRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceListResponse: ...
|
|
81
|
+
def Revoke(self, req: api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest, ctx: ServiceContext) -> api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse: ...
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class TokenServiceServerSync(ConnecpyServer):
|
|
85
|
+
def __init__(self, *, service: TokenServiceSync, server_path_prefix=""):
|
|
86
|
+
super().__init__()
|
|
87
|
+
self._prefix = f"{server_path_prefix}/api.v1.TokenService"
|
|
88
|
+
self._endpoints = {
|
|
89
|
+
"Get": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceGetRequest, api_dot_v1_dot_token__pb2.TokenServiceGetResponse](
|
|
90
|
+
service_name="TokenService",
|
|
91
|
+
name="Get",
|
|
92
|
+
function=getattr(service, "Get"),
|
|
93
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceGetRequest,
|
|
94
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceGetResponse,
|
|
95
|
+
allowed_methods=("POST",),
|
|
96
|
+
),
|
|
97
|
+
"Create": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceCreateRequest, api_dot_v1_dot_token__pb2.TokenServiceCreateResponse](
|
|
98
|
+
service_name="TokenService",
|
|
99
|
+
name="Create",
|
|
100
|
+
function=getattr(service, "Create"),
|
|
101
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceCreateRequest,
|
|
102
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceCreateResponse,
|
|
103
|
+
allowed_methods=("POST",),
|
|
104
|
+
),
|
|
105
|
+
"Update": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest, api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse](
|
|
106
|
+
service_name="TokenService",
|
|
107
|
+
name="Update",
|
|
108
|
+
function=getattr(service, "Update"),
|
|
109
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest,
|
|
110
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse,
|
|
111
|
+
allowed_methods=("POST",),
|
|
112
|
+
),
|
|
113
|
+
"List": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceListRequest, api_dot_v1_dot_token__pb2.TokenServiceListResponse](
|
|
114
|
+
service_name="TokenService",
|
|
115
|
+
name="List",
|
|
116
|
+
function=getattr(service, "List"),
|
|
117
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceListRequest,
|
|
118
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceListResponse,
|
|
119
|
+
allowed_methods=("POST",),
|
|
120
|
+
),
|
|
121
|
+
"Revoke": Endpoint[api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest, api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse](
|
|
122
|
+
service_name="TokenService",
|
|
123
|
+
name="Revoke",
|
|
124
|
+
function=getattr(service, "Revoke"),
|
|
125
|
+
input=api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest,
|
|
126
|
+
output=api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse,
|
|
127
|
+
allowed_methods=("POST",),
|
|
128
|
+
),
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
def serviceName(self):
|
|
132
|
+
return "api.v1.TokenService"
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class TokenServiceClient(ConnecpyClient):
|
|
136
|
+
def Get(
|
|
137
|
+
self,
|
|
138
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceGetRequest,
|
|
139
|
+
*,
|
|
140
|
+
ctx: Optional[ClientContext] = None,
|
|
141
|
+
server_path_prefix: str = "",
|
|
142
|
+
**kwargs,
|
|
143
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceGetResponse:
|
|
144
|
+
method = "POST"
|
|
145
|
+
return self._make_request(
|
|
146
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Get",
|
|
147
|
+
ctx=ctx,
|
|
148
|
+
request=request,
|
|
149
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceGetResponse,
|
|
150
|
+
method=method,
|
|
151
|
+
**kwargs,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
def Create(
|
|
155
|
+
self,
|
|
156
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceCreateRequest,
|
|
157
|
+
*,
|
|
158
|
+
ctx: Optional[ClientContext] = None,
|
|
159
|
+
server_path_prefix: str = "",
|
|
160
|
+
**kwargs,
|
|
161
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceCreateResponse:
|
|
162
|
+
method = "POST"
|
|
163
|
+
return self._make_request(
|
|
164
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Create",
|
|
165
|
+
ctx=ctx,
|
|
166
|
+
request=request,
|
|
167
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceCreateResponse,
|
|
168
|
+
method=method,
|
|
169
|
+
**kwargs,
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
def Update(
|
|
173
|
+
self,
|
|
174
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest,
|
|
175
|
+
*,
|
|
176
|
+
ctx: Optional[ClientContext] = None,
|
|
177
|
+
server_path_prefix: str = "",
|
|
178
|
+
**kwargs,
|
|
179
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse:
|
|
180
|
+
method = "POST"
|
|
181
|
+
return self._make_request(
|
|
182
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Update",
|
|
183
|
+
ctx=ctx,
|
|
184
|
+
request=request,
|
|
185
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse,
|
|
186
|
+
method=method,
|
|
187
|
+
**kwargs,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
def List(
|
|
191
|
+
self,
|
|
192
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceListRequest,
|
|
193
|
+
*,
|
|
194
|
+
ctx: Optional[ClientContext] = None,
|
|
195
|
+
server_path_prefix: str = "",
|
|
196
|
+
**kwargs,
|
|
197
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceListResponse:
|
|
198
|
+
method = "POST"
|
|
199
|
+
return self._make_request(
|
|
200
|
+
url=f"{server_path_prefix}/api.v1.TokenService/List",
|
|
201
|
+
ctx=ctx,
|
|
202
|
+
request=request,
|
|
203
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceListResponse,
|
|
204
|
+
method=method,
|
|
205
|
+
**kwargs,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
def Revoke(
|
|
209
|
+
self,
|
|
210
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest,
|
|
211
|
+
*,
|
|
212
|
+
ctx: Optional[ClientContext] = None,
|
|
213
|
+
server_path_prefix: str = "",
|
|
214
|
+
**kwargs,
|
|
215
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse:
|
|
216
|
+
method = "POST"
|
|
217
|
+
return self._make_request(
|
|
218
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Revoke",
|
|
219
|
+
ctx=ctx,
|
|
220
|
+
request=request,
|
|
221
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse,
|
|
222
|
+
method=method,
|
|
223
|
+
**kwargs,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class AsyncTokenServiceClient(AsyncConnecpyClient):
|
|
228
|
+
async def Get(
|
|
229
|
+
self,
|
|
230
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceGetRequest,
|
|
231
|
+
*,
|
|
232
|
+
ctx: Optional[ClientContext] = None,
|
|
233
|
+
server_path_prefix: str = "",
|
|
234
|
+
session: Union[httpx.AsyncClient, None] = None,
|
|
235
|
+
**kwargs,
|
|
236
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceGetResponse:
|
|
237
|
+
method = "POST"
|
|
238
|
+
return await self._make_request(
|
|
239
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Get",
|
|
240
|
+
ctx=ctx,
|
|
241
|
+
request=request,
|
|
242
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceGetResponse,
|
|
243
|
+
method=method,
|
|
244
|
+
session=session,
|
|
245
|
+
**kwargs,
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
async def Create(
|
|
249
|
+
self,
|
|
250
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceCreateRequest,
|
|
251
|
+
*,
|
|
252
|
+
ctx: Optional[ClientContext] = None,
|
|
253
|
+
server_path_prefix: str = "",
|
|
254
|
+
session: Union[httpx.AsyncClient, None] = None,
|
|
255
|
+
**kwargs,
|
|
256
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceCreateResponse:
|
|
257
|
+
method = "POST"
|
|
258
|
+
return await self._make_request(
|
|
259
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Create",
|
|
260
|
+
ctx=ctx,
|
|
261
|
+
request=request,
|
|
262
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceCreateResponse,
|
|
263
|
+
method=method,
|
|
264
|
+
session=session,
|
|
265
|
+
**kwargs,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
async def Update(
|
|
269
|
+
self,
|
|
270
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceUpdateRequest,
|
|
271
|
+
*,
|
|
272
|
+
ctx: Optional[ClientContext] = None,
|
|
273
|
+
server_path_prefix: str = "",
|
|
274
|
+
session: Union[httpx.AsyncClient, None] = None,
|
|
275
|
+
**kwargs,
|
|
276
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse:
|
|
277
|
+
method = "POST"
|
|
278
|
+
return await self._make_request(
|
|
279
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Update",
|
|
280
|
+
ctx=ctx,
|
|
281
|
+
request=request,
|
|
282
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceUpdateResponse,
|
|
283
|
+
method=method,
|
|
284
|
+
session=session,
|
|
285
|
+
**kwargs,
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
async def List(
|
|
289
|
+
self,
|
|
290
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceListRequest,
|
|
291
|
+
*,
|
|
292
|
+
ctx: Optional[ClientContext] = None,
|
|
293
|
+
server_path_prefix: str = "",
|
|
294
|
+
session: Union[httpx.AsyncClient, None] = None,
|
|
295
|
+
**kwargs,
|
|
296
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceListResponse:
|
|
297
|
+
method = "POST"
|
|
298
|
+
return await self._make_request(
|
|
299
|
+
url=f"{server_path_prefix}/api.v1.TokenService/List",
|
|
300
|
+
ctx=ctx,
|
|
301
|
+
request=request,
|
|
302
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceListResponse,
|
|
303
|
+
method=method,
|
|
304
|
+
session=session,
|
|
305
|
+
**kwargs,
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
async def Revoke(
|
|
309
|
+
self,
|
|
310
|
+
request: api_dot_v1_dot_token__pb2.TokenServiceRevokeRequest,
|
|
311
|
+
*,
|
|
312
|
+
ctx: Optional[ClientContext] = None,
|
|
313
|
+
server_path_prefix: str = "",
|
|
314
|
+
session: Union[httpx.AsyncClient, None] = None,
|
|
315
|
+
**kwargs,
|
|
316
|
+
) -> api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse:
|
|
317
|
+
method = "POST"
|
|
318
|
+
return await self._make_request(
|
|
319
|
+
url=f"{server_path_prefix}/api.v1.TokenService/Revoke",
|
|
320
|
+
ctx=ctx,
|
|
321
|
+
request=request,
|
|
322
|
+
response_class=api_dot_v1_dot_token__pb2.TokenServiceRevokeResponse,
|
|
323
|
+
method=method,
|
|
324
|
+
session=session,
|
|
325
|
+
**kwargs,
|
|
326
|
+
)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: api/v1/token.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'api/v1/token.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from metalstackcloud.api.v1 import common_pb2 as api_dot_v1_dot_common__pb2
|
|
26
|
+
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
27
|
+
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
|
|
28
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x61pi/v1/token.proto\x12\x06\x61pi.v1\x1a\x13\x61pi/v1/common.proto\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xef\x05\n\x05Token\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12#\n\x07user_id\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x04R\x06userId\x12,\n\x0b\x64\x65scription\x18\x03 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x02R\x0b\x64\x65scription\x12:\n\x0bpermissions\x18\x04 \x03(\x0b\x32\x18.api.v1.MethodPermissionR\x0bpermissions\x12\x34\n\x07\x65xpires\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65xpires\x12\x37\n\tissued_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x08issuedAt\x12:\n\ntoken_type\x18\x08 \x01(\x0e\x32\x11.api.v1.TokenTypeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\ttokenType\x12\x44\n\rproject_roles\x18\t \x03(\x0b\x32\x1f.api.v1.Token.ProjectRolesEntryR\x0cprojectRoles\x12\x41\n\x0ctenant_roles\x18\n \x03(\x0b\x32\x1e.api.v1.Token.TenantRolesEntryR\x0btenantRoles\x12?\n\nadmin_role\x18\x0b \x01(\x0e\x32\x11.api.v1.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\tadminRole\x88\x01\x01\x1aT\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12)\n\x05value\x18\x02 \x01(\x0e\x32\x13.api.v1.ProjectRoleR\x05value:\x02\x38\x01\x1aR\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12(\n\x05value\x18\x02 \x01(\x0e\x32\x12.api.v1.TenantRoleR\x05value:\x02\x38\x01\x42\r\n\x0b_admin_roleJ\x04\x08\x05\x10\x06R\x05roles\"\xc3\x06\n\x19TokenServiceCreateRequest\x12,\n\x0b\x64\x65scription\x18\x01 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x02R\x0b\x64\x65scription\x12:\n\x0bpermissions\x18\x02 \x03(\x0b\x32\x18.api.v1.MethodPermissionR\x0bpermissions\x12G\n\x07\x65xpires\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x12\xbaH\x0f\xaa\x01\x0c\x1a\x05\x08\x81\xe7\x84\x0f\x32\x03\x08\xd8\x04R\x07\x65xpires\x12\xb6\x01\n\rproject_roles\x18\x05 \x03(\x0b\x32\x33.api.v1.TokenServiceCreateRequest.ProjectRolesEntryB\\\xbaHY\x9a\x01V\"\x07r\x05\x10\x03\x18\x80\x01*K\xba\x01H\n\x0erole-specified\x12\x1eproject role must be specified\x1a\x16this >= 0 && this <= 3R\x0cprojectRoles\x12\xb2\x01\n\x0ctenant_roles\x18\x06 \x03(\x0b\x32\x32.api.v1.TokenServiceCreateRequest.TenantRolesEntryB[\xbaHX\x9a\x01U\"\x07r\x05\x10\x03\x18\x80\x01*J\xba\x01G\n\x0erole-specified\x12\x1dtenant role must be specified\x1a\x16this >= 0 && this <= 4R\x0btenantRoles\x12?\n\nadmin_role\x18\x07 \x01(\x0e\x32\x11.api.v1.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\tadminRole\x88\x01\x01\x1aT\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12)\n\x05value\x18\x02 \x01(\x0e\x32\x13.api.v1.ProjectRoleR\x05value:\x02\x38\x01\x1aR\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12(\n\x05value\x18\x02 \x01(\x0e\x32\x12.api.v1.TenantRoleR\x05value:\x02\x38\x01\x42\r\n\x0b_admin_roleJ\x04\x08\x03\x10\x04R\x05roles\"F\n\x10MethodPermission\x12\x18\n\x07subject\x18\x01 \x01(\tR\x07subject\x12\x18\n\x07methods\x18\x02 \x03(\tR\x07methods\"Y\n\x1aTokenServiceCreateResponse\x12#\n\x05token\x18\x01 \x01(\x0b\x32\r.api.v1.TokenR\x05token\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret\"\x19\n\x17TokenServiceListRequest\"A\n\x18TokenServiceListResponse\x12%\n\x06tokens\x18\x01 \x03(\x0b\x32\r.api.v1.TokenR\x06tokens\"9\n\x19TokenServiceRevokeRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\"\x1c\n\x1aTokenServiceRevokeResponse\"\xe3\x04\n\x19TokenServiceUpdateRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12\x31\n\x0b\x64\x65scription\x18\x02 \x01(\tB\n\xbaH\x07r\x05\x10\x02\x18\x80\x02H\x00R\x0b\x64\x65scription\x88\x01\x01\x12:\n\x0bpermissions\x18\x03 \x03(\x0b\x32\x18.api.v1.MethodPermissionR\x0bpermissions\x12X\n\rproject_roles\x18\x04 \x03(\x0b\x32\x33.api.v1.TokenServiceUpdateRequest.ProjectRolesEntryR\x0cprojectRoles\x12U\n\x0ctenant_roles\x18\x05 \x03(\x0b\x32\x32.api.v1.TokenServiceUpdateRequest.TenantRolesEntryR\x0btenantRoles\x12?\n\nadmin_role\x18\x06 \x01(\x0e\x32\x11.api.v1.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\tadminRole\x88\x01\x01\x1aT\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12)\n\x05value\x18\x02 \x01(\x0e\x32\x13.api.v1.ProjectRoleR\x05value:\x02\x38\x01\x1aR\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12(\n\x05value\x18\x02 \x01(\x0e\x32\x12.api.v1.TenantRoleR\x05value:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\r\n\x0b_admin_role\"A\n\x1aTokenServiceUpdateResponse\x12#\n\x05token\x18\x01 \x01(\x0b\x32\r.api.v1.TokenR\x05token\"6\n\x16TokenServiceGetRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\">\n\x17TokenServiceGetResponse\x12#\n\x05token\x18\x01 \x01(\x0b\x32\r.api.v1.TokenR\x05token*S\n\tTokenType\x12\x1a\n\x16TOKEN_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eTOKEN_TYPE_API\x10\x01\x12\x16\n\x12TOKEN_TYPE_CONSOLE\x10\x02\x32\xb2\x03\n\x0cTokenService\x12L\n\x03Get\x12\x1e.api.v1.TokenServiceGetRequest\x1a\x1f.api.v1.TokenServiceGetResponse\"\x04\xd8\xf3\x18\x03\x12U\n\x06\x43reate\x12!.api.v1.TokenServiceCreateRequest\x1a\".api.v1.TokenServiceCreateResponse\"\x04\xd8\xf3\x18\x03\x12U\n\x06Update\x12!.api.v1.TokenServiceUpdateRequest\x1a\".api.v1.TokenServiceUpdateResponse\"\x04\xd8\xf3\x18\x03\x12O\n\x04List\x12\x1f.api.v1.TokenServiceListRequest\x1a .api.v1.TokenServiceListResponse\"\x04\xd8\xf3\x18\x03\x12U\n\x06Revoke\x12!.api.v1.TokenServiceRevokeRequest\x1a\".api.v1.TokenServiceRevokeResponse\"\x04\xd8\xf3\x18\x03\x42\x83\x01\n\ncom.api.v1B\nTokenProtoP\x01Z0github.com/metal-stack-cloud/api/go/api/v1;apiv1\xa2\x02\x03\x41XX\xaa\x02\x06\x41pi.V1\xca\x02\x06\x41pi\\V1\xe2\x02\x12\x41pi\\V1\\GPBMetadata\xea\x02\x07\x41pi::V1b\x06proto3')
|
|
32
|
+
|
|
33
|
+
_globals = globals()
|
|
34
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
35
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'api.v1.token_pb2', _globals)
|
|
36
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
37
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
38
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\ncom.api.v1B\nTokenProtoP\001Z0github.com/metal-stack-cloud/api/go/api/v1;apiv1\242\002\003AXX\252\002\006Api.V1\312\002\006Api\\V1\342\002\022Api\\V1\\GPBMetadata\352\002\007Api::V1'
|
|
39
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._loaded_options = None
|
|
40
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._serialized_options = b'8\001'
|
|
41
|
+
_globals['_TOKEN_TENANTROLESENTRY']._loaded_options = None
|
|
42
|
+
_globals['_TOKEN_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
43
|
+
_globals['_TOKEN'].fields_by_name['uuid']._loaded_options = None
|
|
44
|
+
_globals['_TOKEN'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
45
|
+
_globals['_TOKEN'].fields_by_name['user_id']._loaded_options = None
|
|
46
|
+
_globals['_TOKEN'].fields_by_name['user_id']._serialized_options = b'\272H\007r\005\020\002\030\200\004'
|
|
47
|
+
_globals['_TOKEN'].fields_by_name['description']._loaded_options = None
|
|
48
|
+
_globals['_TOKEN'].fields_by_name['description']._serialized_options = b'\272H\007r\005\020\002\030\200\002'
|
|
49
|
+
_globals['_TOKEN'].fields_by_name['token_type']._loaded_options = None
|
|
50
|
+
_globals['_TOKEN'].fields_by_name['token_type']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
51
|
+
_globals['_TOKEN'].fields_by_name['admin_role']._loaded_options = None
|
|
52
|
+
_globals['_TOKEN'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
53
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._loaded_options = None
|
|
54
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._serialized_options = b'8\001'
|
|
55
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._loaded_options = None
|
|
56
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
57
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['description']._loaded_options = None
|
|
58
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['description']._serialized_options = b'\272H\007r\005\020\002\030\200\002'
|
|
59
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['expires']._loaded_options = None
|
|
60
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['expires']._serialized_options = b'\272H\017\252\001\014\032\005\010\201\347\204\0172\003\010\330\004'
|
|
61
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['project_roles']._loaded_options = None
|
|
62
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['project_roles']._serialized_options = b'\272HY\232\001V\"\007r\005\020\003\030\200\001*K\272\001H\n\016role-specified\022\036project role must be specified\032\026this >= 0 && this <= 3'
|
|
63
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['tenant_roles']._loaded_options = None
|
|
64
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['tenant_roles']._serialized_options = b'\272HX\232\001U\"\007r\005\020\003\030\200\001*J\272\001G\n\016role-specified\022\035tenant role must be specified\032\026this >= 0 && this <= 4'
|
|
65
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['admin_role']._loaded_options = None
|
|
66
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
67
|
+
_globals['_TOKENSERVICEREVOKEREQUEST'].fields_by_name['uuid']._loaded_options = None
|
|
68
|
+
_globals['_TOKENSERVICEREVOKEREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
69
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._loaded_options = None
|
|
70
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._serialized_options = b'8\001'
|
|
71
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._loaded_options = None
|
|
72
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
73
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['uuid']._loaded_options = None
|
|
74
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
75
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['description']._loaded_options = None
|
|
76
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['description']._serialized_options = b'\272H\007r\005\020\002\030\200\002'
|
|
77
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['admin_role']._loaded_options = None
|
|
78
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
79
|
+
_globals['_TOKENSERVICEGETREQUEST'].fields_by_name['uuid']._loaded_options = None
|
|
80
|
+
_globals['_TOKENSERVICEGETREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
81
|
+
_globals['_TOKENSERVICE'].methods_by_name['Get']._loaded_options = None
|
|
82
|
+
_globals['_TOKENSERVICE'].methods_by_name['Get']._serialized_options = b'\330\363\030\003'
|
|
83
|
+
_globals['_TOKENSERVICE'].methods_by_name['Create']._loaded_options = None
|
|
84
|
+
_globals['_TOKENSERVICE'].methods_by_name['Create']._serialized_options = b'\330\363\030\003'
|
|
85
|
+
_globals['_TOKENSERVICE'].methods_by_name['Update']._loaded_options = None
|
|
86
|
+
_globals['_TOKENSERVICE'].methods_by_name['Update']._serialized_options = b'\330\363\030\003'
|
|
87
|
+
_globals['_TOKENSERVICE'].methods_by_name['List']._loaded_options = None
|
|
88
|
+
_globals['_TOKENSERVICE'].methods_by_name['List']._serialized_options = b'\330\363\030\003'
|
|
89
|
+
_globals['_TOKENSERVICE'].methods_by_name['Revoke']._loaded_options = None
|
|
90
|
+
_globals['_TOKENSERVICE'].methods_by_name['Revoke']._serialized_options = b'\330\363\030\003'
|
|
91
|
+
_globals['_TOKENTYPE']._serialized_start=2884
|
|
92
|
+
_globals['_TOKENTYPE']._serialized_end=2967
|
|
93
|
+
_globals['_TOKEN']._serialized_start=146
|
|
94
|
+
_globals['_TOKEN']._serialized_end=897
|
|
95
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._serialized_start=701
|
|
96
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._serialized_end=785
|
|
97
|
+
_globals['_TOKEN_TENANTROLESENTRY']._serialized_start=787
|
|
98
|
+
_globals['_TOKEN_TENANTROLESENTRY']._serialized_end=869
|
|
99
|
+
_globals['_TOKENSERVICECREATEREQUEST']._serialized_start=900
|
|
100
|
+
_globals['_TOKENSERVICECREATEREQUEST']._serialized_end=1735
|
|
101
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._serialized_start=701
|
|
102
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._serialized_end=785
|
|
103
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._serialized_start=787
|
|
104
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._serialized_end=869
|
|
105
|
+
_globals['_METHODPERMISSION']._serialized_start=1737
|
|
106
|
+
_globals['_METHODPERMISSION']._serialized_end=1807
|
|
107
|
+
_globals['_TOKENSERVICECREATERESPONSE']._serialized_start=1809
|
|
108
|
+
_globals['_TOKENSERVICECREATERESPONSE']._serialized_end=1898
|
|
109
|
+
_globals['_TOKENSERVICELISTREQUEST']._serialized_start=1900
|
|
110
|
+
_globals['_TOKENSERVICELISTREQUEST']._serialized_end=1925
|
|
111
|
+
_globals['_TOKENSERVICELISTRESPONSE']._serialized_start=1927
|
|
112
|
+
_globals['_TOKENSERVICELISTRESPONSE']._serialized_end=1992
|
|
113
|
+
_globals['_TOKENSERVICEREVOKEREQUEST']._serialized_start=1994
|
|
114
|
+
_globals['_TOKENSERVICEREVOKEREQUEST']._serialized_end=2051
|
|
115
|
+
_globals['_TOKENSERVICEREVOKERESPONSE']._serialized_start=2053
|
|
116
|
+
_globals['_TOKENSERVICEREVOKERESPONSE']._serialized_end=2081
|
|
117
|
+
_globals['_TOKENSERVICEUPDATEREQUEST']._serialized_start=2084
|
|
118
|
+
_globals['_TOKENSERVICEUPDATEREQUEST']._serialized_end=2695
|
|
119
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._serialized_start=701
|
|
120
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._serialized_end=785
|
|
121
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._serialized_start=787
|
|
122
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._serialized_end=869
|
|
123
|
+
_globals['_TOKENSERVICEUPDATERESPONSE']._serialized_start=2697
|
|
124
|
+
_globals['_TOKENSERVICEUPDATERESPONSE']._serialized_end=2762
|
|
125
|
+
_globals['_TOKENSERVICEGETREQUEST']._serialized_start=2764
|
|
126
|
+
_globals['_TOKENSERVICEGETREQUEST']._serialized_end=2818
|
|
127
|
+
_globals['_TOKENSERVICEGETRESPONSE']._serialized_start=2820
|
|
128
|
+
_globals['_TOKENSERVICEGETRESPONSE']._serialized_end=2882
|
|
129
|
+
_globals['_TOKENSERVICE']._serialized_start=2970
|
|
130
|
+
_globals['_TOKENSERVICE']._serialized_end=3404
|
|
131
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
|
|
3
|
+
from api.v1 import common_pb2 as _common_pb2
|
|
4
|
+
from buf.validate import validate_pb2 as _validate_pb2
|
|
5
|
+
from google.protobuf import duration_pb2 as _duration_pb2
|
|
6
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
7
|
+
from google.protobuf.internal import containers as _containers
|
|
8
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
9
|
+
from google.protobuf import descriptor as _descriptor
|
|
10
|
+
from google.protobuf import message as _message
|
|
11
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
12
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
13
|
+
|
|
14
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
15
|
+
|
|
16
|
+
class TokenType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
17
|
+
__slots__ = ()
|
|
18
|
+
TOKEN_TYPE_UNSPECIFIED: _ClassVar[TokenType]
|
|
19
|
+
TOKEN_TYPE_API: _ClassVar[TokenType]
|
|
20
|
+
TOKEN_TYPE_CONSOLE: _ClassVar[TokenType]
|
|
21
|
+
TOKEN_TYPE_UNSPECIFIED: TokenType
|
|
22
|
+
TOKEN_TYPE_API: TokenType
|
|
23
|
+
TOKEN_TYPE_CONSOLE: TokenType
|
|
24
|
+
|
|
25
|
+
class Token(_message.Message):
|
|
26
|
+
__slots__ = ("uuid", "user_id", "description", "permissions", "expires", "issued_at", "token_type", "project_roles", "tenant_roles", "admin_role")
|
|
27
|
+
class ProjectRolesEntry(_message.Message):
|
|
28
|
+
__slots__ = ("key", "value")
|
|
29
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
30
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
key: str
|
|
32
|
+
value: _common_pb2.ProjectRole
|
|
33
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_common_pb2.ProjectRole, str]] = ...) -> None: ...
|
|
34
|
+
class TenantRolesEntry(_message.Message):
|
|
35
|
+
__slots__ = ("key", "value")
|
|
36
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
key: str
|
|
39
|
+
value: _common_pb2.TenantRole
|
|
40
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_common_pb2.TenantRole, str]] = ...) -> None: ...
|
|
41
|
+
UUID_FIELD_NUMBER: _ClassVar[int]
|
|
42
|
+
USER_ID_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
EXPIRES_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
ISSUED_AT_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
TOKEN_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
48
|
+
PROJECT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
49
|
+
TENANT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
50
|
+
ADMIN_ROLE_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
uuid: str
|
|
52
|
+
user_id: str
|
|
53
|
+
description: str
|
|
54
|
+
permissions: _containers.RepeatedCompositeFieldContainer[MethodPermission]
|
|
55
|
+
expires: _timestamp_pb2.Timestamp
|
|
56
|
+
issued_at: _timestamp_pb2.Timestamp
|
|
57
|
+
token_type: TokenType
|
|
58
|
+
project_roles: _containers.ScalarMap[str, _common_pb2.ProjectRole]
|
|
59
|
+
tenant_roles: _containers.ScalarMap[str, _common_pb2.TenantRole]
|
|
60
|
+
admin_role: _common_pb2.AdminRole
|
|
61
|
+
def __init__(self, uuid: _Optional[str] = ..., user_id: _Optional[str] = ..., description: _Optional[str] = ..., permissions: _Optional[_Iterable[_Union[MethodPermission, _Mapping]]] = ..., expires: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., issued_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., token_type: _Optional[_Union[TokenType, str]] = ..., project_roles: _Optional[_Mapping[str, _common_pb2.ProjectRole]] = ..., tenant_roles: _Optional[_Mapping[str, _common_pb2.TenantRole]] = ..., admin_role: _Optional[_Union[_common_pb2.AdminRole, str]] = ...) -> None: ...
|
|
62
|
+
|
|
63
|
+
class TokenServiceCreateRequest(_message.Message):
|
|
64
|
+
__slots__ = ("description", "permissions", "expires", "project_roles", "tenant_roles", "admin_role")
|
|
65
|
+
class ProjectRolesEntry(_message.Message):
|
|
66
|
+
__slots__ = ("key", "value")
|
|
67
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
key: str
|
|
70
|
+
value: _common_pb2.ProjectRole
|
|
71
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_common_pb2.ProjectRole, str]] = ...) -> None: ...
|
|
72
|
+
class TenantRolesEntry(_message.Message):
|
|
73
|
+
__slots__ = ("key", "value")
|
|
74
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
75
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
76
|
+
key: str
|
|
77
|
+
value: _common_pb2.TenantRole
|
|
78
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_common_pb2.TenantRole, str]] = ...) -> None: ...
|
|
79
|
+
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
80
|
+
PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
EXPIRES_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
PROJECT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
83
|
+
TENANT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
84
|
+
ADMIN_ROLE_FIELD_NUMBER: _ClassVar[int]
|
|
85
|
+
description: str
|
|
86
|
+
permissions: _containers.RepeatedCompositeFieldContainer[MethodPermission]
|
|
87
|
+
expires: _duration_pb2.Duration
|
|
88
|
+
project_roles: _containers.ScalarMap[str, _common_pb2.ProjectRole]
|
|
89
|
+
tenant_roles: _containers.ScalarMap[str, _common_pb2.TenantRole]
|
|
90
|
+
admin_role: _common_pb2.AdminRole
|
|
91
|
+
def __init__(self, description: _Optional[str] = ..., permissions: _Optional[_Iterable[_Union[MethodPermission, _Mapping]]] = ..., expires: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., project_roles: _Optional[_Mapping[str, _common_pb2.ProjectRole]] = ..., tenant_roles: _Optional[_Mapping[str, _common_pb2.TenantRole]] = ..., admin_role: _Optional[_Union[_common_pb2.AdminRole, str]] = ...) -> None: ...
|
|
92
|
+
|
|
93
|
+
class MethodPermission(_message.Message):
|
|
94
|
+
__slots__ = ("subject", "methods")
|
|
95
|
+
SUBJECT_FIELD_NUMBER: _ClassVar[int]
|
|
96
|
+
METHODS_FIELD_NUMBER: _ClassVar[int]
|
|
97
|
+
subject: str
|
|
98
|
+
methods: _containers.RepeatedScalarFieldContainer[str]
|
|
99
|
+
def __init__(self, subject: _Optional[str] = ..., methods: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
100
|
+
|
|
101
|
+
class TokenServiceCreateResponse(_message.Message):
|
|
102
|
+
__slots__ = ("token", "secret")
|
|
103
|
+
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
+
SECRET_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
token: Token
|
|
106
|
+
secret: str
|
|
107
|
+
def __init__(self, token: _Optional[_Union[Token, _Mapping]] = ..., secret: _Optional[str] = ...) -> None: ...
|
|
108
|
+
|
|
109
|
+
class TokenServiceListRequest(_message.Message):
|
|
110
|
+
__slots__ = ()
|
|
111
|
+
def __init__(self) -> None: ...
|
|
112
|
+
|
|
113
|
+
class TokenServiceListResponse(_message.Message):
|
|
114
|
+
__slots__ = ("tokens",)
|
|
115
|
+
TOKENS_FIELD_NUMBER: _ClassVar[int]
|
|
116
|
+
tokens: _containers.RepeatedCompositeFieldContainer[Token]
|
|
117
|
+
def __init__(self, tokens: _Optional[_Iterable[_Union[Token, _Mapping]]] = ...) -> None: ...
|
|
118
|
+
|
|
119
|
+
class TokenServiceRevokeRequest(_message.Message):
|
|
120
|
+
__slots__ = ("uuid",)
|
|
121
|
+
UUID_FIELD_NUMBER: _ClassVar[int]
|
|
122
|
+
uuid: str
|
|
123
|
+
def __init__(self, uuid: _Optional[str] = ...) -> None: ...
|
|
124
|
+
|
|
125
|
+
class TokenServiceRevokeResponse(_message.Message):
|
|
126
|
+
__slots__ = ()
|
|
127
|
+
def __init__(self) -> None: ...
|
|
128
|
+
|
|
129
|
+
class TokenServiceUpdateRequest(_message.Message):
|
|
130
|
+
__slots__ = ("uuid", "description", "permissions", "project_roles", "tenant_roles", "admin_role")
|
|
131
|
+
class ProjectRolesEntry(_message.Message):
|
|
132
|
+
__slots__ = ("key", "value")
|
|
133
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
+
key: str
|
|
136
|
+
value: _common_pb2.ProjectRole
|
|
137
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_common_pb2.ProjectRole, str]] = ...) -> None: ...
|
|
138
|
+
class TenantRolesEntry(_message.Message):
|
|
139
|
+
__slots__ = ("key", "value")
|
|
140
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
141
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
142
|
+
key: str
|
|
143
|
+
value: _common_pb2.TenantRole
|
|
144
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_common_pb2.TenantRole, str]] = ...) -> None: ...
|
|
145
|
+
UUID_FIELD_NUMBER: _ClassVar[int]
|
|
146
|
+
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
147
|
+
PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
|
|
148
|
+
PROJECT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
149
|
+
TENANT_ROLES_FIELD_NUMBER: _ClassVar[int]
|
|
150
|
+
ADMIN_ROLE_FIELD_NUMBER: _ClassVar[int]
|
|
151
|
+
uuid: str
|
|
152
|
+
description: str
|
|
153
|
+
permissions: _containers.RepeatedCompositeFieldContainer[MethodPermission]
|
|
154
|
+
project_roles: _containers.ScalarMap[str, _common_pb2.ProjectRole]
|
|
155
|
+
tenant_roles: _containers.ScalarMap[str, _common_pb2.TenantRole]
|
|
156
|
+
admin_role: _common_pb2.AdminRole
|
|
157
|
+
def __init__(self, uuid: _Optional[str] = ..., description: _Optional[str] = ..., permissions: _Optional[_Iterable[_Union[MethodPermission, _Mapping]]] = ..., project_roles: _Optional[_Mapping[str, _common_pb2.ProjectRole]] = ..., tenant_roles: _Optional[_Mapping[str, _common_pb2.TenantRole]] = ..., admin_role: _Optional[_Union[_common_pb2.AdminRole, str]] = ...) -> None: ...
|
|
158
|
+
|
|
159
|
+
class TokenServiceUpdateResponse(_message.Message):
|
|
160
|
+
__slots__ = ("token",)
|
|
161
|
+
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
|
162
|
+
token: Token
|
|
163
|
+
def __init__(self, token: _Optional[_Union[Token, _Mapping]] = ...) -> None: ...
|
|
164
|
+
|
|
165
|
+
class TokenServiceGetRequest(_message.Message):
|
|
166
|
+
__slots__ = ("uuid",)
|
|
167
|
+
UUID_FIELD_NUMBER: _ClassVar[int]
|
|
168
|
+
uuid: str
|
|
169
|
+
def __init__(self, uuid: _Optional[str] = ...) -> None: ...
|
|
170
|
+
|
|
171
|
+
class TokenServiceGetResponse(_message.Message):
|
|
172
|
+
__slots__ = ("token",)
|
|
173
|
+
TOKEN_FIELD_NUMBER: _ClassVar[int]
|
|
174
|
+
token: Token
|
|
175
|
+
def __init__(self, token: _Optional[_Union[Token, _Mapping]] = ...) -> None: ...
|