crossplane-function-sdk-python 0.2.0__py3-none-any.whl → 0.4.0__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.
@@ -15,4 +15,4 @@
15
15
  """The version of function-sdk-python."""
16
16
 
17
17
  # This is set at build time, using "hatch version"
18
- __version__ = "0.2.0"
18
+ __version__ = "0.4.0"
@@ -0,0 +1,326 @@
1
+ /*
2
+ Copyright 2022 The Crossplane Authors.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ syntax = "proto3";
18
+
19
+ import "google/protobuf/struct.proto";
20
+ import "google/protobuf/duration.proto";
21
+
22
+ package apiextensions.fn.proto.v1;
23
+
24
+ option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1";
25
+
26
+ // A FunctionRunnerService is a Composition Function.
27
+ service FunctionRunnerService {
28
+ // RunFunction runs the Composition Function.
29
+ rpc RunFunction(RunFunctionRequest) returns (RunFunctionResponse) {}
30
+ }
31
+
32
+ // A RunFunctionRequest requests that the Composition Function be run.
33
+ message RunFunctionRequest {
34
+ // Metadata pertaining to this request.
35
+ RequestMeta meta = 1;
36
+
37
+ // The observed state prior to invocation of a Function pipeline. State passed
38
+ // to each Function is fresh as of the time the pipeline was invoked, not as
39
+ // of the time each Function was invoked.
40
+ State observed = 2;
41
+
42
+ // Desired state according to a Function pipeline. The state passed to a
43
+ // particular Function may have been accumulated by previous Functions in the
44
+ // pipeline.
45
+ //
46
+ // Note that the desired state must be a partial object with only the fields
47
+ // that this function (and its predecessors in the pipeline) wants to have
48
+ // set in the object. Copying a non-partial observed state to desired is most
49
+ // likely not what you want to do. Leaving out fields that had been returned
50
+ // as desired before will result in them being deleted from the objects in the
51
+ // cluster.
52
+ State desired = 3;
53
+
54
+ // Optional input specific to this Function invocation. A JSON representation
55
+ // of the 'input' block of the relevant entry in a Composition's pipeline.
56
+ optional google.protobuf.Struct input = 4;
57
+
58
+ // Optional context. Crossplane may pass arbitary contextual information to a
59
+ // Function. A Function may also return context in its RunFunctionResponse,
60
+ // and that context will be passed to subsequent Functions. Crossplane
61
+ // discards all context returned by the last Function in the pipeline.
62
+ optional google.protobuf.Struct context = 5;
63
+
64
+ // Optional extra resources that the Function required.
65
+ // Note that extra resources is a map to Resources, plural.
66
+ // The map key corresponds to the key in a RunFunctionResponse's
67
+ // extra_resources field. If a Function requested extra resources that
68
+ // did not exist, Crossplane sets the map key to an empty Resources message to
69
+ // indicate that it attempted to satisfy the request.
70
+ map<string, Resources> extra_resources = 6;
71
+
72
+ // Optional credentials that this Function may use to communicate with an
73
+ // external system.
74
+ map <string, Credentials> credentials = 7;
75
+ }
76
+
77
+ // Credentials that a Function may use to communicate with an external system.
78
+ message Credentials {
79
+ // Source of the credentials.
80
+ oneof source {
81
+ // Credential data loaded by Crossplane, for example from a Secret.
82
+ CredentialData credential_data = 1;
83
+ }
84
+ }
85
+
86
+ // CredentialData loaded by Crossplane, for example from a Secret.
87
+ message CredentialData {
88
+ map<string, bytes> data = 1;
89
+ }
90
+
91
+ // Resources represents the state of several Crossplane resources.
92
+ message Resources {
93
+ repeated Resource items = 1;
94
+ }
95
+
96
+ // A RunFunctionResponse contains the result of a Composition Function run.
97
+ message RunFunctionResponse {
98
+ // Metadata pertaining to this response.
99
+ ResponseMeta meta = 1;
100
+
101
+ // Desired state according to a Function pipeline. Functions may add desired
102
+ // state, and may mutate or delete any part of the desired state they are
103
+ // concerned with. A Function must pass through any part of the desired state
104
+ // that it is not concerned with.
105
+ //
106
+ //
107
+ // Note that the desired state must be a partial object with only the fields
108
+ // that this function (and its predecessors in the pipeline) wants to have
109
+ // set in the object. Copying a non-partial observed state to desired is most
110
+ // likely not what you want to do. Leaving out fields that had been returned
111
+ // as desired before will result in them being deleted from the objects in the
112
+ // cluster.
113
+ State desired = 2;
114
+
115
+ // Results of the Function run. Results are used for observability purposes.
116
+ repeated Result results = 3;
117
+
118
+ // Optional context to be passed to the next Function in the pipeline as part
119
+ // of the RunFunctionRequest. Dropped on the last function in the pipeline.
120
+ optional google.protobuf.Struct context = 4;
121
+
122
+ // Requirements that must be satisfied for this Function to run successfully.
123
+ Requirements requirements = 5;
124
+
125
+ // Status conditions to be applied to the composite resource. Conditions may also
126
+ // optionally be applied to the composite resource's associated claim.
127
+ repeated Condition conditions = 6;
128
+ }
129
+
130
+ // RequestMeta contains metadata pertaining to a RunFunctionRequest.
131
+ message RequestMeta {
132
+ // An opaque string identifying the content of the request. Two identical
133
+ // requests should have the same tag.
134
+ string tag = 1;
135
+ }
136
+
137
+ // Requirements that must be satisfied for a Function to run successfully.
138
+ message Requirements {
139
+ // Extra resources that this Function requires.
140
+ // The map key uniquely identifies the group of resources.
141
+ map<string, ResourceSelector> extra_resources = 1;
142
+ }
143
+
144
+ // ResourceSelector selects a group of resources, either by name or by label.
145
+ message ResourceSelector {
146
+ // API version of resources to select.
147
+ string api_version = 1;
148
+
149
+ // Kind of resources to select.
150
+ string kind = 2;
151
+
152
+ // Resources to match.
153
+ oneof match {
154
+ // Match the resource with this name.
155
+ string match_name = 3;
156
+
157
+ // Match all resources with these labels.
158
+ MatchLabels match_labels = 4;
159
+ }
160
+ }
161
+
162
+ // MatchLabels defines a set of labels to match resources against.
163
+ message MatchLabels {
164
+ map<string, string> labels = 1;
165
+ }
166
+
167
+ // ResponseMeta contains metadata pertaining to a RunFunctionResponse.
168
+ message ResponseMeta {
169
+ // An opaque string identifying the content of the request. Must match the
170
+ // meta.tag of the corresponding RunFunctionRequest.
171
+ string tag = 1;
172
+
173
+ // Time-to-live of this response. Deterministic Functions with no side-effects
174
+ // (e.g. simple templating Functions) may specify a TTL. Crossplane may choose
175
+ // to cache responses until the TTL expires.
176
+ optional google.protobuf.Duration ttl = 2;
177
+ }
178
+
179
+ // State of the composite resource (XR) and any composed resources.
180
+ message State {
181
+ // The state of the composite resource (XR).
182
+ Resource composite = 1;
183
+
184
+ // The state of any composed resources.
185
+ map<string, Resource> resources = 2;
186
+ }
187
+
188
+ // A Resource represents the state of a composite or composed resource.
189
+ message Resource {
190
+ // The JSON representation of the resource.
191
+ //
192
+ // * Crossplane will set this field in a RunFunctionRequest to the entire
193
+ // observed state of a resource - including its metadata, spec, and status.
194
+ //
195
+ // * A Function should set this field in a RunFunctionRequest to communicate
196
+ // the desired state of a composite or composed resource.
197
+ //
198
+ // * A Function may only specify the desired status of a composite resource -
199
+ // not its metadata or spec. A Function should not return desired metadata
200
+ // or spec for a composite resource. This will be ignored.
201
+ //
202
+ // * A Function may not specify the desired status of a composed resource -
203
+ // only its metadata and spec. A Function should not return desired status
204
+ // for a composed resource. This will be ignored.
205
+ google.protobuf.Struct resource = 1;
206
+
207
+ // The resource's connection details.
208
+ //
209
+ // * Crossplane will set this field in a RunFunctionRequest to communicate the
210
+ // the observed connection details of a composite or composed resource.
211
+ //
212
+ // * A Function should set this field in a RunFunctionResponse to indicate the
213
+ // desired connection details of the composite resource.
214
+ //
215
+ // * A Function should not set this field in a RunFunctionResponse to indicate
216
+ // the desired connection details of a composed resource. This will be
217
+ // ignored.
218
+ map<string, bytes> connection_details = 2;
219
+
220
+ // Ready indicates whether the resource should be considered ready.
221
+ //
222
+ // * Crossplane will never set this field in a RunFunctionRequest.
223
+ //
224
+ // * A Function should set this field to READY_TRUE in a RunFunctionResponse
225
+ // to indicate that a desired composed resource is ready.
226
+ //
227
+ // * A Function should not set this field in a RunFunctionResponse to indicate
228
+ // that the desired composite resource is ready. This will be ignored.
229
+ Ready ready = 3;
230
+ }
231
+
232
+ // Ready indicates whether a composed resource should be considered ready.
233
+ enum Ready {
234
+ READY_UNSPECIFIED = 0;
235
+
236
+ // True means the composed resource has been observed to be ready.
237
+ READY_TRUE = 1;
238
+
239
+ // False means the composed resource has not been observed to be ready.
240
+ READY_FALSE = 2;
241
+ }
242
+
243
+ // A Result of running a Function.
244
+ message Result {
245
+ // Severity of this result.
246
+ Severity severity = 1;
247
+
248
+ // Human-readable details about the result.
249
+ string message = 2;
250
+
251
+ // Optional PascalCase, machine-readable reason for this result. If omitted,
252
+ // the value will be ComposeResources.
253
+ optional string reason = 3;
254
+
255
+ // The resources this result targets.
256
+ optional Target target = 4;
257
+ }
258
+
259
+ // Severity of Function results.
260
+ enum Severity {
261
+ SEVERITY_UNSPECIFIED = 0;
262
+
263
+ // Fatal results are fatal; subsequent Composition Functions may run, but
264
+ // the Composition Function pipeline run will be considered a failure and
265
+ // the first fatal result will be returned as an error.
266
+ SEVERITY_FATAL = 1;
267
+
268
+ // Warning results are non-fatal; the entire Composition will run to
269
+ // completion but warning events and debug logs associated with the
270
+ // composite resource will be emitted.
271
+ SEVERITY_WARNING = 2;
272
+
273
+ // Normal results are emitted as normal events and debug logs associated
274
+ // with the composite resource.
275
+ SEVERITY_NORMAL = 3;
276
+ }
277
+
278
+ // Target of Function results and conditions.
279
+ enum Target {
280
+ // If the target is unspecified, the result targets the composite resource.
281
+ TARGET_UNSPECIFIED = 0;
282
+
283
+ // Target the composite resource. Results that target the composite resource
284
+ // should include detailed, advanced information.
285
+ TARGET_COMPOSITE = 1;
286
+
287
+ // Target the composite and the claim. Results that target the composite and
288
+ // the claim should include only end-user friendly information.
289
+ TARGET_COMPOSITE_AND_CLAIM = 2;
290
+ }
291
+
292
+ // Status condition to be applied to the composite resource. Condition may also
293
+ // optionally be applied to the composite resource's associated claim. For
294
+ // detailed information on proper usage of status conditions, please see
295
+ // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties.
296
+ message Condition {
297
+ // Type of condition in PascalCase.
298
+ string type = 1;
299
+
300
+ // Status of the condition.
301
+ Status status = 2;
302
+
303
+ // Reason contains a programmatic identifier indicating the reason for the
304
+ // condition's last transition. Producers of specific condition types may
305
+ // define expected values and meanings for this field, and whether the values
306
+ // are considered a guaranteed API. The value should be a PascalCase string.
307
+ // This field may not be empty.
308
+ string reason = 3;
309
+
310
+ // Message is a human readable message indicating details about the
311
+ // transition. This may be an empty string.
312
+ optional string message = 4;
313
+
314
+ // The resources this condition targets.
315
+ optional Target target = 5;
316
+ }
317
+
318
+ enum Status {
319
+ STATUS_CONDITION_UNSPECIFIED = 0;
320
+
321
+ STATUS_CONDITION_UNKNOWN = 1;
322
+
323
+ STATUS_CONDITION_TRUE = 2;
324
+
325
+ STATUS_CONDITION_FALSE = 3;
326
+ }
@@ -0,0 +1,103 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: crossplane/function/proto/v1/run_function.proto
5
+ # Protobuf Python Version: 5.27.2
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
+ 5,
15
+ 27,
16
+ 2,
17
+ '',
18
+ 'crossplane/function/proto/v1/run_function.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
26
+ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/crossplane/function/proto/v1/run_function.proto\x12\x19\x61piextensions.fn.proto.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\"\x8d\x05\n\x12RunFunctionRequest\x12\x34\n\x04meta\x18\x01 \x01(\x0b\x32&.apiextensions.fn.proto.v1.RequestMeta\x12\x32\n\x08observed\x18\x02 \x01(\x0b\x32 .apiextensions.fn.proto.v1.State\x12\x31\n\x07\x64\x65sired\x18\x03 \x01(\x0b\x32 .apiextensions.fn.proto.v1.State\x12+\n\x05input\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x88\x01\x01\x12-\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructH\x01\x88\x01\x01\x12Z\n\x0f\x65xtra_resources\x18\x06 \x03(\x0b\x32\x41.apiextensions.fn.proto.v1.RunFunctionRequest.ExtraResourcesEntry\x12S\n\x0b\x63redentials\x18\x07 \x03(\x0b\x32>.apiextensions.fn.proto.v1.RunFunctionRequest.CredentialsEntry\x1a[\n\x13\x45xtraResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.apiextensions.fn.proto.v1.Resources:\x02\x38\x01\x1aZ\n\x10\x43redentialsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.apiextensions.fn.proto.v1.Credentials:\x02\x38\x01\x42\x08\n\x06_inputB\n\n\x08_context\"]\n\x0b\x43redentials\x12\x44\n\x0f\x63redential_data\x18\x01 \x01(\x0b\x32).apiextensions.fn.proto.v1.CredentialDataH\x00\x42\x08\n\x06source\"\x80\x01\n\x0e\x43redentialData\x12\x41\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x33.apiextensions.fn.proto.v1.CredentialData.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"?\n\tResources\x12\x32\n\x05items\x18\x01 \x03(\x0b\x32#.apiextensions.fn.proto.v1.Resource\"\xe7\x02\n\x13RunFunctionResponse\x12\x35\n\x04meta\x18\x01 \x01(\x0b\x32\'.apiextensions.fn.proto.v1.ResponseMeta\x12\x31\n\x07\x64\x65sired\x18\x02 \x01(\x0b\x32 .apiextensions.fn.proto.v1.State\x12\x32\n\x07results\x18\x03 \x03(\x0b\x32!.apiextensions.fn.proto.v1.Result\x12-\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x88\x01\x01\x12=\n\x0crequirements\x18\x05 \x01(\x0b\x32\'.apiextensions.fn.proto.v1.Requirements\x12\x38\n\nconditions\x18\x06 \x03(\x0b\x32$.apiextensions.fn.proto.v1.ConditionB\n\n\x08_context\"\x1a\n\x0bRequestMeta\x12\x0b\n\x03tag\x18\x01 \x01(\t\"\xc8\x01\n\x0cRequirements\x12T\n\x0f\x65xtra_resources\x18\x01 \x03(\x0b\x32;.apiextensions.fn.proto.v1.Requirements.ExtraResourcesEntry\x1a\x62\n\x13\x45xtraResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.apiextensions.fn.proto.v1.ResourceSelector:\x02\x38\x01\"\x94\x01\n\x10ResourceSelector\x12\x13\n\x0b\x61pi_version\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x14\n\nmatch_name\x18\x03 \x01(\tH\x00\x12>\n\x0cmatch_labels\x18\x04 \x01(\x0b\x32&.apiextensions.fn.proto.v1.MatchLabelsH\x00\x42\x07\n\x05match\"\x80\x01\n\x0bMatchLabels\x12\x42\n\x06labels\x18\x01 \x03(\x0b\x32\x32.apiextensions.fn.proto.v1.MatchLabels.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x0cResponseMeta\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12+\n\x03ttl\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x88\x01\x01\x42\x06\n\x04_ttl\"\xda\x01\n\x05State\x12\x36\n\tcomposite\x18\x01 \x01(\x0b\x32#.apiextensions.fn.proto.v1.Resource\x12\x42\n\tresources\x18\x02 \x03(\x0b\x32/.apiextensions.fn.proto.v1.State.ResourcesEntry\x1aU\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.apiextensions.fn.proto.v1.Resource:\x02\x38\x01\"\xf8\x01\n\x08Resource\x12)\n\x08resource\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12V\n\x12\x63onnection_details\x18\x02 \x03(\x0b\x32:.apiextensions.fn.proto.v1.Resource.ConnectionDetailsEntry\x12/\n\x05ready\x18\x03 \x01(\x0e\x32 .apiextensions.fn.proto.v1.Ready\x1a\x38\n\x16\x43onnectionDetailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\xb3\x01\n\x06Result\x12\x35\n\x08severity\x18\x01 \x01(\x0e\x32#.apiextensions.fn.proto.v1.Severity\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x13\n\x06reason\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x36\n\x06target\x18\x04 \x01(\x0e\x32!.apiextensions.fn.proto.v1.TargetH\x01\x88\x01\x01\x42\t\n\x07_reasonB\t\n\x07_target\"\xc1\x01\n\tCondition\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x31\n\x06status\x18\x02 \x01(\x0e\x32!.apiextensions.fn.proto.v1.Status\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x14\n\x07message\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x36\n\x06target\x18\x05 \x01(\x0e\x32!.apiextensions.fn.proto.v1.TargetH\x01\x88\x01\x01\x42\n\n\x08_messageB\t\n\x07_target*?\n\x05Ready\x12\x15\n\x11READY_UNSPECIFIED\x10\x00\x12\x0e\n\nREADY_TRUE\x10\x01\x12\x0f\n\x0bREADY_FALSE\x10\x02*c\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x12\n\x0eSEVERITY_FATAL\x10\x01\x12\x14\n\x10SEVERITY_WARNING\x10\x02\x12\x13\n\x0fSEVERITY_NORMAL\x10\x03*V\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x14\n\x10TARGET_COMPOSITE\x10\x01\x12\x1e\n\x1aTARGET_COMPOSITE_AND_CLAIM\x10\x02*\x7f\n\x06Status\x12 \n\x1cSTATUS_CONDITION_UNSPECIFIED\x10\x00\x12\x1c\n\x18STATUS_CONDITION_UNKNOWN\x10\x01\x12\x19\n\x15STATUS_CONDITION_TRUE\x10\x02\x12\x1a\n\x16STATUS_CONDITION_FALSE\x10\x03\x32\x87\x01\n\x15\x46unctionRunnerService\x12n\n\x0bRunFunction\x12-.apiextensions.fn.proto.v1.RunFunctionRequest\x1a..apiextensions.fn.proto.v1.RunFunctionResponse\"\x00\x42\x41Z?github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1b\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'crossplane.function.proto.v1.run_function_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'Z?github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1'
37
+ _globals['_RUNFUNCTIONREQUEST_EXTRARESOURCESENTRY']._loaded_options = None
38
+ _globals['_RUNFUNCTIONREQUEST_EXTRARESOURCESENTRY']._serialized_options = b'8\001'
39
+ _globals['_RUNFUNCTIONREQUEST_CREDENTIALSENTRY']._loaded_options = None
40
+ _globals['_RUNFUNCTIONREQUEST_CREDENTIALSENTRY']._serialized_options = b'8\001'
41
+ _globals['_CREDENTIALDATA_DATAENTRY']._loaded_options = None
42
+ _globals['_CREDENTIALDATA_DATAENTRY']._serialized_options = b'8\001'
43
+ _globals['_REQUIREMENTS_EXTRARESOURCESENTRY']._loaded_options = None
44
+ _globals['_REQUIREMENTS_EXTRARESOURCESENTRY']._serialized_options = b'8\001'
45
+ _globals['_MATCHLABELS_LABELSENTRY']._loaded_options = None
46
+ _globals['_MATCHLABELS_LABELSENTRY']._serialized_options = b'8\001'
47
+ _globals['_STATE_RESOURCESENTRY']._loaded_options = None
48
+ _globals['_STATE_RESOURCESENTRY']._serialized_options = b'8\001'
49
+ _globals['_RESOURCE_CONNECTIONDETAILSENTRY']._loaded_options = None
50
+ _globals['_RESOURCE_CONNECTIONDETAILSENTRY']._serialized_options = b'8\001'
51
+ _globals['_READY']._serialized_start=2894
52
+ _globals['_READY']._serialized_end=2957
53
+ _globals['_SEVERITY']._serialized_start=2959
54
+ _globals['_SEVERITY']._serialized_end=3058
55
+ _globals['_TARGET']._serialized_start=3060
56
+ _globals['_TARGET']._serialized_end=3146
57
+ _globals['_STATUS']._serialized_start=3148
58
+ _globals['_STATUS']._serialized_end=3275
59
+ _globals['_RUNFUNCTIONREQUEST']._serialized_start=141
60
+ _globals['_RUNFUNCTIONREQUEST']._serialized_end=794
61
+ _globals['_RUNFUNCTIONREQUEST_EXTRARESOURCESENTRY']._serialized_start=589
62
+ _globals['_RUNFUNCTIONREQUEST_EXTRARESOURCESENTRY']._serialized_end=680
63
+ _globals['_RUNFUNCTIONREQUEST_CREDENTIALSENTRY']._serialized_start=682
64
+ _globals['_RUNFUNCTIONREQUEST_CREDENTIALSENTRY']._serialized_end=772
65
+ _globals['_CREDENTIALS']._serialized_start=796
66
+ _globals['_CREDENTIALS']._serialized_end=889
67
+ _globals['_CREDENTIALDATA']._serialized_start=892
68
+ _globals['_CREDENTIALDATA']._serialized_end=1020
69
+ _globals['_CREDENTIALDATA_DATAENTRY']._serialized_start=977
70
+ _globals['_CREDENTIALDATA_DATAENTRY']._serialized_end=1020
71
+ _globals['_RESOURCES']._serialized_start=1022
72
+ _globals['_RESOURCES']._serialized_end=1085
73
+ _globals['_RUNFUNCTIONRESPONSE']._serialized_start=1088
74
+ _globals['_RUNFUNCTIONRESPONSE']._serialized_end=1447
75
+ _globals['_REQUESTMETA']._serialized_start=1449
76
+ _globals['_REQUESTMETA']._serialized_end=1475
77
+ _globals['_REQUIREMENTS']._serialized_start=1478
78
+ _globals['_REQUIREMENTS']._serialized_end=1678
79
+ _globals['_REQUIREMENTS_EXTRARESOURCESENTRY']._serialized_start=1580
80
+ _globals['_REQUIREMENTS_EXTRARESOURCESENTRY']._serialized_end=1678
81
+ _globals['_RESOURCESELECTOR']._serialized_start=1681
82
+ _globals['_RESOURCESELECTOR']._serialized_end=1829
83
+ _globals['_MATCHLABELS']._serialized_start=1832
84
+ _globals['_MATCHLABELS']._serialized_end=1960
85
+ _globals['_MATCHLABELS_LABELSENTRY']._serialized_start=1915
86
+ _globals['_MATCHLABELS_LABELSENTRY']._serialized_end=1960
87
+ _globals['_RESPONSEMETA']._serialized_start=1962
88
+ _globals['_RESPONSEMETA']._serialized_end=2042
89
+ _globals['_STATE']._serialized_start=2045
90
+ _globals['_STATE']._serialized_end=2263
91
+ _globals['_STATE_RESOURCESENTRY']._serialized_start=2178
92
+ _globals['_STATE_RESOURCESENTRY']._serialized_end=2263
93
+ _globals['_RESOURCE']._serialized_start=2266
94
+ _globals['_RESOURCE']._serialized_end=2514
95
+ _globals['_RESOURCE_CONNECTIONDETAILSENTRY']._serialized_start=2458
96
+ _globals['_RESOURCE_CONNECTIONDETAILSENTRY']._serialized_end=2514
97
+ _globals['_RESULT']._serialized_start=2517
98
+ _globals['_RESULT']._serialized_end=2696
99
+ _globals['_CONDITION']._serialized_start=2699
100
+ _globals['_CONDITION']._serialized_end=2892
101
+ _globals['_FUNCTIONRUNNERSERVICE']._serialized_start=3278
102
+ _globals['_FUNCTIONRUNNERSERVICE']._serialized_end=3413
103
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,232 @@
1
+ from google.protobuf import struct_pb2 as _struct_pb2
2
+ from google.protobuf import duration_pb2 as _duration_pb2
3
+ from google.protobuf.internal import containers as _containers
4
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
8
+
9
+ DESCRIPTOR: _descriptor.FileDescriptor
10
+
11
+ class Ready(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
12
+ __slots__ = ()
13
+ READY_UNSPECIFIED: _ClassVar[Ready]
14
+ READY_TRUE: _ClassVar[Ready]
15
+ READY_FALSE: _ClassVar[Ready]
16
+
17
+ class Severity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
18
+ __slots__ = ()
19
+ SEVERITY_UNSPECIFIED: _ClassVar[Severity]
20
+ SEVERITY_FATAL: _ClassVar[Severity]
21
+ SEVERITY_WARNING: _ClassVar[Severity]
22
+ SEVERITY_NORMAL: _ClassVar[Severity]
23
+
24
+ class Target(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
25
+ __slots__ = ()
26
+ TARGET_UNSPECIFIED: _ClassVar[Target]
27
+ TARGET_COMPOSITE: _ClassVar[Target]
28
+ TARGET_COMPOSITE_AND_CLAIM: _ClassVar[Target]
29
+
30
+ class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
31
+ __slots__ = ()
32
+ STATUS_CONDITION_UNSPECIFIED: _ClassVar[Status]
33
+ STATUS_CONDITION_UNKNOWN: _ClassVar[Status]
34
+ STATUS_CONDITION_TRUE: _ClassVar[Status]
35
+ STATUS_CONDITION_FALSE: _ClassVar[Status]
36
+ READY_UNSPECIFIED: Ready
37
+ READY_TRUE: Ready
38
+ READY_FALSE: Ready
39
+ SEVERITY_UNSPECIFIED: Severity
40
+ SEVERITY_FATAL: Severity
41
+ SEVERITY_WARNING: Severity
42
+ SEVERITY_NORMAL: Severity
43
+ TARGET_UNSPECIFIED: Target
44
+ TARGET_COMPOSITE: Target
45
+ TARGET_COMPOSITE_AND_CLAIM: Target
46
+ STATUS_CONDITION_UNSPECIFIED: Status
47
+ STATUS_CONDITION_UNKNOWN: Status
48
+ STATUS_CONDITION_TRUE: Status
49
+ STATUS_CONDITION_FALSE: Status
50
+
51
+ class RunFunctionRequest(_message.Message):
52
+ __slots__ = ("meta", "observed", "desired", "input", "context", "extra_resources", "credentials")
53
+ class ExtraResourcesEntry(_message.Message):
54
+ __slots__ = ("key", "value")
55
+ KEY_FIELD_NUMBER: _ClassVar[int]
56
+ VALUE_FIELD_NUMBER: _ClassVar[int]
57
+ key: str
58
+ value: Resources
59
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Resources, _Mapping]] = ...) -> None: ...
60
+ class CredentialsEntry(_message.Message):
61
+ __slots__ = ("key", "value")
62
+ KEY_FIELD_NUMBER: _ClassVar[int]
63
+ VALUE_FIELD_NUMBER: _ClassVar[int]
64
+ key: str
65
+ value: Credentials
66
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Credentials, _Mapping]] = ...) -> None: ...
67
+ META_FIELD_NUMBER: _ClassVar[int]
68
+ OBSERVED_FIELD_NUMBER: _ClassVar[int]
69
+ DESIRED_FIELD_NUMBER: _ClassVar[int]
70
+ INPUT_FIELD_NUMBER: _ClassVar[int]
71
+ CONTEXT_FIELD_NUMBER: _ClassVar[int]
72
+ EXTRA_RESOURCES_FIELD_NUMBER: _ClassVar[int]
73
+ CREDENTIALS_FIELD_NUMBER: _ClassVar[int]
74
+ meta: RequestMeta
75
+ observed: State
76
+ desired: State
77
+ input: _struct_pb2.Struct
78
+ context: _struct_pb2.Struct
79
+ extra_resources: _containers.MessageMap[str, Resources]
80
+ credentials: _containers.MessageMap[str, Credentials]
81
+ def __init__(self, meta: _Optional[_Union[RequestMeta, _Mapping]] = ..., observed: _Optional[_Union[State, _Mapping]] = ..., desired: _Optional[_Union[State, _Mapping]] = ..., input: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., context: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., extra_resources: _Optional[_Mapping[str, Resources]] = ..., credentials: _Optional[_Mapping[str, Credentials]] = ...) -> None: ...
82
+
83
+ class Credentials(_message.Message):
84
+ __slots__ = ("credential_data",)
85
+ CREDENTIAL_DATA_FIELD_NUMBER: _ClassVar[int]
86
+ credential_data: CredentialData
87
+ def __init__(self, credential_data: _Optional[_Union[CredentialData, _Mapping]] = ...) -> None: ...
88
+
89
+ class CredentialData(_message.Message):
90
+ __slots__ = ("data",)
91
+ class DataEntry(_message.Message):
92
+ __slots__ = ("key", "value")
93
+ KEY_FIELD_NUMBER: _ClassVar[int]
94
+ VALUE_FIELD_NUMBER: _ClassVar[int]
95
+ key: str
96
+ value: bytes
97
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ...
98
+ DATA_FIELD_NUMBER: _ClassVar[int]
99
+ data: _containers.ScalarMap[str, bytes]
100
+ def __init__(self, data: _Optional[_Mapping[str, bytes]] = ...) -> None: ...
101
+
102
+ class Resources(_message.Message):
103
+ __slots__ = ("items",)
104
+ ITEMS_FIELD_NUMBER: _ClassVar[int]
105
+ items: _containers.RepeatedCompositeFieldContainer[Resource]
106
+ def __init__(self, items: _Optional[_Iterable[_Union[Resource, _Mapping]]] = ...) -> None: ...
107
+
108
+ class RunFunctionResponse(_message.Message):
109
+ __slots__ = ("meta", "desired", "results", "context", "requirements", "conditions")
110
+ META_FIELD_NUMBER: _ClassVar[int]
111
+ DESIRED_FIELD_NUMBER: _ClassVar[int]
112
+ RESULTS_FIELD_NUMBER: _ClassVar[int]
113
+ CONTEXT_FIELD_NUMBER: _ClassVar[int]
114
+ REQUIREMENTS_FIELD_NUMBER: _ClassVar[int]
115
+ CONDITIONS_FIELD_NUMBER: _ClassVar[int]
116
+ meta: ResponseMeta
117
+ desired: State
118
+ results: _containers.RepeatedCompositeFieldContainer[Result]
119
+ context: _struct_pb2.Struct
120
+ requirements: Requirements
121
+ conditions: _containers.RepeatedCompositeFieldContainer[Condition]
122
+ def __init__(self, meta: _Optional[_Union[ResponseMeta, _Mapping]] = ..., desired: _Optional[_Union[State, _Mapping]] = ..., results: _Optional[_Iterable[_Union[Result, _Mapping]]] = ..., context: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., requirements: _Optional[_Union[Requirements, _Mapping]] = ..., conditions: _Optional[_Iterable[_Union[Condition, _Mapping]]] = ...) -> None: ...
123
+
124
+ class RequestMeta(_message.Message):
125
+ __slots__ = ("tag",)
126
+ TAG_FIELD_NUMBER: _ClassVar[int]
127
+ tag: str
128
+ def __init__(self, tag: _Optional[str] = ...) -> None: ...
129
+
130
+ class Requirements(_message.Message):
131
+ __slots__ = ("extra_resources",)
132
+ class ExtraResourcesEntry(_message.Message):
133
+ __slots__ = ("key", "value")
134
+ KEY_FIELD_NUMBER: _ClassVar[int]
135
+ VALUE_FIELD_NUMBER: _ClassVar[int]
136
+ key: str
137
+ value: ResourceSelector
138
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[ResourceSelector, _Mapping]] = ...) -> None: ...
139
+ EXTRA_RESOURCES_FIELD_NUMBER: _ClassVar[int]
140
+ extra_resources: _containers.MessageMap[str, ResourceSelector]
141
+ def __init__(self, extra_resources: _Optional[_Mapping[str, ResourceSelector]] = ...) -> None: ...
142
+
143
+ class ResourceSelector(_message.Message):
144
+ __slots__ = ("api_version", "kind", "match_name", "match_labels")
145
+ API_VERSION_FIELD_NUMBER: _ClassVar[int]
146
+ KIND_FIELD_NUMBER: _ClassVar[int]
147
+ MATCH_NAME_FIELD_NUMBER: _ClassVar[int]
148
+ MATCH_LABELS_FIELD_NUMBER: _ClassVar[int]
149
+ api_version: str
150
+ kind: str
151
+ match_name: str
152
+ match_labels: MatchLabels
153
+ def __init__(self, api_version: _Optional[str] = ..., kind: _Optional[str] = ..., match_name: _Optional[str] = ..., match_labels: _Optional[_Union[MatchLabels, _Mapping]] = ...) -> None: ...
154
+
155
+ class MatchLabels(_message.Message):
156
+ __slots__ = ("labels",)
157
+ class LabelsEntry(_message.Message):
158
+ __slots__ = ("key", "value")
159
+ KEY_FIELD_NUMBER: _ClassVar[int]
160
+ VALUE_FIELD_NUMBER: _ClassVar[int]
161
+ key: str
162
+ value: str
163
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
164
+ LABELS_FIELD_NUMBER: _ClassVar[int]
165
+ labels: _containers.ScalarMap[str, str]
166
+ def __init__(self, labels: _Optional[_Mapping[str, str]] = ...) -> None: ...
167
+
168
+ class ResponseMeta(_message.Message):
169
+ __slots__ = ("tag", "ttl")
170
+ TAG_FIELD_NUMBER: _ClassVar[int]
171
+ TTL_FIELD_NUMBER: _ClassVar[int]
172
+ tag: str
173
+ ttl: _duration_pb2.Duration
174
+ def __init__(self, tag: _Optional[str] = ..., ttl: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ...
175
+
176
+ class State(_message.Message):
177
+ __slots__ = ("composite", "resources")
178
+ class ResourcesEntry(_message.Message):
179
+ __slots__ = ("key", "value")
180
+ KEY_FIELD_NUMBER: _ClassVar[int]
181
+ VALUE_FIELD_NUMBER: _ClassVar[int]
182
+ key: str
183
+ value: Resource
184
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ...
185
+ COMPOSITE_FIELD_NUMBER: _ClassVar[int]
186
+ RESOURCES_FIELD_NUMBER: _ClassVar[int]
187
+ composite: Resource
188
+ resources: _containers.MessageMap[str, Resource]
189
+ def __init__(self, composite: _Optional[_Union[Resource, _Mapping]] = ..., resources: _Optional[_Mapping[str, Resource]] = ...) -> None: ...
190
+
191
+ class Resource(_message.Message):
192
+ __slots__ = ("resource", "connection_details", "ready")
193
+ class ConnectionDetailsEntry(_message.Message):
194
+ __slots__ = ("key", "value")
195
+ KEY_FIELD_NUMBER: _ClassVar[int]
196
+ VALUE_FIELD_NUMBER: _ClassVar[int]
197
+ key: str
198
+ value: bytes
199
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ...
200
+ RESOURCE_FIELD_NUMBER: _ClassVar[int]
201
+ CONNECTION_DETAILS_FIELD_NUMBER: _ClassVar[int]
202
+ READY_FIELD_NUMBER: _ClassVar[int]
203
+ resource: _struct_pb2.Struct
204
+ connection_details: _containers.ScalarMap[str, bytes]
205
+ ready: Ready
206
+ def __init__(self, resource: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., connection_details: _Optional[_Mapping[str, bytes]] = ..., ready: _Optional[_Union[Ready, str]] = ...) -> None: ...
207
+
208
+ class Result(_message.Message):
209
+ __slots__ = ("severity", "message", "reason", "target")
210
+ SEVERITY_FIELD_NUMBER: _ClassVar[int]
211
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
212
+ REASON_FIELD_NUMBER: _ClassVar[int]
213
+ TARGET_FIELD_NUMBER: _ClassVar[int]
214
+ severity: Severity
215
+ message: str
216
+ reason: str
217
+ target: Target
218
+ def __init__(self, severity: _Optional[_Union[Severity, str]] = ..., message: _Optional[str] = ..., reason: _Optional[str] = ..., target: _Optional[_Union[Target, str]] = ...) -> None: ...
219
+
220
+ class Condition(_message.Message):
221
+ __slots__ = ("type", "status", "reason", "message", "target")
222
+ TYPE_FIELD_NUMBER: _ClassVar[int]
223
+ STATUS_FIELD_NUMBER: _ClassVar[int]
224
+ REASON_FIELD_NUMBER: _ClassVar[int]
225
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
226
+ TARGET_FIELD_NUMBER: _ClassVar[int]
227
+ type: str
228
+ status: Status
229
+ reason: str
230
+ message: str
231
+ target: Target
232
+ def __init__(self, type: _Optional[str] = ..., status: _Optional[_Union[Status, str]] = ..., reason: _Optional[str] = ..., message: _Optional[str] = ..., target: _Optional[_Union[Target, str]] = ...) -> None: ...