crossplane-function-pythonic 0.6.2__py3-none-any.whl → 0.7.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.
@@ -1,306 +1,1172 @@
1
- import datetime
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ This package defines the RPC for both composition and operation functions.
5
+ Only composition functions are part of the 'apiextensions' API group. In
6
+ retrospect this package should've been crossplane.proto.fn.v1, but it's too
7
+ late to change it now.
2
8
 
9
+ buf:lint:ignore PACKAGE_DIRECTORY_MATCH
10
+ """
11
+
12
+ from collections import abc as _abc
13
+ from google.protobuf import descriptor as _descriptor
3
14
  from google.protobuf import duration_pb2 as _duration_pb2
15
+ from google.protobuf import message as _message
4
16
  from google.protobuf import struct_pb2 as _struct_pb2
5
17
  from google.protobuf.internal import containers as _containers
6
18
  from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
7
- from google.protobuf import descriptor as _descriptor
8
- from google.protobuf import message as _message
9
- from collections.abc import Iterable as _Iterable, Mapping as _Mapping
10
- from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
19
+ import builtins as _builtins
20
+ import sys
21
+ import typing as _typing
22
+
23
+ if sys.version_info >= (3, 11):
24
+ from typing import TypeAlias as _TypeAlias, Never as _Never
25
+ else:
26
+ from typing_extensions import TypeAlias as _TypeAlias, Never as _Never
27
+
28
+ if sys.version_info >= (3, 13):
29
+ from warnings import deprecated as _deprecated
30
+ else:
31
+ from typing_extensions import deprecated as _deprecated
11
32
 
12
33
  DESCRIPTOR: _descriptor.FileDescriptor
13
34
 
14
- class Capability(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
15
- __slots__ = ()
16
- CAPABILITY_UNSPECIFIED: _ClassVar[Capability]
17
- CAPABILITY_CAPABILITIES: _ClassVar[Capability]
18
- CAPABILITY_REQUIRED_RESOURCES: _ClassVar[Capability]
19
- CAPABILITY_CREDENTIALS: _ClassVar[Capability]
20
- CAPABILITY_CONDITIONS: _ClassVar[Capability]
21
- CAPABILITY_REQUIRED_SCHEMAS: _ClassVar[Capability]
22
-
23
- class Ready(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
24
- __slots__ = ()
25
- READY_UNSPECIFIED: _ClassVar[Ready]
26
- READY_TRUE: _ClassVar[Ready]
27
- READY_FALSE: _ClassVar[Ready]
28
-
29
- class Severity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
30
- __slots__ = ()
31
- SEVERITY_UNSPECIFIED: _ClassVar[Severity]
32
- SEVERITY_FATAL: _ClassVar[Severity]
33
- SEVERITY_WARNING: _ClassVar[Severity]
34
- SEVERITY_NORMAL: _ClassVar[Severity]
35
-
36
- class Target(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
37
- __slots__ = ()
38
- TARGET_UNSPECIFIED: _ClassVar[Target]
39
- TARGET_COMPOSITE: _ClassVar[Target]
40
- TARGET_COMPOSITE_AND_CLAIM: _ClassVar[Target]
41
-
42
- class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
43
- __slots__ = ()
44
- STATUS_CONDITION_UNSPECIFIED: _ClassVar[Status]
45
- STATUS_CONDITION_UNKNOWN: _ClassVar[Status]
46
- STATUS_CONDITION_TRUE: _ClassVar[Status]
47
- STATUS_CONDITION_FALSE: _ClassVar[Status]
48
- CAPABILITY_UNSPECIFIED: Capability
49
- CAPABILITY_CAPABILITIES: Capability
50
- CAPABILITY_REQUIRED_RESOURCES: Capability
51
- CAPABILITY_CREDENTIALS: Capability
52
- CAPABILITY_CONDITIONS: Capability
53
- CAPABILITY_REQUIRED_SCHEMAS: Capability
54
- READY_UNSPECIFIED: Ready
55
- READY_TRUE: Ready
56
- READY_FALSE: Ready
57
- SEVERITY_UNSPECIFIED: Severity
58
- SEVERITY_FATAL: Severity
59
- SEVERITY_WARNING: Severity
60
- SEVERITY_NORMAL: Severity
61
- TARGET_UNSPECIFIED: Target
62
- TARGET_COMPOSITE: Target
63
- TARGET_COMPOSITE_AND_CLAIM: Target
64
- STATUS_CONDITION_UNSPECIFIED: Status
65
- STATUS_CONDITION_UNKNOWN: Status
66
- STATUS_CONDITION_TRUE: Status
67
- STATUS_CONDITION_FALSE: Status
35
+ class _Capability:
36
+ ValueType = _typing.NewType("ValueType", _builtins.int)
37
+ V: _TypeAlias = ValueType # noqa: Y015
38
+
39
+ class _CapabilityEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_Capability.ValueType], _builtins.type):
40
+ DESCRIPTOR: _descriptor.EnumDescriptor
41
+ CAPABILITY_UNSPECIFIED: _Capability.ValueType # 0
42
+ CAPABILITY_CAPABILITIES: _Capability.ValueType # 1
43
+ """Crossplane sends capabilities in RequestMeta. If this capability is
44
+ present, the function knows that if another capability is absent, it's
45
+ because Crossplane doesn't support it (not because Crossplane predates
46
+ capability advertisement). Added in Crossplane v2.2.
47
+ """
48
+ CAPABILITY_REQUIRED_RESOURCES: _Capability.ValueType # 2
49
+ """Crossplane supports the requirements.resources field. Functions can return
50
+ resource requirements and Crossplane will fetch the requested resources and
51
+ return them in required_resources. Added in Crossplane v1.15.
52
+ """
53
+ CAPABILITY_CREDENTIALS: _Capability.ValueType # 3
54
+ """Crossplane supports the credentials field. Functions can receive
55
+ credentials from secrets specified in the Composition. Added in Crossplane
56
+ v1.16.
57
+ """
58
+ CAPABILITY_CONDITIONS: _Capability.ValueType # 4
59
+ """Crossplane supports the conditions field. Functions can return status
60
+ conditions to be applied to the XR and optionally its claim. Added in
61
+ Crossplane v1.17.
62
+ """
63
+ CAPABILITY_REQUIRED_SCHEMAS: _Capability.ValueType # 5
64
+ """Crossplane supports the requirements.schemas field. Functions can request
65
+ OpenAPI schemas and Crossplane will return them in required_schemas. Added
66
+ in Crossplane v2.2.
67
+ """
68
+
69
+ class Capability(_Capability, metaclass=_CapabilityEnumTypeWrapper):
70
+ """Capability indicates that Crossplane supports a particular feature.
71
+ Functions can check for capabilities to determine whether Crossplane will
72
+ honor a particular request or response field.
73
+ """
74
+
75
+ CAPABILITY_UNSPECIFIED: Capability.ValueType # 0
76
+ CAPABILITY_CAPABILITIES: Capability.ValueType # 1
77
+ """Crossplane sends capabilities in RequestMeta. If this capability is
78
+ present, the function knows that if another capability is absent, it's
79
+ because Crossplane doesn't support it (not because Crossplane predates
80
+ capability advertisement). Added in Crossplane v2.2.
81
+ """
82
+ CAPABILITY_REQUIRED_RESOURCES: Capability.ValueType # 2
83
+ """Crossplane supports the requirements.resources field. Functions can return
84
+ resource requirements and Crossplane will fetch the requested resources and
85
+ return them in required_resources. Added in Crossplane v1.15.
86
+ """
87
+ CAPABILITY_CREDENTIALS: Capability.ValueType # 3
88
+ """Crossplane supports the credentials field. Functions can receive
89
+ credentials from secrets specified in the Composition. Added in Crossplane
90
+ v1.16.
91
+ """
92
+ CAPABILITY_CONDITIONS: Capability.ValueType # 4
93
+ """Crossplane supports the conditions field. Functions can return status
94
+ conditions to be applied to the XR and optionally its claim. Added in
95
+ Crossplane v1.17.
96
+ """
97
+ CAPABILITY_REQUIRED_SCHEMAS: Capability.ValueType # 5
98
+ """Crossplane supports the requirements.schemas field. Functions can request
99
+ OpenAPI schemas and Crossplane will return them in required_schemas. Added
100
+ in Crossplane v2.2.
101
+ """
102
+ Global___Capability: _TypeAlias = Capability # noqa: Y015
103
+
104
+ class _Ready:
105
+ ValueType = _typing.NewType("ValueType", _builtins.int)
106
+ V: _TypeAlias = ValueType # noqa: Y015
107
+
108
+ class _ReadyEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_Ready.ValueType], _builtins.type):
109
+ DESCRIPTOR: _descriptor.EnumDescriptor
110
+ READY_UNSPECIFIED: _Ready.ValueType # 0
111
+ READY_TRUE: _Ready.ValueType # 1
112
+ """True means the resource has been observed to be ready."""
113
+ READY_FALSE: _Ready.ValueType # 2
114
+ """False means the resource has not been observed to be ready."""
115
+
116
+ class Ready(_Ready, metaclass=_ReadyEnumTypeWrapper):
117
+ """Ready indicates whether a resource should be considered ready."""
118
+
119
+ READY_UNSPECIFIED: Ready.ValueType # 0
120
+ READY_TRUE: Ready.ValueType # 1
121
+ """True means the resource has been observed to be ready."""
122
+ READY_FALSE: Ready.ValueType # 2
123
+ """False means the resource has not been observed to be ready."""
124
+ Global___Ready: _TypeAlias = Ready # noqa: Y015
125
+
126
+ class _Severity:
127
+ ValueType = _typing.NewType("ValueType", _builtins.int)
128
+ V: _TypeAlias = ValueType # noqa: Y015
129
+
130
+ class _SeverityEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_Severity.ValueType], _builtins.type):
131
+ DESCRIPTOR: _descriptor.EnumDescriptor
132
+ SEVERITY_UNSPECIFIED: _Severity.ValueType # 0
133
+ SEVERITY_FATAL: _Severity.ValueType # 1
134
+ """Fatal results are fatal; subsequent functions may run, but the function
135
+ pipeline run will be considered a failure and the first fatal result will
136
+ be returned as an error.
137
+ """
138
+ SEVERITY_WARNING: _Severity.ValueType # 2
139
+ """Warning results are non-fatal; the entire pipeline will run to completion
140
+ but warning events and debug logs associated with the XR or Operation will
141
+ be emitted.
142
+ """
143
+ SEVERITY_NORMAL: _Severity.ValueType # 3
144
+ """Normal results are emitted as normal events and debug logs associated with
145
+ the XR or operation.
146
+ """
147
+
148
+ class Severity(_Severity, metaclass=_SeverityEnumTypeWrapper):
149
+ """Severity of function results."""
150
+
151
+ SEVERITY_UNSPECIFIED: Severity.ValueType # 0
152
+ SEVERITY_FATAL: Severity.ValueType # 1
153
+ """Fatal results are fatal; subsequent functions may run, but the function
154
+ pipeline run will be considered a failure and the first fatal result will
155
+ be returned as an error.
156
+ """
157
+ SEVERITY_WARNING: Severity.ValueType # 2
158
+ """Warning results are non-fatal; the entire pipeline will run to completion
159
+ but warning events and debug logs associated with the XR or Operation will
160
+ be emitted.
161
+ """
162
+ SEVERITY_NORMAL: Severity.ValueType # 3
163
+ """Normal results are emitted as normal events and debug logs associated with
164
+ the XR or operation.
165
+ """
166
+ Global___Severity: _TypeAlias = Severity # noqa: Y015
68
167
 
168
+ class _Target:
169
+ ValueType = _typing.NewType("ValueType", _builtins.int)
170
+ V: _TypeAlias = ValueType # noqa: Y015
171
+
172
+ class _TargetEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_Target.ValueType], _builtins.type):
173
+ DESCRIPTOR: _descriptor.EnumDescriptor
174
+ TARGET_UNSPECIFIED: _Target.ValueType # 0
175
+ """If the target is unspecified, the result targets the XR."""
176
+ TARGET_COMPOSITE: _Target.ValueType # 1
177
+ """Target the XR. Results that target the XR should include detailed, advanced
178
+ information.
179
+ """
180
+ TARGET_COMPOSITE_AND_CLAIM: _Target.ValueType # 2
181
+ """Target the XR and the claim. Results that target the XR and the claim
182
+ should include only end-user friendly information.
183
+ """
184
+
185
+ class Target(_Target, metaclass=_TargetEnumTypeWrapper):
186
+ """Target of function results and conditions."""
187
+
188
+ TARGET_UNSPECIFIED: Target.ValueType # 0
189
+ """If the target is unspecified, the result targets the XR."""
190
+ TARGET_COMPOSITE: Target.ValueType # 1
191
+ """Target the XR. Results that target the XR should include detailed, advanced
192
+ information.
193
+ """
194
+ TARGET_COMPOSITE_AND_CLAIM: Target.ValueType # 2
195
+ """Target the XR and the claim. Results that target the XR and the claim
196
+ should include only end-user friendly information.
197
+ """
198
+ Global___Target: _TypeAlias = Target # noqa: Y015
199
+
200
+ class _Status:
201
+ ValueType = _typing.NewType("ValueType", _builtins.int)
202
+ V: _TypeAlias = ValueType # noqa: Y015
203
+
204
+ class _StatusEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_Status.ValueType], _builtins.type):
205
+ DESCRIPTOR: _descriptor.EnumDescriptor
206
+ STATUS_CONDITION_UNSPECIFIED: _Status.ValueType # 0
207
+ STATUS_CONDITION_UNKNOWN: _Status.ValueType # 1
208
+ STATUS_CONDITION_TRUE: _Status.ValueType # 2
209
+ STATUS_CONDITION_FALSE: _Status.ValueType # 3
210
+
211
+ class Status(_Status, metaclass=_StatusEnumTypeWrapper): ...
212
+
213
+ STATUS_CONDITION_UNSPECIFIED: Status.ValueType # 0
214
+ STATUS_CONDITION_UNKNOWN: Status.ValueType # 1
215
+ STATUS_CONDITION_TRUE: Status.ValueType # 2
216
+ STATUS_CONDITION_FALSE: Status.ValueType # 3
217
+ Global___Status: _TypeAlias = Status # noqa: Y015
218
+
219
+ @_typing.final
69
220
  class RunFunctionRequest(_message.Message):
70
- __slots__ = ("meta", "observed", "desired", "input", "context", "extra_resources", "credentials", "required_resources", "required_schemas")
221
+ """A RunFunctionRequest requests that the function be run."""
222
+
223
+ DESCRIPTOR: _descriptor.Descriptor
224
+
225
+ @_typing.final
71
226
  class ExtraResourcesEntry(_message.Message):
72
- __slots__ = ("key", "value")
73
- KEY_FIELD_NUMBER: _ClassVar[int]
74
- VALUE_FIELD_NUMBER: _ClassVar[int]
75
- key: str
76
- value: Resources
77
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Resources, _Mapping]] = ...) -> None: ...
227
+ DESCRIPTOR: _descriptor.Descriptor
228
+
229
+ KEY_FIELD_NUMBER: _builtins.int
230
+ VALUE_FIELD_NUMBER: _builtins.int
231
+ key: _builtins.str
232
+ @_builtins.property
233
+ def value(self) -> Global___Resources: ...
234
+ def __init__(
235
+ self,
236
+ *,
237
+ key: _builtins.str = ...,
238
+ value: Global___Resources | None = ...,
239
+ ) -> None: ...
240
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
241
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
242
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
243
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
244
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
245
+
246
+ @_typing.final
78
247
  class CredentialsEntry(_message.Message):
79
- __slots__ = ("key", "value")
80
- KEY_FIELD_NUMBER: _ClassVar[int]
81
- VALUE_FIELD_NUMBER: _ClassVar[int]
82
- key: str
83
- value: Credentials
84
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Credentials, _Mapping]] = ...) -> None: ...
248
+ DESCRIPTOR: _descriptor.Descriptor
249
+
250
+ KEY_FIELD_NUMBER: _builtins.int
251
+ VALUE_FIELD_NUMBER: _builtins.int
252
+ key: _builtins.str
253
+ @_builtins.property
254
+ def value(self) -> Global___Credentials: ...
255
+ def __init__(
256
+ self,
257
+ *,
258
+ key: _builtins.str = ...,
259
+ value: Global___Credentials | None = ...,
260
+ ) -> None: ...
261
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
262
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
263
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
264
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
265
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
266
+
267
+ @_typing.final
85
268
  class RequiredResourcesEntry(_message.Message):
86
- __slots__ = ("key", "value")
87
- KEY_FIELD_NUMBER: _ClassVar[int]
88
- VALUE_FIELD_NUMBER: _ClassVar[int]
89
- key: str
90
- value: Resources
91
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Resources, _Mapping]] = ...) -> None: ...
269
+ DESCRIPTOR: _descriptor.Descriptor
270
+
271
+ KEY_FIELD_NUMBER: _builtins.int
272
+ VALUE_FIELD_NUMBER: _builtins.int
273
+ key: _builtins.str
274
+ @_builtins.property
275
+ def value(self) -> Global___Resources: ...
276
+ def __init__(
277
+ self,
278
+ *,
279
+ key: _builtins.str = ...,
280
+ value: Global___Resources | None = ...,
281
+ ) -> None: ...
282
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
283
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
284
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
285
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
286
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
287
+
288
+ @_typing.final
92
289
  class RequiredSchemasEntry(_message.Message):
93
- __slots__ = ("key", "value")
94
- KEY_FIELD_NUMBER: _ClassVar[int]
95
- VALUE_FIELD_NUMBER: _ClassVar[int]
96
- key: str
97
- value: Schema
98
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Schema, _Mapping]] = ...) -> None: ...
99
- META_FIELD_NUMBER: _ClassVar[int]
100
- OBSERVED_FIELD_NUMBER: _ClassVar[int]
101
- DESIRED_FIELD_NUMBER: _ClassVar[int]
102
- INPUT_FIELD_NUMBER: _ClassVar[int]
103
- CONTEXT_FIELD_NUMBER: _ClassVar[int]
104
- EXTRA_RESOURCES_FIELD_NUMBER: _ClassVar[int]
105
- CREDENTIALS_FIELD_NUMBER: _ClassVar[int]
106
- REQUIRED_RESOURCES_FIELD_NUMBER: _ClassVar[int]
107
- REQUIRED_SCHEMAS_FIELD_NUMBER: _ClassVar[int]
108
- meta: RequestMeta
109
- observed: State
110
- desired: State
111
- input: _struct_pb2.Struct
112
- context: _struct_pb2.Struct
113
- extra_resources: _containers.MessageMap[str, Resources]
114
- credentials: _containers.MessageMap[str, Credentials]
115
- required_resources: _containers.MessageMap[str, Resources]
116
- required_schemas: _containers.MessageMap[str, Schema]
117
- 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]] = ..., required_resources: _Optional[_Mapping[str, Resources]] = ..., required_schemas: _Optional[_Mapping[str, Schema]] = ...) -> None: ...
290
+ DESCRIPTOR: _descriptor.Descriptor
291
+
292
+ KEY_FIELD_NUMBER: _builtins.int
293
+ VALUE_FIELD_NUMBER: _builtins.int
294
+ key: _builtins.str
295
+ @_builtins.property
296
+ def value(self) -> Global___Schema: ...
297
+ def __init__(
298
+ self,
299
+ *,
300
+ key: _builtins.str = ...,
301
+ value: Global___Schema | None = ...,
302
+ ) -> None: ...
303
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
304
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
305
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
306
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
307
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
308
+
309
+ META_FIELD_NUMBER: _builtins.int
310
+ OBSERVED_FIELD_NUMBER: _builtins.int
311
+ DESIRED_FIELD_NUMBER: _builtins.int
312
+ INPUT_FIELD_NUMBER: _builtins.int
313
+ CONTEXT_FIELD_NUMBER: _builtins.int
314
+ EXTRA_RESOURCES_FIELD_NUMBER: _builtins.int
315
+ CREDENTIALS_FIELD_NUMBER: _builtins.int
316
+ REQUIRED_RESOURCES_FIELD_NUMBER: _builtins.int
317
+ REQUIRED_SCHEMAS_FIELD_NUMBER: _builtins.int
318
+ @_builtins.property
319
+ def meta(self) -> Global___RequestMeta:
320
+ """Metadata pertaining to this request."""
118
321
 
322
+ @_builtins.property
323
+ def observed(self) -> Global___State:
324
+ """The observed state prior to invocation of a function pipeline. State passed
325
+ to each function is fresh as of the time the pipeline was invoked, not as
326
+ of the time each function was invoked.
327
+ """
328
+
329
+ @_builtins.property
330
+ def desired(self) -> Global___State:
331
+ """Desired state according to a function pipeline. The state passed to a
332
+ particular function may have been accumulated by previous functions in the
333
+ pipeline.
334
+
335
+ Note that the desired state must be a partial object with only the fields
336
+ that this function (and its predecessors in the pipeline) wants to have set
337
+ in the object. Copying a non-partial observed state to desired is most
338
+ likely not what you want to do. Leaving out fields that had been returned
339
+ as desired before will result in them being deleted from the objects in the
340
+ cluster.
341
+ """
342
+
343
+ @_builtins.property
344
+ def input(self) -> _struct_pb2.Struct:
345
+ """Optional input specific to this function invocation. A JSON representation
346
+ of the 'input' block of the relevant entry in a function pipeline.
347
+ """
348
+
349
+ @_builtins.property
350
+ def context(self) -> _struct_pb2.Struct:
351
+ """Optional context. Crossplane may pass arbitrary contextual information to a
352
+ function. A function may also return context in its RunFunctionResponse,
353
+ and that context will be passed to subsequent functions. Crossplane
354
+ discards all context returned by the last function in the pipeline.
355
+ """
356
+
357
+ @_builtins.property
358
+ @_deprecated("""This field has been marked as deprecated using proto field options.""")
359
+ def extra_resources(self) -> _containers.MessageMap[_builtins.str, Global___Resources]:
360
+ """Optional resources that the function specified in its requirements. Note
361
+ that resources is a map to Resources, plural. The map key corresponds to
362
+ the key in a RunFunctionResponse's requirements.extra_resources field. If a
363
+ function requested extra resources that did not exist, Crossplane sets
364
+ the map key to an empty Resources message to indicate that it attempted to
365
+ satisfy the request. This field is only populated when the function uses
366
+ extra_resources in its requirements.
367
+
368
+ Deprecated: Use required_resources instead.
369
+ """
370
+
371
+ @_builtins.property
372
+ def credentials(self) -> _containers.MessageMap[_builtins.str, Global___Credentials]:
373
+ """Optional credentials that this function may use to communicate with an
374
+ external system.
375
+ """
376
+
377
+ @_builtins.property
378
+ def required_resources(self) -> _containers.MessageMap[_builtins.str, Global___Resources]:
379
+ """Optional resources that the function specified in its requirements. Note
380
+ that resources is a map to Resources, plural. The map key corresponds to
381
+ the key in a RunFunctionResponse's requirements.resources field. If a
382
+ function requested required resources that did not exist, Crossplane sets
383
+ the map key to an empty Resources message to indicate that it attempted to
384
+ satisfy the request. This field is only populated when the function uses
385
+ resources in its requirements.
386
+ """
387
+
388
+ @_builtins.property
389
+ def required_schemas(self) -> _containers.MessageMap[_builtins.str, Global___Schema]:
390
+ """Optional schemas that the function specified in its requirements. The map
391
+ key corresponds to the key in a RunFunctionResponse's requirements.schemas
392
+ field. If a function requested a schema that could not be found, Crossplane
393
+ sets the map key to an empty Schema message to indicate that it attempted
394
+ to satisfy the request.
395
+ """
396
+
397
+ def __init__(
398
+ self,
399
+ *,
400
+ meta: Global___RequestMeta | None = ...,
401
+ observed: Global___State | None = ...,
402
+ desired: Global___State | None = ...,
403
+ input: _struct_pb2.Struct | None = ...,
404
+ context: _struct_pb2.Struct | None = ...,
405
+ extra_resources: _abc.Mapping[_builtins.str, Global___Resources] | None = ...,
406
+ credentials: _abc.Mapping[_builtins.str, Global___Credentials] | None = ...,
407
+ required_resources: _abc.Mapping[_builtins.str, Global___Resources] | None = ...,
408
+ required_schemas: _abc.Mapping[_builtins.str, Global___Schema] | None = ...,
409
+ ) -> None: ...
410
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_context", b"_context", "_input", b"_input", "context", b"context", "desired", b"desired", "input", b"input", "meta", b"meta", "observed", b"observed"] # noqa: Y015
411
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
412
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_context", b"_context", "_input", b"_input", "context", b"context", "credentials", b"credentials", "desired", b"desired", "extra_resources", b"extra_resources", "input", b"input", "meta", b"meta", "observed", b"observed", "required_resources", b"required_resources", "required_schemas", b"required_schemas"] # noqa: Y015
413
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
414
+ _WhichOneofReturnType__context: _TypeAlias = _typing.Literal["context"] # noqa: Y015
415
+ _WhichOneofArgType__context: _TypeAlias = _typing.Literal["_context", b"_context"] # noqa: Y015
416
+ _WhichOneofReturnType__input: _TypeAlias = _typing.Literal["input"] # noqa: Y015
417
+ _WhichOneofArgType__input: _TypeAlias = _typing.Literal["_input", b"_input"] # noqa: Y015
418
+ @_typing.overload
419
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__context) -> _WhichOneofReturnType__context | None: ...
420
+ @_typing.overload
421
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__input) -> _WhichOneofReturnType__input | None: ...
422
+
423
+ Global___RunFunctionRequest: _TypeAlias = RunFunctionRequest # noqa: Y015
424
+
425
+ @_typing.final
119
426
  class Credentials(_message.Message):
120
- __slots__ = ("credential_data",)
121
- CREDENTIAL_DATA_FIELD_NUMBER: _ClassVar[int]
122
- credential_data: CredentialData
123
- def __init__(self, credential_data: _Optional[_Union[CredentialData, _Mapping]] = ...) -> None: ...
427
+ """Credentials that a function may use to communicate with an external system."""
428
+
429
+ DESCRIPTOR: _descriptor.Descriptor
430
+
431
+ CREDENTIAL_DATA_FIELD_NUMBER: _builtins.int
432
+ @_builtins.property
433
+ def credential_data(self) -> Global___CredentialData:
434
+ """Credential data loaded by Crossplane, for example from a Secret."""
124
435
 
436
+ def __init__(
437
+ self,
438
+ *,
439
+ credential_data: Global___CredentialData | None = ...,
440
+ ) -> None: ...
441
+ _HasFieldArgType: _TypeAlias = _typing.Literal["credential_data", b"credential_data", "source", b"source"] # noqa: Y015
442
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
443
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["credential_data", b"credential_data", "source", b"source"] # noqa: Y015
444
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
445
+ _WhichOneofReturnType_source: _TypeAlias = _typing.Literal["credential_data"] # noqa: Y015
446
+ _WhichOneofArgType_source: _TypeAlias = _typing.Literal["source", b"source"] # noqa: Y015
447
+ def WhichOneof(self, oneof_group: _WhichOneofArgType_source) -> _WhichOneofReturnType_source | None: ...
448
+
449
+ Global___Credentials: _TypeAlias = Credentials # noqa: Y015
450
+
451
+ @_typing.final
125
452
  class CredentialData(_message.Message):
126
- __slots__ = ("data",)
453
+ """CredentialData loaded by Crossplane, for example from a Secret."""
454
+
455
+ DESCRIPTOR: _descriptor.Descriptor
456
+
457
+ @_typing.final
127
458
  class DataEntry(_message.Message):
128
- __slots__ = ("key", "value")
129
- KEY_FIELD_NUMBER: _ClassVar[int]
130
- VALUE_FIELD_NUMBER: _ClassVar[int]
131
- key: str
132
- value: bytes
133
- def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ...
134
- DATA_FIELD_NUMBER: _ClassVar[int]
135
- data: _containers.ScalarMap[str, bytes]
136
- def __init__(self, data: _Optional[_Mapping[str, bytes]] = ...) -> None: ...
459
+ DESCRIPTOR: _descriptor.Descriptor
137
460
 
461
+ KEY_FIELD_NUMBER: _builtins.int
462
+ VALUE_FIELD_NUMBER: _builtins.int
463
+ key: _builtins.str
464
+ value: _builtins.bytes
465
+ def __init__(
466
+ self,
467
+ *,
468
+ key: _builtins.str = ...,
469
+ value: _builtins.bytes = ...,
470
+ ) -> None: ...
471
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
472
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
473
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
474
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
475
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
476
+
477
+ DATA_FIELD_NUMBER: _builtins.int
478
+ @_builtins.property
479
+ def data(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]: ...
480
+ def __init__(
481
+ self,
482
+ *,
483
+ data: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ...,
484
+ ) -> None: ...
485
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
486
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
487
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015
488
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
489
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
490
+
491
+ Global___CredentialData: _TypeAlias = CredentialData # noqa: Y015
492
+
493
+ @_typing.final
138
494
  class Resources(_message.Message):
139
- __slots__ = ("items",)
140
- ITEMS_FIELD_NUMBER: _ClassVar[int]
141
- items: _containers.RepeatedCompositeFieldContainer[Resource]
142
- def __init__(self, items: _Optional[_Iterable[_Union[Resource, _Mapping]]] = ...) -> None: ...
495
+ """Resources represents the state of several Crossplane resources."""
496
+
497
+ DESCRIPTOR: _descriptor.Descriptor
498
+
499
+ ITEMS_FIELD_NUMBER: _builtins.int
500
+ @_builtins.property
501
+ def items(self) -> _containers.RepeatedCompositeFieldContainer[Global___Resource]: ...
502
+ def __init__(
503
+ self,
504
+ *,
505
+ items: _abc.Iterable[Global___Resource] | None = ...,
506
+ ) -> None: ...
507
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
508
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
509
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["items", b"items"] # noqa: Y015
510
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
511
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
143
512
 
513
+ Global___Resources: _TypeAlias = Resources # noqa: Y015
514
+
515
+ @_typing.final
144
516
  class RunFunctionResponse(_message.Message):
145
- __slots__ = ("meta", "desired", "results", "context", "requirements", "conditions", "output")
146
- META_FIELD_NUMBER: _ClassVar[int]
147
- DESIRED_FIELD_NUMBER: _ClassVar[int]
148
- RESULTS_FIELD_NUMBER: _ClassVar[int]
149
- CONTEXT_FIELD_NUMBER: _ClassVar[int]
150
- REQUIREMENTS_FIELD_NUMBER: _ClassVar[int]
151
- CONDITIONS_FIELD_NUMBER: _ClassVar[int]
152
- OUTPUT_FIELD_NUMBER: _ClassVar[int]
153
- meta: ResponseMeta
154
- desired: State
155
- results: _containers.RepeatedCompositeFieldContainer[Result]
156
- context: _struct_pb2.Struct
157
- requirements: Requirements
158
- conditions: _containers.RepeatedCompositeFieldContainer[Condition]
159
- output: _struct_pb2.Struct
160
- 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]]] = ..., output: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
517
+ """A RunFunctionResponse contains the result of a function run."""
518
+
519
+ DESCRIPTOR: _descriptor.Descriptor
520
+
521
+ META_FIELD_NUMBER: _builtins.int
522
+ DESIRED_FIELD_NUMBER: _builtins.int
523
+ RESULTS_FIELD_NUMBER: _builtins.int
524
+ CONTEXT_FIELD_NUMBER: _builtins.int
525
+ REQUIREMENTS_FIELD_NUMBER: _builtins.int
526
+ CONDITIONS_FIELD_NUMBER: _builtins.int
527
+ OUTPUT_FIELD_NUMBER: _builtins.int
528
+ @_builtins.property
529
+ def meta(self) -> Global___ResponseMeta:
530
+ """Metadata pertaining to this response."""
531
+
532
+ @_builtins.property
533
+ def desired(self) -> Global___State:
534
+ """Desired state according to a function pipeline. functions may add desired
535
+ state, and may mutate or delete any part of the desired state they are
536
+ concerned with. A function must pass through any part of the desired state
537
+ that it is not concerned with.
538
+
539
+ Note that the desired state must be a partial object with only the fields
540
+ that this function (and its predecessors in the pipeline) wants to have set
541
+ in the object. Copying a non-partial observed state to desired is most
542
+ likely not what you want to do. Leaving out fields that had been returned
543
+ as desired before will result in them being deleted from the objects in the
544
+ cluster.
545
+ """
546
+
547
+ @_builtins.property
548
+ def results(self) -> _containers.RepeatedCompositeFieldContainer[Global___Result]:
549
+ """Results of the function run. Results are used for observability purposes."""
550
+
551
+ @_builtins.property
552
+ def context(self) -> _struct_pb2.Struct:
553
+ """Optional context to be passed to the next function in the pipeline as part
554
+ of the RunFunctionRequest. Dropped on the last function in the pipeline.
555
+ """
556
+
557
+ @_builtins.property
558
+ def requirements(self) -> Global___Requirements:
559
+ """Requirements that must be satisfied for this function to run successfully."""
560
+
561
+ @_builtins.property
562
+ def conditions(self) -> _containers.RepeatedCompositeFieldContainer[Global___Condition]:
563
+ """Status conditions to be applied to the XR. Conditions may also optionally
564
+ be applied to the XR's associated claim.
565
+
566
+ Conditions are only used for composition. They're ignored by Operations.
567
+ """
568
+
569
+ @_builtins.property
570
+ def output(self) -> _struct_pb2.Struct:
571
+ """Optional output specific to this function invocation.
572
+
573
+ Only Operations use function output. XRs will discard any function output.
574
+ """
161
575
 
576
+ def __init__(
577
+ self,
578
+ *,
579
+ meta: Global___ResponseMeta | None = ...,
580
+ desired: Global___State | None = ...,
581
+ results: _abc.Iterable[Global___Result] | None = ...,
582
+ context: _struct_pb2.Struct | None = ...,
583
+ requirements: Global___Requirements | None = ...,
584
+ conditions: _abc.Iterable[Global___Condition] | None = ...,
585
+ output: _struct_pb2.Struct | None = ...,
586
+ ) -> None: ...
587
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_context", b"_context", "_output", b"_output", "context", b"context", "desired", b"desired", "meta", b"meta", "output", b"output", "requirements", b"requirements"] # noqa: Y015
588
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
589
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_context", b"_context", "_output", b"_output", "conditions", b"conditions", "context", b"context", "desired", b"desired", "meta", b"meta", "output", b"output", "requirements", b"requirements", "results", b"results"] # noqa: Y015
590
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
591
+ _WhichOneofReturnType__context: _TypeAlias = _typing.Literal["context"] # noqa: Y015
592
+ _WhichOneofArgType__context: _TypeAlias = _typing.Literal["_context", b"_context"] # noqa: Y015
593
+ _WhichOneofReturnType__output: _TypeAlias = _typing.Literal["output"] # noqa: Y015
594
+ _WhichOneofArgType__output: _TypeAlias = _typing.Literal["_output", b"_output"] # noqa: Y015
595
+ @_typing.overload
596
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__context) -> _WhichOneofReturnType__context | None: ...
597
+ @_typing.overload
598
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__output) -> _WhichOneofReturnType__output | None: ...
599
+
600
+ Global___RunFunctionResponse: _TypeAlias = RunFunctionResponse # noqa: Y015
601
+
602
+ @_typing.final
162
603
  class RequestMeta(_message.Message):
163
- __slots__ = ("tag", "capabilities")
164
- TAG_FIELD_NUMBER: _ClassVar[int]
165
- CAPABILITIES_FIELD_NUMBER: _ClassVar[int]
166
- tag: str
167
- capabilities: _containers.RepeatedScalarFieldContainer[Capability]
168
- def __init__(self, tag: _Optional[str] = ..., capabilities: _Optional[_Iterable[_Union[Capability, str]]] = ...) -> None: ...
604
+ """RequestMeta contains metadata pertaining to a RunFunctionRequest."""
605
+
606
+ DESCRIPTOR: _descriptor.Descriptor
607
+
608
+ TAG_FIELD_NUMBER: _builtins.int
609
+ CAPABILITIES_FIELD_NUMBER: _builtins.int
610
+ tag: _builtins.str
611
+ """An opaque string identifying a request. Requests with identical tags will
612
+ be otherwise identical.
613
+ """
614
+ @_builtins.property
615
+ def capabilities(self) -> _containers.RepeatedScalarFieldContainer[Global___Capability.ValueType]:
616
+ """Capabilities supported by this version of Crossplane. Functions may use
617
+ this to determine whether Crossplane will honor certain fields in their
618
+ response, or populate certain fields in their request.
619
+ """
620
+
621
+ def __init__(
622
+ self,
623
+ *,
624
+ tag: _builtins.str = ...,
625
+ capabilities: _abc.Iterable[Global___Capability.ValueType] | None = ...,
626
+ ) -> None: ...
627
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
628
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
629
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["capabilities", b"capabilities", "tag", b"tag"] # noqa: Y015
630
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
631
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
169
632
 
633
+ Global___RequestMeta: _TypeAlias = RequestMeta # noqa: Y015
634
+
635
+ @_typing.final
170
636
  class Requirements(_message.Message):
171
- __slots__ = ("extra_resources", "resources", "schemas")
637
+ """Requirements that must be satisfied for a function to run successfully."""
638
+
639
+ DESCRIPTOR: _descriptor.Descriptor
640
+
641
+ @_typing.final
172
642
  class ExtraResourcesEntry(_message.Message):
173
- __slots__ = ("key", "value")
174
- KEY_FIELD_NUMBER: _ClassVar[int]
175
- VALUE_FIELD_NUMBER: _ClassVar[int]
176
- key: str
177
- value: ResourceSelector
178
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[ResourceSelector, _Mapping]] = ...) -> None: ...
643
+ DESCRIPTOR: _descriptor.Descriptor
644
+
645
+ KEY_FIELD_NUMBER: _builtins.int
646
+ VALUE_FIELD_NUMBER: _builtins.int
647
+ key: _builtins.str
648
+ @_builtins.property
649
+ def value(self) -> Global___ResourceSelector: ...
650
+ def __init__(
651
+ self,
652
+ *,
653
+ key: _builtins.str = ...,
654
+ value: Global___ResourceSelector | None = ...,
655
+ ) -> None: ...
656
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
657
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
658
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
659
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
660
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
661
+
662
+ @_typing.final
179
663
  class ResourcesEntry(_message.Message):
180
- __slots__ = ("key", "value")
181
- KEY_FIELD_NUMBER: _ClassVar[int]
182
- VALUE_FIELD_NUMBER: _ClassVar[int]
183
- key: str
184
- value: ResourceSelector
185
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[ResourceSelector, _Mapping]] = ...) -> None: ...
664
+ DESCRIPTOR: _descriptor.Descriptor
665
+
666
+ KEY_FIELD_NUMBER: _builtins.int
667
+ VALUE_FIELD_NUMBER: _builtins.int
668
+ key: _builtins.str
669
+ @_builtins.property
670
+ def value(self) -> Global___ResourceSelector: ...
671
+ def __init__(
672
+ self,
673
+ *,
674
+ key: _builtins.str = ...,
675
+ value: Global___ResourceSelector | None = ...,
676
+ ) -> None: ...
677
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
678
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
679
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
680
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
681
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
682
+
683
+ @_typing.final
186
684
  class SchemasEntry(_message.Message):
187
- __slots__ = ("key", "value")
188
- KEY_FIELD_NUMBER: _ClassVar[int]
189
- VALUE_FIELD_NUMBER: _ClassVar[int]
190
- key: str
191
- value: SchemaSelector
192
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[SchemaSelector, _Mapping]] = ...) -> None: ...
193
- EXTRA_RESOURCES_FIELD_NUMBER: _ClassVar[int]
194
- RESOURCES_FIELD_NUMBER: _ClassVar[int]
195
- SCHEMAS_FIELD_NUMBER: _ClassVar[int]
196
- extra_resources: _containers.MessageMap[str, ResourceSelector]
197
- resources: _containers.MessageMap[str, ResourceSelector]
198
- schemas: _containers.MessageMap[str, SchemaSelector]
199
- def __init__(self, extra_resources: _Optional[_Mapping[str, ResourceSelector]] = ..., resources: _Optional[_Mapping[str, ResourceSelector]] = ..., schemas: _Optional[_Mapping[str, SchemaSelector]] = ...) -> None: ...
685
+ DESCRIPTOR: _descriptor.Descriptor
686
+
687
+ KEY_FIELD_NUMBER: _builtins.int
688
+ VALUE_FIELD_NUMBER: _builtins.int
689
+ key: _builtins.str
690
+ @_builtins.property
691
+ def value(self) -> Global___SchemaSelector: ...
692
+ def __init__(
693
+ self,
694
+ *,
695
+ key: _builtins.str = ...,
696
+ value: Global___SchemaSelector | None = ...,
697
+ ) -> None: ...
698
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
699
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
700
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
701
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
702
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
703
+
704
+ EXTRA_RESOURCES_FIELD_NUMBER: _builtins.int
705
+ RESOURCES_FIELD_NUMBER: _builtins.int
706
+ SCHEMAS_FIELD_NUMBER: _builtins.int
707
+ @_builtins.property
708
+ @_deprecated("""This field has been marked as deprecated using proto field options.""")
709
+ def extra_resources(self) -> _containers.MessageMap[_builtins.str, Global___ResourceSelector]:
710
+ """Resources that this function requires. The map key uniquely identifies the
711
+ group of resources.
712
+
713
+ Deprecated: Use resources instead.
714
+ """
715
+
716
+ @_builtins.property
717
+ def resources(self) -> _containers.MessageMap[_builtins.str, Global___ResourceSelector]:
718
+ """Resources that this function requires. The map key uniquely identifies the
719
+ group of resources.
720
+ """
721
+
722
+ @_builtins.property
723
+ def schemas(self) -> _containers.MessageMap[_builtins.str, Global___SchemaSelector]:
724
+ """Schemas that this function requires. The map key uniquely identifies the
725
+ schema request.
726
+ """
727
+
728
+ def __init__(
729
+ self,
730
+ *,
731
+ extra_resources: _abc.Mapping[_builtins.str, Global___ResourceSelector] | None = ...,
732
+ resources: _abc.Mapping[_builtins.str, Global___ResourceSelector] | None = ...,
733
+ schemas: _abc.Mapping[_builtins.str, Global___SchemaSelector] | None = ...,
734
+ ) -> None: ...
735
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
736
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
737
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["extra_resources", b"extra_resources", "resources", b"resources", "schemas", b"schemas"] # noqa: Y015
738
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
739
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
200
740
 
741
+ Global___Requirements: _TypeAlias = Requirements # noqa: Y015
742
+
743
+ @_typing.final
201
744
  class SchemaSelector(_message.Message):
202
- __slots__ = ("api_version", "kind")
203
- API_VERSION_FIELD_NUMBER: _ClassVar[int]
204
- KIND_FIELD_NUMBER: _ClassVar[int]
205
- api_version: str
206
- kind: str
207
- def __init__(self, api_version: _Optional[str] = ..., kind: _Optional[str] = ...) -> None: ...
745
+ """SchemaSelector identifies a resource kind whose OpenAPI schema is requested."""
746
+
747
+ DESCRIPTOR: _descriptor.Descriptor
748
+
749
+ API_VERSION_FIELD_NUMBER: _builtins.int
750
+ KIND_FIELD_NUMBER: _builtins.int
751
+ api_version: _builtins.str
752
+ """API version of the resource kind, e.g. "example.org/v1"."""
753
+ kind: _builtins.str
754
+ """Kind of resource, e.g. "MyResource"."""
755
+ def __init__(
756
+ self,
757
+ *,
758
+ api_version: _builtins.str = ...,
759
+ kind: _builtins.str = ...,
760
+ ) -> None: ...
761
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
762
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
763
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["api_version", b"api_version", "kind", b"kind"] # noqa: Y015
764
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
765
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
208
766
 
767
+ Global___SchemaSelector: _TypeAlias = SchemaSelector # noqa: Y015
768
+
769
+ @_typing.final
209
770
  class Schema(_message.Message):
210
- __slots__ = ("openapi_v3",)
211
- OPENAPI_V3_FIELD_NUMBER: _ClassVar[int]
212
- openapi_v3: _struct_pb2.Struct
213
- def __init__(self, openapi_v3: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
771
+ """Schema represents the OpenAPI schema for a resource kind."""
772
+
773
+ DESCRIPTOR: _descriptor.Descriptor
214
774
 
775
+ OPENAPI_V3_FIELD_NUMBER: _builtins.int
776
+ @_builtins.property
777
+ def openapi_v3(self) -> _struct_pb2.Struct:
778
+ """The OpenAPI v3 schema of the resource kind as unstructured JSON.
779
+ For CRDs this is the spec.versions[].schema.openAPIV3Schema field.
780
+ Empty if Crossplane could not find a schema for the requested kind.
781
+ """
782
+
783
+ def __init__(
784
+ self,
785
+ *,
786
+ openapi_v3: _struct_pb2.Struct | None = ...,
787
+ ) -> None: ...
788
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_openapi_v3", b"_openapi_v3", "openapi_v3", b"openapi_v3"] # noqa: Y015
789
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
790
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_openapi_v3", b"_openapi_v3", "openapi_v3", b"openapi_v3"] # noqa: Y015
791
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
792
+ _WhichOneofReturnType__openapi_v3: _TypeAlias = _typing.Literal["openapi_v3"] # noqa: Y015
793
+ _WhichOneofArgType__openapi_v3: _TypeAlias = _typing.Literal["_openapi_v3", b"_openapi_v3"] # noqa: Y015
794
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__openapi_v3) -> _WhichOneofReturnType__openapi_v3 | None: ...
795
+
796
+ Global___Schema: _TypeAlias = Schema # noqa: Y015
797
+
798
+ @_typing.final
215
799
  class ResourceSelector(_message.Message):
216
- __slots__ = ("api_version", "kind", "match_name", "match_labels", "namespace")
217
- API_VERSION_FIELD_NUMBER: _ClassVar[int]
218
- KIND_FIELD_NUMBER: _ClassVar[int]
219
- MATCH_NAME_FIELD_NUMBER: _ClassVar[int]
220
- MATCH_LABELS_FIELD_NUMBER: _ClassVar[int]
221
- NAMESPACE_FIELD_NUMBER: _ClassVar[int]
222
- api_version: str
223
- kind: str
224
- match_name: str
225
- match_labels: MatchLabels
226
- namespace: str
227
- def __init__(self, api_version: _Optional[str] = ..., kind: _Optional[str] = ..., match_name: _Optional[str] = ..., match_labels: _Optional[_Union[MatchLabels, _Mapping]] = ..., namespace: _Optional[str] = ...) -> None: ...
800
+ """ResourceSelector selects a group of resources, either by name or by label."""
801
+
802
+ DESCRIPTOR: _descriptor.Descriptor
228
803
 
804
+ API_VERSION_FIELD_NUMBER: _builtins.int
805
+ KIND_FIELD_NUMBER: _builtins.int
806
+ MATCH_NAME_FIELD_NUMBER: _builtins.int
807
+ MATCH_LABELS_FIELD_NUMBER: _builtins.int
808
+ NAMESPACE_FIELD_NUMBER: _builtins.int
809
+ api_version: _builtins.str
810
+ """API version of resources to select."""
811
+ kind: _builtins.str
812
+ """Kind of resources to select."""
813
+ match_name: _builtins.str
814
+ """Match the resource with this name."""
815
+ namespace: _builtins.str
816
+ """Match resources in this namespace. Omit namespace to match cluster scoped
817
+ resources, or to match namespaced resources by labels across all
818
+ namespaces.
819
+ """
820
+ @_builtins.property
821
+ def match_labels(self) -> Global___MatchLabels:
822
+ """Match all resources with these labels."""
823
+
824
+ def __init__(
825
+ self,
826
+ *,
827
+ api_version: _builtins.str = ...,
828
+ kind: _builtins.str = ...,
829
+ match_name: _builtins.str = ...,
830
+ match_labels: Global___MatchLabels | None = ...,
831
+ namespace: _builtins.str | None = ...,
832
+ ) -> None: ...
833
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_namespace", b"_namespace", "match", b"match", "match_labels", b"match_labels", "match_name", b"match_name", "namespace", b"namespace"] # noqa: Y015
834
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
835
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_namespace", b"_namespace", "api_version", b"api_version", "kind", b"kind", "match", b"match", "match_labels", b"match_labels", "match_name", b"match_name", "namespace", b"namespace"] # noqa: Y015
836
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
837
+ _WhichOneofReturnType__namespace: _TypeAlias = _typing.Literal["namespace"] # noqa: Y015
838
+ _WhichOneofArgType__namespace: _TypeAlias = _typing.Literal["_namespace", b"_namespace"] # noqa: Y015
839
+ _WhichOneofReturnType_match: _TypeAlias = _typing.Literal["match_name", "match_labels"] # noqa: Y015
840
+ _WhichOneofArgType_match: _TypeAlias = _typing.Literal["match", b"match"] # noqa: Y015
841
+ @_typing.overload
842
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__namespace) -> _WhichOneofReturnType__namespace | None: ...
843
+ @_typing.overload
844
+ def WhichOneof(self, oneof_group: _WhichOneofArgType_match) -> _WhichOneofReturnType_match | None: ...
845
+
846
+ Global___ResourceSelector: _TypeAlias = ResourceSelector # noqa: Y015
847
+
848
+ @_typing.final
229
849
  class MatchLabels(_message.Message):
230
- __slots__ = ("labels",)
850
+ """MatchLabels defines a set of labels to match resources against."""
851
+
852
+ DESCRIPTOR: _descriptor.Descriptor
853
+
854
+ @_typing.final
231
855
  class LabelsEntry(_message.Message):
232
- __slots__ = ("key", "value")
233
- KEY_FIELD_NUMBER: _ClassVar[int]
234
- VALUE_FIELD_NUMBER: _ClassVar[int]
235
- key: str
236
- value: str
237
- def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
238
- LABELS_FIELD_NUMBER: _ClassVar[int]
239
- labels: _containers.ScalarMap[str, str]
240
- def __init__(self, labels: _Optional[_Mapping[str, str]] = ...) -> None: ...
856
+ DESCRIPTOR: _descriptor.Descriptor
241
857
 
858
+ KEY_FIELD_NUMBER: _builtins.int
859
+ VALUE_FIELD_NUMBER: _builtins.int
860
+ key: _builtins.str
861
+ value: _builtins.str
862
+ def __init__(
863
+ self,
864
+ *,
865
+ key: _builtins.str = ...,
866
+ value: _builtins.str = ...,
867
+ ) -> None: ...
868
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
869
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
870
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
871
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
872
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
873
+
874
+ LABELS_FIELD_NUMBER: _builtins.int
875
+ @_builtins.property
876
+ def labels(self) -> _containers.ScalarMap[_builtins.str, _builtins.str]: ...
877
+ def __init__(
878
+ self,
879
+ *,
880
+ labels: _abc.Mapping[_builtins.str, _builtins.str] | None = ...,
881
+ ) -> None: ...
882
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
883
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
884
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["labels", b"labels"] # noqa: Y015
885
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
886
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
887
+
888
+ Global___MatchLabels: _TypeAlias = MatchLabels # noqa: Y015
889
+
890
+ @_typing.final
242
891
  class ResponseMeta(_message.Message):
243
- __slots__ = ("tag", "ttl")
244
- TAG_FIELD_NUMBER: _ClassVar[int]
245
- TTL_FIELD_NUMBER: _ClassVar[int]
246
- tag: str
247
- ttl: _duration_pb2.Duration
248
- def __init__(self, tag: _Optional[str] = ..., ttl: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ...) -> None: ...
892
+ """ResponseMeta contains metadata pertaining to a RunFunctionResponse."""
893
+
894
+ DESCRIPTOR: _descriptor.Descriptor
249
895
 
896
+ TAG_FIELD_NUMBER: _builtins.int
897
+ TTL_FIELD_NUMBER: _builtins.int
898
+ tag: _builtins.str
899
+ """An opaque string identifying the content of the request. Must match the
900
+ meta.tag of the corresponding RunFunctionRequest.
901
+ """
902
+ @_builtins.property
903
+ def ttl(self) -> _duration_pb2.Duration:
904
+ """Time-to-live of this response. Crossplane will call the function again when
905
+ the TTL expires. Crossplane may cache the response to avoid calling the
906
+ function again until the TTL expires.
907
+ """
908
+
909
+ def __init__(
910
+ self,
911
+ *,
912
+ tag: _builtins.str = ...,
913
+ ttl: _duration_pb2.Duration | None = ...,
914
+ ) -> None: ...
915
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_ttl", b"_ttl", "ttl", b"ttl"] # noqa: Y015
916
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
917
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_ttl", b"_ttl", "tag", b"tag", "ttl", b"ttl"] # noqa: Y015
918
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
919
+ _WhichOneofReturnType__ttl: _TypeAlias = _typing.Literal["ttl"] # noqa: Y015
920
+ _WhichOneofArgType__ttl: _TypeAlias = _typing.Literal["_ttl", b"_ttl"] # noqa: Y015
921
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__ttl) -> _WhichOneofReturnType__ttl | None: ...
922
+
923
+ Global___ResponseMeta: _TypeAlias = ResponseMeta # noqa: Y015
924
+
925
+ @_typing.final
250
926
  class State(_message.Message):
251
- __slots__ = ("composite", "resources")
927
+ """State of the XR (XR) and any resources."""
928
+
929
+ DESCRIPTOR: _descriptor.Descriptor
930
+
931
+ @_typing.final
252
932
  class ResourcesEntry(_message.Message):
253
- __slots__ = ("key", "value")
254
- KEY_FIELD_NUMBER: _ClassVar[int]
255
- VALUE_FIELD_NUMBER: _ClassVar[int]
256
- key: str
257
- value: Resource
258
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ...
259
- COMPOSITE_FIELD_NUMBER: _ClassVar[int]
260
- RESOURCES_FIELD_NUMBER: _ClassVar[int]
261
- composite: Resource
262
- resources: _containers.MessageMap[str, Resource]
263
- def __init__(self, composite: _Optional[_Union[Resource, _Mapping]] = ..., resources: _Optional[_Mapping[str, Resource]] = ...) -> None: ...
933
+ DESCRIPTOR: _descriptor.Descriptor
934
+
935
+ KEY_FIELD_NUMBER: _builtins.int
936
+ VALUE_FIELD_NUMBER: _builtins.int
937
+ key: _builtins.str
938
+ @_builtins.property
939
+ def value(self) -> Global___Resource: ...
940
+ def __init__(
941
+ self,
942
+ *,
943
+ key: _builtins.str = ...,
944
+ value: Global___Resource | None = ...,
945
+ ) -> None: ...
946
+ _HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
947
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
948
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
949
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
950
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
951
+
952
+ COMPOSITE_FIELD_NUMBER: _builtins.int
953
+ RESOURCES_FIELD_NUMBER: _builtins.int
954
+ @_builtins.property
955
+ def composite(self) -> Global___Resource:
956
+ """The state of the XR (XR)."""
957
+
958
+ @_builtins.property
959
+ def resources(self) -> _containers.MessageMap[_builtins.str, Global___Resource]:
960
+ """The state of any other resources. In composition functions these are the
961
+ composed resources. In operation functions they're arbitrary resources that
962
+ the operation wants to create or update.
963
+ """
964
+
965
+ def __init__(
966
+ self,
967
+ *,
968
+ composite: Global___Resource | None = ...,
969
+ resources: _abc.Mapping[_builtins.str, Global___Resource] | None = ...,
970
+ ) -> None: ...
971
+ _HasFieldArgType: _TypeAlias = _typing.Literal["composite", b"composite"] # noqa: Y015
972
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
973
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["composite", b"composite", "resources", b"resources"] # noqa: Y015
974
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
975
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
264
976
 
977
+ Global___State: _TypeAlias = State # noqa: Y015
978
+
979
+ @_typing.final
265
980
  class Resource(_message.Message):
266
- __slots__ = ("resource", "connection_details", "ready")
981
+ """A Resource represents the state of a Kubernetes resource."""
982
+
983
+ DESCRIPTOR: _descriptor.Descriptor
984
+
985
+ @_typing.final
267
986
  class ConnectionDetailsEntry(_message.Message):
268
- __slots__ = ("key", "value")
269
- KEY_FIELD_NUMBER: _ClassVar[int]
270
- VALUE_FIELD_NUMBER: _ClassVar[int]
271
- key: str
272
- value: bytes
273
- def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ...
274
- RESOURCE_FIELD_NUMBER: _ClassVar[int]
275
- CONNECTION_DETAILS_FIELD_NUMBER: _ClassVar[int]
276
- READY_FIELD_NUMBER: _ClassVar[int]
277
- resource: _struct_pb2.Struct
278
- connection_details: _containers.ScalarMap[str, bytes]
279
- ready: Ready
280
- def __init__(self, resource: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., connection_details: _Optional[_Mapping[str, bytes]] = ..., ready: _Optional[_Union[Ready, str]] = ...) -> None: ...
987
+ DESCRIPTOR: _descriptor.Descriptor
988
+
989
+ KEY_FIELD_NUMBER: _builtins.int
990
+ VALUE_FIELD_NUMBER: _builtins.int
991
+ key: _builtins.str
992
+ value: _builtins.bytes
993
+ def __init__(
994
+ self,
995
+ *,
996
+ key: _builtins.str = ...,
997
+ value: _builtins.bytes = ...,
998
+ ) -> None: ...
999
+ _HasFieldArgType: _TypeAlias = _Never # noqa: Y015
1000
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
1001
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
1002
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
1003
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
1004
+
1005
+ RESOURCE_FIELD_NUMBER: _builtins.int
1006
+ CONNECTION_DETAILS_FIELD_NUMBER: _builtins.int
1007
+ READY_FIELD_NUMBER: _builtins.int
1008
+ ready: Global___Ready.ValueType
1009
+ """Ready indicates whether the resource should be considered ready.
1010
+
1011
+ * Crossplane will never set this field in a RunFunctionRequest.
1012
+
1013
+ * A function should set this field to READY_TRUE in a RunFunctionResponse
1014
+ to indicate that a desired resource is ready.
1015
+
1016
+ * A function should set this field to READY_TRUE in a RunFunctionResponse
1017
+ to indicate that a desired XR is ready. This overwrites the standard
1018
+ readiness detection that determines the ready state of the composite by the
1019
+ ready state of the composed resources.
1020
+
1021
+ Ready is only used for composition. It's ignored by Operations.
1022
+ """
1023
+ @_builtins.property
1024
+ def resource(self) -> _struct_pb2.Struct:
1025
+ """The JSON representation of the resource.
281
1026
 
1027
+ * Crossplane will set this field in a RunFunctionRequest to the entire
1028
+ observed state of a resource - including its metadata, spec, and status.
1029
+
1030
+ * A function should set this field in a RunFunctionRequest to communicate
1031
+ the desired state of the resource.
1032
+
1033
+ * A function may only specify the desired status of a XR - not its metadata
1034
+ or spec. A function should not return desired metadata or spec for a XR.
1035
+ This will be ignored.
1036
+
1037
+ * A function may not specify the desired status of any other resource -
1038
+ e.g. composed resources. It may only specify their metadata and spec.
1039
+ Status will be ignored.
1040
+ """
1041
+
1042
+ @_builtins.property
1043
+ def connection_details(self) -> _containers.ScalarMap[_builtins.str, _builtins.bytes]:
1044
+ """The resource's connection details.
1045
+
1046
+ * Crossplane will set this field in a RunFunctionRequest to communicate the
1047
+ the observed connection details of a composite or composed resource.
1048
+
1049
+ * A function should set this field in a RunFunctionResponse to indicate the
1050
+ desired connection details of legacy XRs. For modern XRs, this will be ignored.
1051
+
1052
+ * A function should not set this field in a RunFunctionResponse to indicate
1053
+ the desired connection details of a composed resource. This will be
1054
+ ignored.
1055
+
1056
+ Connection details are only used for composition. They're ignored by
1057
+ Operations.
1058
+ """
1059
+
1060
+ def __init__(
1061
+ self,
1062
+ *,
1063
+ resource: _struct_pb2.Struct | None = ...,
1064
+ connection_details: _abc.Mapping[_builtins.str, _builtins.bytes] | None = ...,
1065
+ ready: Global___Ready.ValueType = ...,
1066
+ ) -> None: ...
1067
+ _HasFieldArgType: _TypeAlias = _typing.Literal["resource", b"resource"] # noqa: Y015
1068
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
1069
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["connection_details", b"connection_details", "ready", b"ready", "resource", b"resource"] # noqa: Y015
1070
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
1071
+ def WhichOneof(self, oneof_group: _Never) -> None: ...
1072
+
1073
+ Global___Resource: _TypeAlias = Resource # noqa: Y015
1074
+
1075
+ @_typing.final
282
1076
  class Result(_message.Message):
283
- __slots__ = ("severity", "message", "reason", "target")
284
- SEVERITY_FIELD_NUMBER: _ClassVar[int]
285
- MESSAGE_FIELD_NUMBER: _ClassVar[int]
286
- REASON_FIELD_NUMBER: _ClassVar[int]
287
- TARGET_FIELD_NUMBER: _ClassVar[int]
288
- severity: Severity
289
- message: str
290
- reason: str
291
- target: Target
292
- def __init__(self, severity: _Optional[_Union[Severity, str]] = ..., message: _Optional[str] = ..., reason: _Optional[str] = ..., target: _Optional[_Union[Target, str]] = ...) -> None: ...
1077
+ """A Result of running a function."""
1078
+
1079
+ DESCRIPTOR: _descriptor.Descriptor
1080
+
1081
+ SEVERITY_FIELD_NUMBER: _builtins.int
1082
+ MESSAGE_FIELD_NUMBER: _builtins.int
1083
+ REASON_FIELD_NUMBER: _builtins.int
1084
+ TARGET_FIELD_NUMBER: _builtins.int
1085
+ severity: Global___Severity.ValueType
1086
+ """Severity of this result."""
1087
+ message: _builtins.str
1088
+ """Human-readable details about the result."""
1089
+ reason: _builtins.str
1090
+ """Optional PascalCase, machine-readable reason for this result. If omitted,
1091
+ the value will be ComposeResources.
1092
+ """
1093
+ target: Global___Target.ValueType
1094
+ """The resources this result targets."""
1095
+ def __init__(
1096
+ self,
1097
+ *,
1098
+ severity: Global___Severity.ValueType = ...,
1099
+ message: _builtins.str = ...,
1100
+ reason: _builtins.str | None = ...,
1101
+ target: Global___Target.ValueType | None = ...,
1102
+ ) -> None: ...
1103
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_reason", b"_reason", "_target", b"_target", "reason", b"reason", "target", b"target"] # noqa: Y015
1104
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
1105
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_reason", b"_reason", "_target", b"_target", "message", b"message", "reason", b"reason", "severity", b"severity", "target", b"target"] # noqa: Y015
1106
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
1107
+ _WhichOneofReturnType__reason: _TypeAlias = _typing.Literal["reason"] # noqa: Y015
1108
+ _WhichOneofArgType__reason: _TypeAlias = _typing.Literal["_reason", b"_reason"] # noqa: Y015
1109
+ _WhichOneofReturnType__target: _TypeAlias = _typing.Literal["target"] # noqa: Y015
1110
+ _WhichOneofArgType__target: _TypeAlias = _typing.Literal["_target", b"_target"] # noqa: Y015
1111
+ @_typing.overload
1112
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__reason) -> _WhichOneofReturnType__reason | None: ...
1113
+ @_typing.overload
1114
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__target) -> _WhichOneofReturnType__target | None: ...
293
1115
 
1116
+ Global___Result: _TypeAlias = Result # noqa: Y015
1117
+
1118
+ @_typing.final
294
1119
  class Condition(_message.Message):
295
- __slots__ = ("type", "status", "reason", "message", "target")
296
- TYPE_FIELD_NUMBER: _ClassVar[int]
297
- STATUS_FIELD_NUMBER: _ClassVar[int]
298
- REASON_FIELD_NUMBER: _ClassVar[int]
299
- MESSAGE_FIELD_NUMBER: _ClassVar[int]
300
- TARGET_FIELD_NUMBER: _ClassVar[int]
301
- type: str
302
- status: Status
303
- reason: str
304
- message: str
305
- target: Target
306
- def __init__(self, type: _Optional[str] = ..., status: _Optional[_Union[Status, str]] = ..., reason: _Optional[str] = ..., message: _Optional[str] = ..., target: _Optional[_Union[Target, str]] = ...) -> None: ...
1120
+ """Status condition to be applied to the XR. Condition may also optionally be
1121
+ applied to the XR's associated claim. For detailed information on proper
1122
+ usage of status conditions, please see
1123
+ https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties.
1124
+ """
1125
+
1126
+ DESCRIPTOR: _descriptor.Descriptor
1127
+
1128
+ TYPE_FIELD_NUMBER: _builtins.int
1129
+ STATUS_FIELD_NUMBER: _builtins.int
1130
+ REASON_FIELD_NUMBER: _builtins.int
1131
+ MESSAGE_FIELD_NUMBER: _builtins.int
1132
+ TARGET_FIELD_NUMBER: _builtins.int
1133
+ type: _builtins.str
1134
+ """Type of condition in PascalCase."""
1135
+ status: Global___Status.ValueType
1136
+ """Status of the condition."""
1137
+ reason: _builtins.str
1138
+ """Reason contains a programmatic identifier indicating the reason for the
1139
+ condition's last transition. Producers of specific condition types may
1140
+ define expected values and meanings for this field, and whether the values
1141
+ are considered a guaranteed API. The value should be a PascalCase string.
1142
+ This field may not be empty.
1143
+ """
1144
+ message: _builtins.str
1145
+ """Message is a human readable message indicating details about the
1146
+ transition. This may be an empty string.
1147
+ """
1148
+ target: Global___Target.ValueType
1149
+ """The resources this condition targets."""
1150
+ def __init__(
1151
+ self,
1152
+ *,
1153
+ type: _builtins.str = ...,
1154
+ status: Global___Status.ValueType = ...,
1155
+ reason: _builtins.str = ...,
1156
+ message: _builtins.str | None = ...,
1157
+ target: Global___Target.ValueType | None = ...,
1158
+ ) -> None: ...
1159
+ _HasFieldArgType: _TypeAlias = _typing.Literal["_message", b"_message", "_target", b"_target", "message", b"message", "target", b"target"] # noqa: Y015
1160
+ def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
1161
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["_message", b"_message", "_target", b"_target", "message", b"message", "reason", b"reason", "status", b"status", "target", b"target", "type", b"type"] # noqa: Y015
1162
+ def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
1163
+ _WhichOneofReturnType__message: _TypeAlias = _typing.Literal["message"] # noqa: Y015
1164
+ _WhichOneofArgType__message: _TypeAlias = _typing.Literal["_message", b"_message"] # noqa: Y015
1165
+ _WhichOneofReturnType__target: _TypeAlias = _typing.Literal["target"] # noqa: Y015
1166
+ _WhichOneofArgType__target: _TypeAlias = _typing.Literal["_target", b"_target"] # noqa: Y015
1167
+ @_typing.overload
1168
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__message) -> _WhichOneofReturnType__message | None: ...
1169
+ @_typing.overload
1170
+ def WhichOneof(self, oneof_group: _WhichOneofArgType__target) -> _WhichOneofReturnType__target | None: ...
1171
+
1172
+ Global___Condition: _TypeAlias = Condition # noqa: Y015