plexspaces 0.1.1__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.
Files changed (87) hide show
  1. plexspaces/__init__.py +80 -0
  2. plexspaces/actor_id.py +114 -0
  3. plexspaces/decorators.py +691 -0
  4. plexspaces/generated/__init__.py +0 -0
  5. plexspaces/generated/buf/__init__.py +0 -0
  6. plexspaces/generated/buf/validate/__init__.py +3799 -0
  7. plexspaces/generated/google/__init__.py +0 -0
  8. plexspaces/generated/google/api/__init__.py +379 -0
  9. plexspaces/generated/grpc/__init__.py +0 -0
  10. plexspaces/generated/grpc/gateway/__init__.py +0 -0
  11. plexspaces/generated/grpc/gateway/protoc_gen_openapiv2/__init__.py +0 -0
  12. plexspaces/generated/grpc/gateway/protoc_gen_openapiv2/options/__init__.py +1022 -0
  13. plexspaces/generated/plexspaces/__init__.py +0 -0
  14. plexspaces/generated/plexspaces/actor/__init__.py +0 -0
  15. plexspaces/generated/plexspaces/actor/v1/__init__.py +3538 -0
  16. plexspaces/generated/plexspaces/application/__init__.py +0 -0
  17. plexspaces/generated/plexspaces/application/v1/__init__.py +827 -0
  18. plexspaces/generated/plexspaces/behaviors/__init__.py +0 -0
  19. plexspaces/generated/plexspaces/behaviors/v1/__init__.py +63 -0
  20. plexspaces/generated/plexspaces/channel/__init__.py +0 -0
  21. plexspaces/generated/plexspaces/channel/v1/__init__.py +915 -0
  22. plexspaces/generated/plexspaces/circuitbreaker/__init__.py +0 -0
  23. plexspaces/generated/plexspaces/circuitbreaker/prv/__init__.py +398 -0
  24. plexspaces/generated/plexspaces/common/__init__.py +0 -0
  25. plexspaces/generated/plexspaces/common/v1/__init__.py +691 -0
  26. plexspaces/generated/plexspaces/config/__init__.py +0 -0
  27. plexspaces/generated/plexspaces/config/v1/__init__.py +109 -0
  28. plexspaces/generated/plexspaces/dashboard/__init__.py +0 -0
  29. plexspaces/generated/plexspaces/dashboard/v1/__init__.py +647 -0
  30. plexspaces/generated/plexspaces/facets/__init__.py +0 -0
  31. plexspaces/generated/plexspaces/facets/v1/__init__.py +333 -0
  32. plexspaces/generated/plexspaces/firecracker/__init__.py +0 -0
  33. plexspaces/generated/plexspaces/firecracker/v1/__init__.py +890 -0
  34. plexspaces/generated/plexspaces/grpc/__init__.py +0 -0
  35. plexspaces/generated/plexspaces/grpc/v1/__init__.py +679 -0
  36. plexspaces/generated/plexspaces/journaling/__init__.py +0 -0
  37. plexspaces/generated/plexspaces/journaling/v1/__init__.py +1006 -0
  38. plexspaces/generated/plexspaces/keyvalue/__init__.py +0 -0
  39. plexspaces/generated/plexspaces/keyvalue/v1/__init__.py +1007 -0
  40. plexspaces/generated/plexspaces/locks/__init__.py +0 -0
  41. plexspaces/generated/plexspaces/locks/prv/__init__.py +122 -0
  42. plexspaces/generated/plexspaces/mailbox/__init__.py +0 -0
  43. plexspaces/generated/plexspaces/mailbox/v1/__init__.py +246 -0
  44. plexspaces/generated/plexspaces/metrics/__init__.py +0 -0
  45. plexspaces/generated/plexspaces/metrics/v1/__init__.py +878 -0
  46. plexspaces/generated/plexspaces/node/__init__.py +0 -0
  47. plexspaces/generated/plexspaces/node/v1/__init__.py +2564 -0
  48. plexspaces/generated/plexspaces/object_registry/__init__.py +0 -0
  49. plexspaces/generated/plexspaces/object_registry/v1/__init__.py +759 -0
  50. plexspaces/generated/plexspaces/persistence/__init__.py +0 -0
  51. plexspaces/generated/plexspaces/persistence/prv/__init__.py +539 -0
  52. plexspaces/generated/plexspaces/pool/__init__.py +0 -0
  53. plexspaces/generated/plexspaces/pool/v1/__init__.py +791 -0
  54. plexspaces/generated/plexspaces/processgroups/__init__.py +0 -0
  55. plexspaces/generated/plexspaces/processgroups/v1/__init__.py +622 -0
  56. plexspaces/generated/plexspaces/scheduling/__init__.py +0 -0
  57. plexspaces/generated/plexspaces/scheduling/v1/__init__.py +364 -0
  58. plexspaces/generated/plexspaces/security/__init__.py +0 -0
  59. plexspaces/generated/plexspaces/security/v1/__init__.py +254 -0
  60. plexspaces/generated/plexspaces/services/__init__.py +0 -0
  61. plexspaces/generated/plexspaces/services/prv/__init__.py +112 -0
  62. plexspaces/generated/plexspaces/storage/__init__.py +0 -0
  63. plexspaces/generated/plexspaces/storage/v1/__init__.py +747 -0
  64. plexspaces/generated/plexspaces/supervision/__init__.py +0 -0
  65. plexspaces/generated/plexspaces/supervision/v1/__init__.py +536 -0
  66. plexspaces/generated/plexspaces/system/__init__.py +0 -0
  67. plexspaces/generated/plexspaces/system/v1/__init__.py +1602 -0
  68. plexspaces/generated/plexspaces/timer/__init__.py +0 -0
  69. plexspaces/generated/plexspaces/timer/v1/__init__.py +402 -0
  70. plexspaces/generated/plexspaces/tuplespace/__init__.py +0 -0
  71. plexspaces/generated/plexspaces/tuplespace/v1/__init__.py +869 -0
  72. plexspaces/generated/plexspaces/wasm/__init__.py +0 -0
  73. plexspaces/generated/plexspaces/wasm/v1/__init__.py +920 -0
  74. plexspaces/generated/plexspaces/workflow/__init__.py +0 -0
  75. plexspaces/generated/plexspaces/workflow/v1/__init__.py +870 -0
  76. plexspaces/host.py +2093 -0
  77. plexspaces/leader_worker.py +148 -0
  78. plexspaces/proto_wire.py +1357 -0
  79. plexspaces/runtime.py +284 -0
  80. plexspaces/workflow.py +105 -0
  81. plexspaces-0.1.1.dist-info/METADATA +505 -0
  82. plexspaces-0.1.1.dist-info/RECORD +87 -0
  83. plexspaces-0.1.1.dist-info/WHEEL +5 -0
  84. plexspaces-0.1.1.dist-info/entry_points.txt +2 -0
  85. plexspaces-0.1.1.dist-info/top_level.txt +2 -0
  86. plexspaces_cli/__init__.py +8 -0
  87. plexspaces_cli/build.py +374 -0
@@ -0,0 +1,1022 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # sources: protoc-gen-openapiv2/options/annotations.proto, protoc-gen-openapiv2/options/openapiv2.proto
3
+ # plugin: python-betterproto
4
+ # This file has been @generated
5
+
6
+ from dataclasses import dataclass
7
+ from typing import (
8
+ Dict,
9
+ List,
10
+ )
11
+
12
+ import betterproto
13
+ import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf
14
+
15
+
16
+ class Scheme(betterproto.Enum):
17
+ """
18
+ Scheme describes the schemes supported by the OpenAPI Swagger
19
+ and Operation objects.
20
+ """
21
+
22
+ UNKNOWN = 0
23
+ HTTP = 1
24
+ HTTPS = 2
25
+ WS = 3
26
+ WSS = 4
27
+
28
+
29
+ class HeaderParameterType(betterproto.Enum):
30
+ """
31
+ `Type` is a supported HTTP header type.
32
+ See https://swagger.io/specification/v2/#parameterType.
33
+ """
34
+
35
+ UNKNOWN = 0
36
+ STRING = 1
37
+ NUMBER = 2
38
+ INTEGER = 3
39
+ BOOLEAN = 4
40
+
41
+
42
+ class JsonSchemaJsonSchemaSimpleTypes(betterproto.Enum):
43
+ UNKNOWN = 0
44
+ ARRAY = 1
45
+ BOOLEAN = 2
46
+ INTEGER = 3
47
+ NULL = 4
48
+ NUMBER = 5
49
+ OBJECT = 6
50
+ STRING = 7
51
+
52
+
53
+ class SecuritySchemeType(betterproto.Enum):
54
+ """
55
+ The type of the security scheme. Valid values are "basic",
56
+ "apiKey" or "oauth2".
57
+ """
58
+
59
+ TYPE_INVALID = 0
60
+ TYPE_BASIC = 1
61
+ TYPE_API_KEY = 2
62
+ TYPE_OAUTH2 = 3
63
+
64
+
65
+ class SecuritySchemeIn(betterproto.Enum):
66
+ """The location of the API key. Valid values are "query" or "header"."""
67
+
68
+ IN_INVALID = 0
69
+ IN_QUERY = 1
70
+ IN_HEADER = 2
71
+
72
+
73
+ class SecuritySchemeFlow(betterproto.Enum):
74
+ """
75
+ The flow used by the OAuth2 security scheme. Valid values are
76
+ "implicit", "password", "application" or "accessCode".
77
+ """
78
+
79
+ FLOW_INVALID = 0
80
+ FLOW_IMPLICIT = 1
81
+ FLOW_PASSWORD = 2
82
+ FLOW_APPLICATION = 3
83
+ FLOW_ACCESS_CODE = 4
84
+
85
+
86
+ @dataclass(eq=False, repr=False)
87
+ class Swagger(betterproto.Message):
88
+ """
89
+ `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
90
+
91
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
92
+
93
+ Example:
94
+
95
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
96
+ info: {
97
+ title: "Echo API";
98
+ version: "1.0";
99
+ description: "";
100
+ contact: {
101
+ name: "gRPC-Gateway project";
102
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
103
+ email: "none@example.com";
104
+ };
105
+ license: {
106
+ name: "BSD 3-Clause License";
107
+ url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
108
+ };
109
+ };
110
+ schemes: HTTPS;
111
+ consumes: "application/json";
112
+ produces: "application/json";
113
+ };
114
+ """
115
+
116
+ swagger: str = betterproto.string_field(1)
117
+ """
118
+ Specifies the OpenAPI Specification version being used. It can be
119
+ used by the OpenAPI UI and other clients to interpret the API listing. The
120
+ value MUST be "2.0".
121
+ """
122
+
123
+ info: "Info" = betterproto.message_field(2)
124
+ """
125
+ Provides metadata about the API. The metadata can be used by the
126
+ clients if needed.
127
+ """
128
+
129
+ host: str = betterproto.string_field(3)
130
+ """
131
+ The host (name or ip) serving the API. This MUST be the host only and does
132
+ not include the scheme nor sub-paths. It MAY include a port. If the host is
133
+ not included, the host serving the documentation is to be used (including
134
+ the port). The host does not support path templating.
135
+ """
136
+
137
+ base_path: str = betterproto.string_field(4)
138
+ """
139
+ The base path on which the API is served, which is relative to the host. If
140
+ it is not included, the API is served directly under the host. The value
141
+ MUST start with a leading slash (/). The basePath does not support path
142
+ templating.
143
+ Note that using `base_path` does not change the endpoint paths that are
144
+ generated in the resulting OpenAPI file. If you wish to use `base_path`
145
+ with relatively generated OpenAPI paths, the `base_path` prefix must be
146
+ manually removed from your `google.api.http` paths and your code changed to
147
+ serve the API from the `base_path`.
148
+ """
149
+
150
+ schemes: List["Scheme"] = betterproto.enum_field(5)
151
+ """
152
+ The transfer protocol of the API. Values MUST be from the list: "http",
153
+ "https", "ws", "wss". If the schemes is not included, the default scheme to
154
+ be used is the one used to access the OpenAPI definition itself.
155
+ """
156
+
157
+ consumes: List[str] = betterproto.string_field(6)
158
+ """
159
+ A list of MIME types the APIs can consume. This is global to all APIs but
160
+ can be overridden on specific API calls. Value MUST be as described under
161
+ Mime Types.
162
+ """
163
+
164
+ produces: List[str] = betterproto.string_field(7)
165
+ """
166
+ A list of MIME types the APIs can produce. This is global to all APIs but
167
+ can be overridden on specific API calls. Value MUST be as described under
168
+ Mime Types.
169
+ """
170
+
171
+ responses: Dict[str, "Response"] = betterproto.map_field(
172
+ 10, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
173
+ )
174
+ """
175
+ An object to hold responses that can be used across operations. This
176
+ property does not define global responses for all operations.
177
+ """
178
+
179
+ security_definitions: "SecurityDefinitions" = betterproto.message_field(11)
180
+ """
181
+ Security scheme definitions that can be used across the specification.
182
+ """
183
+
184
+ security: List["SecurityRequirement"] = betterproto.message_field(12)
185
+ """
186
+ A declaration of which security schemes are applied for the API as a whole.
187
+ The list of values describes alternative security schemes that can be used
188
+ (that is, there is a logical OR between the security requirements).
189
+ Individual operations can override this definition.
190
+ """
191
+
192
+ tags: List["Tag"] = betterproto.message_field(13)
193
+ """
194
+ A list of tags for API documentation control. Tags can be used for logical
195
+ grouping of operations by resources or any other qualifier.
196
+ """
197
+
198
+ external_docs: "ExternalDocumentation" = betterproto.message_field(14)
199
+ """Additional external documentation."""
200
+
201
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
202
+ betterproto.map_field(15, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
203
+ )
204
+ """
205
+ Custom properties that start with "x-" such as "x-foo" used to describe
206
+ extra functionality that is not covered by the standard OpenAPI Specification.
207
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
208
+ """
209
+
210
+
211
+ @dataclass(eq=False, repr=False)
212
+ class Operation(betterproto.Message):
213
+ """
214
+ `Operation` is a representation of OpenAPI v2 specification's Operation object.
215
+
216
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
217
+
218
+ Example:
219
+
220
+ service EchoService {
221
+ rpc Echo(SimpleMessage) returns (SimpleMessage) {
222
+ option (google.api.http) = {
223
+ get: "/v1/example/echo/{id}"
224
+ };
225
+
226
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
227
+ summary: "Get a message.";
228
+ operation_id: "getMessage";
229
+ tags: "echo";
230
+ responses: {
231
+ key: "200"
232
+ value: {
233
+ description: "OK";
234
+ }
235
+ }
236
+ };
237
+ }
238
+ }
239
+ """
240
+
241
+ tags: List[str] = betterproto.string_field(1)
242
+ """
243
+ A list of tags for API documentation control. Tags can be used for logical
244
+ grouping of operations by resources or any other qualifier.
245
+ """
246
+
247
+ summary: str = betterproto.string_field(2)
248
+ """
249
+ A short summary of what the operation does. For maximum readability in the
250
+ swagger-ui, this field SHOULD be less than 120 characters.
251
+ """
252
+
253
+ description: str = betterproto.string_field(3)
254
+ """
255
+ A verbose explanation of the operation behavior. GFM syntax can be used for
256
+ rich text representation.
257
+ """
258
+
259
+ external_docs: "ExternalDocumentation" = betterproto.message_field(4)
260
+ """Additional external documentation for this operation."""
261
+
262
+ operation_id: str = betterproto.string_field(5)
263
+ """
264
+ Unique string used to identify the operation. The id MUST be unique among
265
+ all operations described in the API. Tools and libraries MAY use the
266
+ operationId to uniquely identify an operation, therefore, it is recommended
267
+ to follow common programming naming conventions.
268
+ """
269
+
270
+ consumes: List[str] = betterproto.string_field(6)
271
+ """
272
+ A list of MIME types the operation can consume. This overrides the consumes
273
+ definition at the OpenAPI Object. An empty value MAY be used to clear the
274
+ global definition. Value MUST be as described under Mime Types.
275
+ """
276
+
277
+ produces: List[str] = betterproto.string_field(7)
278
+ """
279
+ A list of MIME types the operation can produce. This overrides the produces
280
+ definition at the OpenAPI Object. An empty value MAY be used to clear the
281
+ global definition. Value MUST be as described under Mime Types.
282
+ """
283
+
284
+ responses: Dict[str, "Response"] = betterproto.map_field(
285
+ 9, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
286
+ )
287
+ """
288
+ The list of possible responses as they are returned from executing this
289
+ operation.
290
+ """
291
+
292
+ schemes: List["Scheme"] = betterproto.enum_field(10)
293
+ """
294
+ The transfer protocol for the operation. Values MUST be from the list:
295
+ "http", "https", "ws", "wss". The value overrides the OpenAPI Object
296
+ schemes definition.
297
+ """
298
+
299
+ deprecated: bool = betterproto.bool_field(11)
300
+ """
301
+ Declares this operation to be deprecated. Usage of the declared operation
302
+ should be refrained. Default value is false.
303
+ """
304
+
305
+ security: List["SecurityRequirement"] = betterproto.message_field(12)
306
+ """
307
+ A declaration of which security schemes are applied for this operation. The
308
+ list of values describes alternative security schemes that can be used
309
+ (that is, there is a logical OR between the security requirements). This
310
+ definition overrides any declared top-level security. To remove a top-level
311
+ security declaration, an empty array can be used.
312
+ """
313
+
314
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
315
+ betterproto.map_field(13, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
316
+ )
317
+ """
318
+ Custom properties that start with "x-" such as "x-foo" used to describe
319
+ extra functionality that is not covered by the standard OpenAPI Specification.
320
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
321
+ """
322
+
323
+ parameters: "Parameters" = betterproto.message_field(14)
324
+ """
325
+ Custom parameters such as HTTP request headers.
326
+ See: https://swagger.io/docs/specification/2-0/describing-parameters/
327
+ and https://swagger.io/specification/v2/#parameter-object.
328
+ """
329
+
330
+
331
+ @dataclass(eq=False, repr=False)
332
+ class Parameters(betterproto.Message):
333
+ """
334
+ `Parameters` is a representation of OpenAPI v2 specification's parameters object.
335
+ Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
336
+ allow header parameters to be set here since we do not want users specifying custom non-header
337
+ parameters beyond those inferred from the Protobuf schema.
338
+ See: https://swagger.io/specification/v2/#parameter-object
339
+ """
340
+
341
+ headers: List["HeaderParameter"] = betterproto.message_field(1)
342
+ """
343
+ `Headers` is one or more HTTP header parameter.
344
+ See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
345
+ """
346
+
347
+
348
+ @dataclass(eq=False, repr=False)
349
+ class HeaderParameter(betterproto.Message):
350
+ """
351
+ `HeaderParameter` a HTTP header parameter.
352
+ See: https://swagger.io/specification/v2/#parameter-object
353
+ """
354
+
355
+ name: str = betterproto.string_field(1)
356
+ """`Name` is the header name."""
357
+
358
+ description: str = betterproto.string_field(2)
359
+ """`Description` is a short description of the header."""
360
+
361
+ type: "HeaderParameterType" = betterproto.enum_field(3)
362
+ """
363
+ `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
364
+ See: https://swagger.io/specification/v2/#parameterType.
365
+ """
366
+
367
+ format: str = betterproto.string_field(4)
368
+ """`Format` The extending format for the previously mentioned type."""
369
+
370
+ required: bool = betterproto.bool_field(5)
371
+ """`Required` indicates if the header is optional"""
372
+
373
+
374
+ @dataclass(eq=False, repr=False)
375
+ class Header(betterproto.Message):
376
+ """
377
+ `Header` is a representation of OpenAPI v2 specification's Header object.
378
+
379
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
380
+ """
381
+
382
+ description: str = betterproto.string_field(1)
383
+ """`Description` is a short description of the header."""
384
+
385
+ type: str = betterproto.string_field(2)
386
+ """
387
+ The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
388
+ """
389
+
390
+ format: str = betterproto.string_field(3)
391
+ """`Format` The extending format for the previously mentioned type."""
392
+
393
+ default: str = betterproto.string_field(6)
394
+ """
395
+ `Default` Declares the value of the header that the server will use if none is provided.
396
+ See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
397
+ Unlike JSON Schema this value MUST conform to the defined type for the header.
398
+ """
399
+
400
+ pattern: str = betterproto.string_field(13)
401
+ """
402
+ 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
403
+ """
404
+
405
+
406
+ @dataclass(eq=False, repr=False)
407
+ class Response(betterproto.Message):
408
+ """
409
+ `Response` is a representation of OpenAPI v2 specification's Response object.
410
+
411
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
412
+ """
413
+
414
+ description: str = betterproto.string_field(1)
415
+ """
416
+ `Description` is a short description of the response.
417
+ GFM syntax can be used for rich text representation.
418
+ """
419
+
420
+ schema: "Schema" = betterproto.message_field(2)
421
+ """
422
+ `Schema` optionally defines the structure of the response.
423
+ If `Schema` is not provided, it means there is no content to the response.
424
+ """
425
+
426
+ headers: Dict[str, "Header"] = betterproto.map_field(
427
+ 3, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
428
+ )
429
+ """
430
+ `Headers` A list of headers that are sent with the response.
431
+ `Header` name is expected to be a string in the canonical format of the MIME header key
432
+ See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
433
+ """
434
+
435
+ examples: Dict[str, str] = betterproto.map_field(
436
+ 4, betterproto.TYPE_STRING, betterproto.TYPE_STRING
437
+ )
438
+ """
439
+ `Examples` gives per-mimetype response examples.
440
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
441
+ """
442
+
443
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
444
+ betterproto.map_field(5, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
445
+ )
446
+ """
447
+ Custom properties that start with "x-" such as "x-foo" used to describe
448
+ extra functionality that is not covered by the standard OpenAPI Specification.
449
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
450
+ """
451
+
452
+
453
+ @dataclass(eq=False, repr=False)
454
+ class Info(betterproto.Message):
455
+ """
456
+ `Info` is a representation of OpenAPI v2 specification's Info object.
457
+
458
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
459
+
460
+ Example:
461
+
462
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
463
+ info: {
464
+ title: "Echo API";
465
+ version: "1.0";
466
+ description: "";
467
+ contact: {
468
+ name: "gRPC-Gateway project";
469
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
470
+ email: "none@example.com";
471
+ };
472
+ license: {
473
+ name: "BSD 3-Clause License";
474
+ url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
475
+ };
476
+ };
477
+ ...
478
+ };
479
+ """
480
+
481
+ title: str = betterproto.string_field(1)
482
+ """The title of the application."""
483
+
484
+ description: str = betterproto.string_field(2)
485
+ """
486
+ A short description of the application. GFM syntax can be used for rich
487
+ text representation.
488
+ """
489
+
490
+ terms_of_service: str = betterproto.string_field(3)
491
+ """The Terms of Service for the API."""
492
+
493
+ contact: "Contact" = betterproto.message_field(4)
494
+ """The contact information for the exposed API."""
495
+
496
+ license: "License" = betterproto.message_field(5)
497
+ """The license information for the exposed API."""
498
+
499
+ version: str = betterproto.string_field(6)
500
+ """
501
+ Provides the version of the application API (not to be confused
502
+ with the specification version).
503
+ """
504
+
505
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
506
+ betterproto.map_field(7, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
507
+ )
508
+ """
509
+ Custom properties that start with "x-" such as "x-foo" used to describe
510
+ extra functionality that is not covered by the standard OpenAPI Specification.
511
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
512
+ """
513
+
514
+
515
+ @dataclass(eq=False, repr=False)
516
+ class Contact(betterproto.Message):
517
+ """
518
+ `Contact` is a representation of OpenAPI v2 specification's Contact object.
519
+
520
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
521
+
522
+ Example:
523
+
524
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
525
+ info: {
526
+ ...
527
+ contact: {
528
+ name: "gRPC-Gateway project";
529
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
530
+ email: "none@example.com";
531
+ };
532
+ ...
533
+ };
534
+ ...
535
+ };
536
+ """
537
+
538
+ name: str = betterproto.string_field(1)
539
+ """The identifying name of the contact person/organization."""
540
+
541
+ url: str = betterproto.string_field(2)
542
+ """
543
+ The URL pointing to the contact information. MUST be in the format of a
544
+ URL.
545
+ """
546
+
547
+ email: str = betterproto.string_field(3)
548
+ """
549
+ The email address of the contact person/organization. MUST be in the format
550
+ of an email address.
551
+ """
552
+
553
+
554
+ @dataclass(eq=False, repr=False)
555
+ class License(betterproto.Message):
556
+ """
557
+ `License` is a representation of OpenAPI v2 specification's License object.
558
+
559
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
560
+
561
+ Example:
562
+
563
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
564
+ info: {
565
+ ...
566
+ license: {
567
+ name: "BSD 3-Clause License";
568
+ url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
569
+ };
570
+ ...
571
+ };
572
+ ...
573
+ };
574
+ """
575
+
576
+ name: str = betterproto.string_field(1)
577
+ """The license name used for the API."""
578
+
579
+ url: str = betterproto.string_field(2)
580
+ """
581
+ A URL to the license used for the API. MUST be in the format of a URL.
582
+ """
583
+
584
+
585
+ @dataclass(eq=False, repr=False)
586
+ class ExternalDocumentation(betterproto.Message):
587
+ """
588
+ `ExternalDocumentation` is a representation of OpenAPI v2 specification's
589
+ ExternalDocumentation object.
590
+
591
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
592
+
593
+ Example:
594
+
595
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
596
+ ...
597
+ external_docs: {
598
+ description: "More about gRPC-Gateway";
599
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
600
+ }
601
+ ...
602
+ };
603
+ """
604
+
605
+ description: str = betterproto.string_field(1)
606
+ """
607
+ A short description of the target documentation. GFM syntax can be used for
608
+ rich text representation.
609
+ """
610
+
611
+ url: str = betterproto.string_field(2)
612
+ """
613
+ The URL for the target documentation. Value MUST be in the format
614
+ of a URL.
615
+ """
616
+
617
+
618
+ @dataclass(eq=False, repr=False)
619
+ class Schema(betterproto.Message):
620
+ """
621
+ `Schema` is a representation of OpenAPI v2 specification's Schema object.
622
+
623
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
624
+ """
625
+
626
+ json_schema: "JsonSchema" = betterproto.message_field(1)
627
+ discriminator: str = betterproto.string_field(2)
628
+ """
629
+ Adds support for polymorphism. The discriminator is the schema property
630
+ name that is used to differentiate between other schema that inherit this
631
+ schema. The property name used MUST be defined at this schema and it MUST
632
+ be in the required property list. When used, the value MUST be the name of
633
+ this schema or any schema that inherits it.
634
+ """
635
+
636
+ read_only: bool = betterproto.bool_field(3)
637
+ """
638
+ Relevant only for Schema "properties" definitions. Declares the property as
639
+ "read only". This means that it MAY be sent as part of a response but MUST
640
+ NOT be sent as part of the request. Properties marked as readOnly being
641
+ true SHOULD NOT be in the required list of the defined schema. Default
642
+ value is false.
643
+ """
644
+
645
+ external_docs: "ExternalDocumentation" = betterproto.message_field(5)
646
+ """Additional external documentation for this schema."""
647
+
648
+ example: str = betterproto.string_field(6)
649
+ """
650
+ A free-form property to include an example of an instance for this schema in JSON.
651
+ This is copied verbatim to the output.
652
+ """
653
+
654
+
655
+ @dataclass(eq=False, repr=False)
656
+ class EnumSchema(betterproto.Message):
657
+ """
658
+ `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object.
659
+ Only fields that are applicable to Enums are included
660
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
661
+
662
+ Example:
663
+
664
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = {
665
+ ...
666
+ title: "MyEnum";
667
+ description:"This is my nice enum";
668
+ example: "ZERO";
669
+ required: true;
670
+ ...
671
+ };
672
+ """
673
+
674
+ description: str = betterproto.string_field(1)
675
+ """A short description of the schema."""
676
+
677
+ default: str = betterproto.string_field(2)
678
+ title: str = betterproto.string_field(3)
679
+ """The title of the schema."""
680
+
681
+ required: bool = betterproto.bool_field(4)
682
+ read_only: bool = betterproto.bool_field(5)
683
+ external_docs: "ExternalDocumentation" = betterproto.message_field(6)
684
+ """Additional external documentation for this schema."""
685
+
686
+ example: str = betterproto.string_field(7)
687
+ ref: str = betterproto.string_field(8)
688
+ """
689
+ Ref is used to define an external reference to include in the message.
690
+ This could be a fully qualified proto message reference, and that type must
691
+ be imported into the protofile. If no message is identified, the Ref will
692
+ be used verbatim in the output.
693
+ For example:
694
+ `ref: ".google.protobuf.Timestamp"`.
695
+ """
696
+
697
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
698
+ betterproto.map_field(9, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
699
+ )
700
+ """
701
+ Custom properties that start with "x-" such as "x-foo" used to describe
702
+ extra functionality that is not covered by the standard OpenAPI Specification.
703
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
704
+ """
705
+
706
+
707
+ @dataclass(eq=False, repr=False)
708
+ class JsonSchema(betterproto.Message):
709
+ """
710
+ `JSONSchema` represents properties from JSON Schema taken, and as used, in
711
+ the OpenAPI v2 spec.
712
+
713
+ This includes changes made by OpenAPI v2.
714
+
715
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
716
+
717
+ See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
718
+ https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
719
+
720
+ Example:
721
+
722
+ message SimpleMessage {
723
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
724
+ json_schema: {
725
+ title: "SimpleMessage"
726
+ description: "A simple message."
727
+ required: ["id"]
728
+ }
729
+ };
730
+
731
+ // Id represents the message identifier.
732
+ string id = 1; [
733
+ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
734
+ description: "The unique identifier of the simple message."
735
+ }];
736
+ }
737
+ """
738
+
739
+ ref: str = betterproto.string_field(3)
740
+ """
741
+ Ref is used to define an external reference to include in the message.
742
+ This could be a fully qualified proto message reference, and that type must
743
+ be imported into the protofile. If no message is identified, the Ref will
744
+ be used verbatim in the output.
745
+ For example:
746
+ `ref: ".google.protobuf.Timestamp"`.
747
+ """
748
+
749
+ title: str = betterproto.string_field(5)
750
+ """The title of the schema."""
751
+
752
+ description: str = betterproto.string_field(6)
753
+ """A short description of the schema."""
754
+
755
+ default: str = betterproto.string_field(7)
756
+ read_only: bool = betterproto.bool_field(8)
757
+ example: str = betterproto.string_field(9)
758
+ """
759
+ A free-form property to include a JSON example of this field. This is copied
760
+ verbatim to the output swagger.json. Quotes must be escaped.
761
+ This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
762
+ """
763
+
764
+ multiple_of: float = betterproto.double_field(10)
765
+ maximum: float = betterproto.double_field(11)
766
+ """
767
+ Maximum represents an inclusive upper limit for a numeric instance. The
768
+ value of MUST be a number,
769
+ """
770
+
771
+ exclusive_maximum: bool = betterproto.bool_field(12)
772
+ minimum: float = betterproto.double_field(13)
773
+ """
774
+ minimum represents an inclusive lower limit for a numeric instance. The
775
+ value of MUST be a number,
776
+ """
777
+
778
+ exclusive_minimum: bool = betterproto.bool_field(14)
779
+ max_length: int = betterproto.uint64_field(15)
780
+ min_length: int = betterproto.uint64_field(16)
781
+ pattern: str = betterproto.string_field(17)
782
+ max_items: int = betterproto.uint64_field(20)
783
+ min_items: int = betterproto.uint64_field(21)
784
+ unique_items: bool = betterproto.bool_field(22)
785
+ max_properties: int = betterproto.uint64_field(24)
786
+ min_properties: int = betterproto.uint64_field(25)
787
+ required: List[str] = betterproto.string_field(26)
788
+ array: List[str] = betterproto.string_field(34)
789
+ """Items in 'array' must be unique."""
790
+
791
+ type: List["JsonSchemaJsonSchemaSimpleTypes"] = betterproto.enum_field(35)
792
+ format: str = betterproto.string_field(36)
793
+ """`Format`"""
794
+
795
+ enum: List[str] = betterproto.string_field(46)
796
+ """
797
+ Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
798
+ """
799
+
800
+ field_configuration: "JsonSchemaFieldConfiguration" = betterproto.message_field(
801
+ 1001
802
+ )
803
+ """
804
+ Additional field level properties used when generating the OpenAPI v2 file.
805
+ """
806
+
807
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
808
+ betterproto.map_field(48, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
809
+ )
810
+ """
811
+ Custom properties that start with "x-" such as "x-foo" used to describe
812
+ extra functionality that is not covered by the standard OpenAPI Specification.
813
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
814
+ """
815
+
816
+
817
+ @dataclass(eq=False, repr=False)
818
+ class JsonSchemaFieldConfiguration(betterproto.Message):
819
+ """
820
+ 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
821
+ These properties are not defined by OpenAPIv2, but they are used to control the generation.
822
+ """
823
+
824
+ path_param_name: str = betterproto.string_field(47)
825
+ """
826
+ Alternative parameter name when used as path parameter. If set, this will
827
+ be used as the complete parameter name when this field is used as a path
828
+ parameter. Use this to avoid having auto generated path parameter names
829
+ for overlapping paths.
830
+ """
831
+
832
+ deprecated: bool = betterproto.bool_field(49)
833
+ """
834
+ Declares this field to be deprecated. Allows for the generated OpenAPI
835
+ parameter to be marked as deprecated without affecting the proto field.
836
+ """
837
+
838
+
839
+ @dataclass(eq=False, repr=False)
840
+ class Tag(betterproto.Message):
841
+ """
842
+ `Tag` is a representation of OpenAPI v2 specification's Tag object.
843
+
844
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
845
+ """
846
+
847
+ name: str = betterproto.string_field(1)
848
+ """
849
+ The name of the tag. Use it to allow override of the name of a
850
+ global Tag object, then use that name to reference the tag throughout the
851
+ OpenAPI file.
852
+ """
853
+
854
+ description: str = betterproto.string_field(2)
855
+ """
856
+ A short description for the tag. GFM syntax can be used for rich text
857
+ representation.
858
+ """
859
+
860
+ external_docs: "ExternalDocumentation" = betterproto.message_field(3)
861
+ """Additional external documentation for this tag."""
862
+
863
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
864
+ betterproto.map_field(4, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
865
+ )
866
+ """
867
+ Custom properties that start with "x-" such as "x-foo" used to describe
868
+ extra functionality that is not covered by the standard OpenAPI Specification.
869
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
870
+ """
871
+
872
+
873
+ @dataclass(eq=False, repr=False)
874
+ class SecurityDefinitions(betterproto.Message):
875
+ """
876
+ `SecurityDefinitions` is a representation of OpenAPI v2 specification's
877
+ Security Definitions object.
878
+
879
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
880
+
881
+ A declaration of the security schemes available to be used in the
882
+ specification. This does not enforce the security schemes on the operations
883
+ and only serves to provide the relevant details for each scheme.
884
+ """
885
+
886
+ security: Dict[str, "SecurityScheme"] = betterproto.map_field(
887
+ 1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
888
+ )
889
+ """
890
+ A single security scheme definition, mapping a "name" to the scheme it
891
+ defines.
892
+ """
893
+
894
+
895
+ @dataclass(eq=False, repr=False)
896
+ class SecurityScheme(betterproto.Message):
897
+ """
898
+ `SecurityScheme` is a representation of OpenAPI v2 specification's
899
+ Security Scheme object.
900
+
901
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
902
+
903
+ Allows the definition of a security scheme that can be used by the
904
+ operations. Supported schemes are basic authentication, an API key (either as
905
+ a header or as a query parameter) and OAuth2's common flows (implicit,
906
+ password, application and access code).
907
+ """
908
+
909
+ type: "SecuritySchemeType" = betterproto.enum_field(1)
910
+ """
911
+ The type of the security scheme. Valid values are "basic",
912
+ "apiKey" or "oauth2".
913
+ """
914
+
915
+ description: str = betterproto.string_field(2)
916
+ """A short description for security scheme."""
917
+
918
+ name: str = betterproto.string_field(3)
919
+ """
920
+ The name of the header or query parameter to be used.
921
+ Valid for apiKey.
922
+ """
923
+
924
+ in_: "SecuritySchemeIn" = betterproto.enum_field(4)
925
+ """
926
+ The location of the API key. Valid values are "query" or
927
+ "header".
928
+ Valid for apiKey.
929
+ """
930
+
931
+ flow: "SecuritySchemeFlow" = betterproto.enum_field(5)
932
+ """
933
+ The flow used by the OAuth2 security scheme. Valid values are
934
+ "implicit", "password", "application" or "accessCode".
935
+ Valid for oauth2.
936
+ """
937
+
938
+ authorization_url: str = betterproto.string_field(6)
939
+ """
940
+ The authorization URL to be used for this flow. This SHOULD be in
941
+ the form of a URL.
942
+ Valid for oauth2/implicit and oauth2/accessCode.
943
+ """
944
+
945
+ token_url: str = betterproto.string_field(7)
946
+ """
947
+ The token URL to be used for this flow. This SHOULD be in the
948
+ form of a URL.
949
+ Valid for oauth2/password, oauth2/application and oauth2/accessCode.
950
+ """
951
+
952
+ scopes: "Scopes" = betterproto.message_field(8)
953
+ """
954
+ The available scopes for the OAuth2 security scheme.
955
+ Valid for oauth2.
956
+ """
957
+
958
+ extensions: Dict[str, "betterproto_lib_google_protobuf.Value"] = (
959
+ betterproto.map_field(9, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
960
+ )
961
+ """
962
+ Custom properties that start with "x-" such as "x-foo" used to describe
963
+ extra functionality that is not covered by the standard OpenAPI Specification.
964
+ See: https://swagger.io/docs/specification/2-0/swagger-extensions/
965
+ """
966
+
967
+
968
+ @dataclass(eq=False, repr=False)
969
+ class SecurityRequirement(betterproto.Message):
970
+ """
971
+ `SecurityRequirement` is a representation of OpenAPI v2 specification's
972
+ Security Requirement object.
973
+
974
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
975
+
976
+ Lists the required security schemes to execute this operation. The object can
977
+ have multiple security schemes declared in it which are all required (that
978
+ is, there is a logical AND between the schemes).
979
+
980
+ The name used for each property MUST correspond to a security scheme
981
+ declared in the Security Definitions.
982
+ """
983
+
984
+ security_requirement: Dict[str, "SecurityRequirementSecurityRequirementValue"] = (
985
+ betterproto.map_field(1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE)
986
+ )
987
+ """
988
+ Each name must correspond to a security scheme which is declared in
989
+ the Security Definitions. If the security scheme is of type "oauth2",
990
+ then the value is a list of scope names required for the execution.
991
+ For other security scheme types, the array MUST be empty.
992
+ """
993
+
994
+
995
+ @dataclass(eq=False, repr=False)
996
+ class SecurityRequirementSecurityRequirementValue(betterproto.Message):
997
+ """
998
+ If the security scheme is of type "oauth2", then the value is a list of
999
+ scope names required for the execution. For other security scheme types,
1000
+ the array MUST be empty.
1001
+ """
1002
+
1003
+ scope: List[str] = betterproto.string_field(1)
1004
+
1005
+
1006
+ @dataclass(eq=False, repr=False)
1007
+ class Scopes(betterproto.Message):
1008
+ """
1009
+ `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
1010
+
1011
+ See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
1012
+
1013
+ Lists the available scopes for an OAuth2 security scheme.
1014
+ """
1015
+
1016
+ scope: Dict[str, str] = betterproto.map_field(
1017
+ 1, betterproto.TYPE_STRING, betterproto.TYPE_STRING
1018
+ )
1019
+ """
1020
+ Maps between a name of a scope to a short description of it (as the value
1021
+ of the property).
1022
+ """