openfeature-provider-flagd 0.1.5__py3-none-any.whl → 0.2.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.
- openfeature/.gitignore +2 -0
- openfeature/contrib/provider/flagd/config.py +193 -23
- openfeature/contrib/provider/flagd/provider.py +62 -12
- openfeature/contrib/provider/flagd/resolvers/__init__.py +1 -47
- openfeature/contrib/provider/flagd/resolvers/grpc.py +226 -17
- openfeature/contrib/provider/flagd/resolvers/in_process.py +40 -31
- openfeature/contrib/provider/flagd/resolvers/process/connector/__init__.py +11 -0
- openfeature/contrib/provider/flagd/resolvers/process/connector/file_watcher.py +106 -0
- openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py +192 -0
- openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py +58 -19
- openfeature/contrib/provider/flagd/resolvers/process/flags.py +50 -6
- openfeature/contrib/provider/flagd/resolvers/process/targeting.py +35 -0
- openfeature/contrib/provider/flagd/resolvers/protocol.py +47 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.py +72 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.pyi +450 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.py +358 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.pyi +155 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.py +50 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.pyi +148 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.py +186 -0
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.pyi +86 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2.py +72 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2.pyi +451 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.py +358 -0
- openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.pyi +156 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2.py +47 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2.pyi +174 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.py +143 -0
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.pyi +70 -0
- {openfeature_provider_flagd-0.1.5.dist-info → openfeature_provider_flagd-0.2.0.dist-info}/METADATA +116 -15
- openfeature_provider_flagd-0.2.0.dist-info/RECORD +35 -0
- {openfeature_provider_flagd-0.1.5.dist-info → openfeature_provider_flagd-0.2.0.dist-info}/WHEEL +1 -1
- {openfeature_provider_flagd-0.1.5.dist-info → openfeature_provider_flagd-0.2.0.dist-info}/licenses/LICENSE +1 -1
- openfeature/contrib/provider/flagd/proto/flagd/evaluation/v1/evaluation_pb2.py +0 -62
- openfeature/contrib/provider/flagd/proto/flagd/evaluation/v1/evaluation_pb2_grpc.py +0 -267
- openfeature/contrib/provider/flagd/proto/flagd/sync/v1/sync_pb2.py +0 -40
- openfeature/contrib/provider/flagd/proto/flagd/sync/v1/sync_pb2_grpc.py +0 -135
- openfeature/contrib/provider/flagd/proto/schema/v1/schema_pb2.py +0 -62
- openfeature/contrib/provider/flagd/proto/schema/v1/schema_pb2_grpc.py +0 -267
- openfeature/contrib/provider/flagd/proto/sync/v1/sync_service_pb2.py +0 -37
- openfeature/contrib/provider/flagd/proto/sync/v1/sync_service_pb2_grpc.py +0 -102
- openfeature/contrib/provider/flagd/resolvers/process/file_watcher.py +0 -89
- openfeature_provider_flagd-0.1.5.dist-info/RECORD +0 -22
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
*
|
|
5
|
+
Flag evaluation API
|
|
6
|
+
|
|
7
|
+
This proto forms the basis of a flag-evaluation API.
|
|
8
|
+
It supports single and bulk evaluation RPCs, and flags of various types, as well as establishing a stream for getting notifications about changes in a flag definition.
|
|
9
|
+
It supports the inclusion of a "context" with each evaluation, which may contain arbitrary attributes relevant to flag evaluation.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import builtins
|
|
13
|
+
import collections.abc
|
|
14
|
+
import google.protobuf.descriptor
|
|
15
|
+
import google.protobuf.internal.containers
|
|
16
|
+
import google.protobuf.message
|
|
17
|
+
import google.protobuf.struct_pb2
|
|
18
|
+
import typing
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
21
|
+
|
|
22
|
+
@typing.final
|
|
23
|
+
class ResolveAllRequest(google.protobuf.message.Message):
|
|
24
|
+
"""Request body for bulk flag evaluation, used by the ResolveAll rpc."""
|
|
25
|
+
|
|
26
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
27
|
+
|
|
28
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
29
|
+
@property
|
|
30
|
+
def context(self) -> google.protobuf.struct_pb2.Struct:
|
|
31
|
+
"""Object structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context"""
|
|
32
|
+
|
|
33
|
+
def __init__(
|
|
34
|
+
self,
|
|
35
|
+
*,
|
|
36
|
+
context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
37
|
+
) -> None: ...
|
|
38
|
+
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
39
|
+
def ClearField(self, field_name: typing.Literal["context", b"context"]) -> None: ...
|
|
40
|
+
|
|
41
|
+
global___ResolveAllRequest = ResolveAllRequest
|
|
42
|
+
|
|
43
|
+
@typing.final
|
|
44
|
+
class ResolveAllResponse(google.protobuf.message.Message):
|
|
45
|
+
"""Response body for bulk flag evaluation, used by the ResolveAll rpc."""
|
|
46
|
+
|
|
47
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
48
|
+
|
|
49
|
+
@typing.final
|
|
50
|
+
class FlagsEntry(google.protobuf.message.Message):
|
|
51
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
52
|
+
|
|
53
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
54
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
55
|
+
key: builtins.str
|
|
56
|
+
@property
|
|
57
|
+
def value(self) -> global___AnyFlag: ...
|
|
58
|
+
def __init__(
|
|
59
|
+
self,
|
|
60
|
+
*,
|
|
61
|
+
key: builtins.str = ...,
|
|
62
|
+
value: global___AnyFlag | None = ...,
|
|
63
|
+
) -> None: ...
|
|
64
|
+
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
65
|
+
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
66
|
+
|
|
67
|
+
FLAGS_FIELD_NUMBER: builtins.int
|
|
68
|
+
@property
|
|
69
|
+
def flags(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___AnyFlag]:
|
|
70
|
+
"""Object structure describing the evaluated flags for the provided context."""
|
|
71
|
+
|
|
72
|
+
def __init__(
|
|
73
|
+
self,
|
|
74
|
+
*,
|
|
75
|
+
flags: collections.abc.Mapping[builtins.str, global___AnyFlag] | None = ...,
|
|
76
|
+
) -> None: ...
|
|
77
|
+
def ClearField(self, field_name: typing.Literal["flags", b"flags"]) -> None: ...
|
|
78
|
+
|
|
79
|
+
global___ResolveAllResponse = ResolveAllResponse
|
|
80
|
+
|
|
81
|
+
@typing.final
|
|
82
|
+
class AnyFlag(google.protobuf.message.Message):
|
|
83
|
+
"""A variant type flag response."""
|
|
84
|
+
|
|
85
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
86
|
+
|
|
87
|
+
REASON_FIELD_NUMBER: builtins.int
|
|
88
|
+
VARIANT_FIELD_NUMBER: builtins.int
|
|
89
|
+
BOOL_VALUE_FIELD_NUMBER: builtins.int
|
|
90
|
+
STRING_VALUE_FIELD_NUMBER: builtins.int
|
|
91
|
+
DOUBLE_VALUE_FIELD_NUMBER: builtins.int
|
|
92
|
+
OBJECT_VALUE_FIELD_NUMBER: builtins.int
|
|
93
|
+
reason: builtins.str
|
|
94
|
+
"""The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details"""
|
|
95
|
+
variant: builtins.str
|
|
96
|
+
"""The variant name of the returned flag value."""
|
|
97
|
+
bool_value: builtins.bool
|
|
98
|
+
string_value: builtins.str
|
|
99
|
+
double_value: builtins.float
|
|
100
|
+
@property
|
|
101
|
+
def object_value(self) -> google.protobuf.struct_pb2.Struct: ...
|
|
102
|
+
def __init__(
|
|
103
|
+
self,
|
|
104
|
+
*,
|
|
105
|
+
reason: builtins.str = ...,
|
|
106
|
+
variant: builtins.str = ...,
|
|
107
|
+
bool_value: builtins.bool = ...,
|
|
108
|
+
string_value: builtins.str = ...,
|
|
109
|
+
double_value: builtins.float = ...,
|
|
110
|
+
object_value: google.protobuf.struct_pb2.Struct | None = ...,
|
|
111
|
+
) -> None: ...
|
|
112
|
+
def HasField(self, field_name: typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "object_value", b"object_value", "string_value", b"string_value", "value", b"value"]) -> builtins.bool: ...
|
|
113
|
+
def ClearField(self, field_name: typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "object_value", b"object_value", "reason", b"reason", "string_value", b"string_value", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
114
|
+
def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["bool_value", "string_value", "double_value", "object_value"] | None: ...
|
|
115
|
+
|
|
116
|
+
global___AnyFlag = AnyFlag
|
|
117
|
+
|
|
118
|
+
@typing.final
|
|
119
|
+
class ResolveBooleanRequest(google.protobuf.message.Message):
|
|
120
|
+
"""Request body for boolean flag evaluation, used by the ResolveBoolean rpc."""
|
|
121
|
+
|
|
122
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
123
|
+
|
|
124
|
+
FLAG_KEY_FIELD_NUMBER: builtins.int
|
|
125
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
126
|
+
flag_key: builtins.str
|
|
127
|
+
"""Flag key of the requested flag."""
|
|
128
|
+
@property
|
|
129
|
+
def context(self) -> google.protobuf.struct_pb2.Struct:
|
|
130
|
+
"""Object structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context"""
|
|
131
|
+
|
|
132
|
+
def __init__(
|
|
133
|
+
self,
|
|
134
|
+
*,
|
|
135
|
+
flag_key: builtins.str = ...,
|
|
136
|
+
context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
137
|
+
) -> None: ...
|
|
138
|
+
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
139
|
+
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
140
|
+
|
|
141
|
+
global___ResolveBooleanRequest = ResolveBooleanRequest
|
|
142
|
+
|
|
143
|
+
@typing.final
|
|
144
|
+
class ResolveBooleanResponse(google.protobuf.message.Message):
|
|
145
|
+
"""Response body for boolean flag evaluation. used by the ResolveBoolean rpc."""
|
|
146
|
+
|
|
147
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
148
|
+
|
|
149
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
150
|
+
REASON_FIELD_NUMBER: builtins.int
|
|
151
|
+
VARIANT_FIELD_NUMBER: builtins.int
|
|
152
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
153
|
+
value: builtins.bool
|
|
154
|
+
"""The response value of the boolean flag evaluation, will be unset in the case of error."""
|
|
155
|
+
reason: builtins.str
|
|
156
|
+
"""The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details"""
|
|
157
|
+
variant: builtins.str
|
|
158
|
+
"""The variant name of the returned flag value."""
|
|
159
|
+
@property
|
|
160
|
+
def metadata(self) -> google.protobuf.struct_pb2.Struct:
|
|
161
|
+
"""Metadata for this evaluation"""
|
|
162
|
+
|
|
163
|
+
def __init__(
|
|
164
|
+
self,
|
|
165
|
+
*,
|
|
166
|
+
value: builtins.bool = ...,
|
|
167
|
+
reason: builtins.str = ...,
|
|
168
|
+
variant: builtins.str = ...,
|
|
169
|
+
metadata: google.protobuf.struct_pb2.Struct | None = ...,
|
|
170
|
+
) -> None: ...
|
|
171
|
+
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
172
|
+
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
173
|
+
|
|
174
|
+
global___ResolveBooleanResponse = ResolveBooleanResponse
|
|
175
|
+
|
|
176
|
+
@typing.final
|
|
177
|
+
class ResolveStringRequest(google.protobuf.message.Message):
|
|
178
|
+
"""Request body for string flag evaluation, used by the ResolveString rpc."""
|
|
179
|
+
|
|
180
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
181
|
+
|
|
182
|
+
FLAG_KEY_FIELD_NUMBER: builtins.int
|
|
183
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
184
|
+
flag_key: builtins.str
|
|
185
|
+
"""Flag key of the requested flag."""
|
|
186
|
+
@property
|
|
187
|
+
def context(self) -> google.protobuf.struct_pb2.Struct:
|
|
188
|
+
"""Object structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context"""
|
|
189
|
+
|
|
190
|
+
def __init__(
|
|
191
|
+
self,
|
|
192
|
+
*,
|
|
193
|
+
flag_key: builtins.str = ...,
|
|
194
|
+
context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
195
|
+
) -> None: ...
|
|
196
|
+
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
197
|
+
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
198
|
+
|
|
199
|
+
global___ResolveStringRequest = ResolveStringRequest
|
|
200
|
+
|
|
201
|
+
@typing.final
|
|
202
|
+
class ResolveStringResponse(google.protobuf.message.Message):
|
|
203
|
+
"""Response body for string flag evaluation. used by the ResolveString rpc."""
|
|
204
|
+
|
|
205
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
206
|
+
|
|
207
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
208
|
+
REASON_FIELD_NUMBER: builtins.int
|
|
209
|
+
VARIANT_FIELD_NUMBER: builtins.int
|
|
210
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
211
|
+
value: builtins.str
|
|
212
|
+
"""The response value of the string flag evaluation, will be unset in the case of error."""
|
|
213
|
+
reason: builtins.str
|
|
214
|
+
"""The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details"""
|
|
215
|
+
variant: builtins.str
|
|
216
|
+
"""The variant name of the returned flag value."""
|
|
217
|
+
@property
|
|
218
|
+
def metadata(self) -> google.protobuf.struct_pb2.Struct:
|
|
219
|
+
"""Metadata for this evaluation"""
|
|
220
|
+
|
|
221
|
+
def __init__(
|
|
222
|
+
self,
|
|
223
|
+
*,
|
|
224
|
+
value: builtins.str = ...,
|
|
225
|
+
reason: builtins.str = ...,
|
|
226
|
+
variant: builtins.str = ...,
|
|
227
|
+
metadata: google.protobuf.struct_pb2.Struct | None = ...,
|
|
228
|
+
) -> None: ...
|
|
229
|
+
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
230
|
+
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
231
|
+
|
|
232
|
+
global___ResolveStringResponse = ResolveStringResponse
|
|
233
|
+
|
|
234
|
+
@typing.final
|
|
235
|
+
class ResolveFloatRequest(google.protobuf.message.Message):
|
|
236
|
+
"""Request body for float flag evaluation, used by the ResolveFloat rpc."""
|
|
237
|
+
|
|
238
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
239
|
+
|
|
240
|
+
FLAG_KEY_FIELD_NUMBER: builtins.int
|
|
241
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
242
|
+
flag_key: builtins.str
|
|
243
|
+
"""Flag key of the requested flag."""
|
|
244
|
+
@property
|
|
245
|
+
def context(self) -> google.protobuf.struct_pb2.Struct:
|
|
246
|
+
"""Object structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context"""
|
|
247
|
+
|
|
248
|
+
def __init__(
|
|
249
|
+
self,
|
|
250
|
+
*,
|
|
251
|
+
flag_key: builtins.str = ...,
|
|
252
|
+
context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
253
|
+
) -> None: ...
|
|
254
|
+
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
255
|
+
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
256
|
+
|
|
257
|
+
global___ResolveFloatRequest = ResolveFloatRequest
|
|
258
|
+
|
|
259
|
+
@typing.final
|
|
260
|
+
class ResolveFloatResponse(google.protobuf.message.Message):
|
|
261
|
+
"""Response body for float flag evaluation. used by the ResolveFloat rpc."""
|
|
262
|
+
|
|
263
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
264
|
+
|
|
265
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
266
|
+
REASON_FIELD_NUMBER: builtins.int
|
|
267
|
+
VARIANT_FIELD_NUMBER: builtins.int
|
|
268
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
269
|
+
value: builtins.float
|
|
270
|
+
"""The response value of the float flag evaluation, will be empty in the case of error."""
|
|
271
|
+
reason: builtins.str
|
|
272
|
+
"""The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details"""
|
|
273
|
+
variant: builtins.str
|
|
274
|
+
"""The variant name of the returned flag value."""
|
|
275
|
+
@property
|
|
276
|
+
def metadata(self) -> google.protobuf.struct_pb2.Struct:
|
|
277
|
+
"""Metadata for this evaluation"""
|
|
278
|
+
|
|
279
|
+
def __init__(
|
|
280
|
+
self,
|
|
281
|
+
*,
|
|
282
|
+
value: builtins.float = ...,
|
|
283
|
+
reason: builtins.str = ...,
|
|
284
|
+
variant: builtins.str = ...,
|
|
285
|
+
metadata: google.protobuf.struct_pb2.Struct | None = ...,
|
|
286
|
+
) -> None: ...
|
|
287
|
+
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
288
|
+
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
289
|
+
|
|
290
|
+
global___ResolveFloatResponse = ResolveFloatResponse
|
|
291
|
+
|
|
292
|
+
@typing.final
|
|
293
|
+
class ResolveIntRequest(google.protobuf.message.Message):
|
|
294
|
+
"""Request body for int flag evaluation, used by the ResolveInt rpc."""
|
|
295
|
+
|
|
296
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
297
|
+
|
|
298
|
+
FLAG_KEY_FIELD_NUMBER: builtins.int
|
|
299
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
300
|
+
flag_key: builtins.str
|
|
301
|
+
"""Flag key of the requested flag."""
|
|
302
|
+
@property
|
|
303
|
+
def context(self) -> google.protobuf.struct_pb2.Struct:
|
|
304
|
+
"""Object structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context"""
|
|
305
|
+
|
|
306
|
+
def __init__(
|
|
307
|
+
self,
|
|
308
|
+
*,
|
|
309
|
+
flag_key: builtins.str = ...,
|
|
310
|
+
context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
311
|
+
) -> None: ...
|
|
312
|
+
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
313
|
+
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
314
|
+
|
|
315
|
+
global___ResolveIntRequest = ResolveIntRequest
|
|
316
|
+
|
|
317
|
+
@typing.final
|
|
318
|
+
class ResolveIntResponse(google.protobuf.message.Message):
|
|
319
|
+
"""Response body for int flag evaluation. used by the ResolveInt rpc."""
|
|
320
|
+
|
|
321
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
322
|
+
|
|
323
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
324
|
+
REASON_FIELD_NUMBER: builtins.int
|
|
325
|
+
VARIANT_FIELD_NUMBER: builtins.int
|
|
326
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
327
|
+
value: builtins.int
|
|
328
|
+
"""The response value of the int flag evaluation, will be unset in the case of error."""
|
|
329
|
+
reason: builtins.str
|
|
330
|
+
"""The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details"""
|
|
331
|
+
variant: builtins.str
|
|
332
|
+
"""The variant name of the returned flag value."""
|
|
333
|
+
@property
|
|
334
|
+
def metadata(self) -> google.protobuf.struct_pb2.Struct:
|
|
335
|
+
"""Metadata for this evaluation"""
|
|
336
|
+
|
|
337
|
+
def __init__(
|
|
338
|
+
self,
|
|
339
|
+
*,
|
|
340
|
+
value: builtins.int = ...,
|
|
341
|
+
reason: builtins.str = ...,
|
|
342
|
+
variant: builtins.str = ...,
|
|
343
|
+
metadata: google.protobuf.struct_pb2.Struct | None = ...,
|
|
344
|
+
) -> None: ...
|
|
345
|
+
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
346
|
+
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
347
|
+
|
|
348
|
+
global___ResolveIntResponse = ResolveIntResponse
|
|
349
|
+
|
|
350
|
+
@typing.final
|
|
351
|
+
class ResolveObjectRequest(google.protobuf.message.Message):
|
|
352
|
+
"""Request body for object flag evaluation, used by the ResolveObject rpc."""
|
|
353
|
+
|
|
354
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
355
|
+
|
|
356
|
+
FLAG_KEY_FIELD_NUMBER: builtins.int
|
|
357
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
358
|
+
flag_key: builtins.str
|
|
359
|
+
"""Flag key of the requested flag."""
|
|
360
|
+
@property
|
|
361
|
+
def context(self) -> google.protobuf.struct_pb2.Struct:
|
|
362
|
+
"""Object structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context"""
|
|
363
|
+
|
|
364
|
+
def __init__(
|
|
365
|
+
self,
|
|
366
|
+
*,
|
|
367
|
+
flag_key: builtins.str = ...,
|
|
368
|
+
context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
369
|
+
) -> None: ...
|
|
370
|
+
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
371
|
+
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
372
|
+
|
|
373
|
+
global___ResolveObjectRequest = ResolveObjectRequest
|
|
374
|
+
|
|
375
|
+
@typing.final
|
|
376
|
+
class ResolveObjectResponse(google.protobuf.message.Message):
|
|
377
|
+
"""Response body for object flag evaluation. used by the ResolveObject rpc."""
|
|
378
|
+
|
|
379
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
380
|
+
|
|
381
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
382
|
+
REASON_FIELD_NUMBER: builtins.int
|
|
383
|
+
VARIANT_FIELD_NUMBER: builtins.int
|
|
384
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
385
|
+
reason: builtins.str
|
|
386
|
+
"""The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details"""
|
|
387
|
+
variant: builtins.str
|
|
388
|
+
"""The variant name of the returned flag value."""
|
|
389
|
+
@property
|
|
390
|
+
def value(self) -> google.protobuf.struct_pb2.Struct:
|
|
391
|
+
"""The response value of the object flag evaluation, will be unset in the case of error.
|
|
392
|
+
|
|
393
|
+
NOTE: This structure will need to be decoded from google/protobuf/struct.proto before it is returned to the SDK
|
|
394
|
+
"""
|
|
395
|
+
|
|
396
|
+
@property
|
|
397
|
+
def metadata(self) -> google.protobuf.struct_pb2.Struct:
|
|
398
|
+
"""Metadata for this evaluation"""
|
|
399
|
+
|
|
400
|
+
def __init__(
|
|
401
|
+
self,
|
|
402
|
+
*,
|
|
403
|
+
value: google.protobuf.struct_pb2.Struct | None = ...,
|
|
404
|
+
reason: builtins.str = ...,
|
|
405
|
+
variant: builtins.str = ...,
|
|
406
|
+
metadata: google.protobuf.struct_pb2.Struct | None = ...,
|
|
407
|
+
) -> None: ...
|
|
408
|
+
def HasField(self, field_name: typing.Literal["metadata", b"metadata", "value", b"value"]) -> builtins.bool: ...
|
|
409
|
+
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
410
|
+
|
|
411
|
+
global___ResolveObjectResponse = ResolveObjectResponse
|
|
412
|
+
|
|
413
|
+
@typing.final
|
|
414
|
+
class EventStreamResponse(google.protobuf.message.Message):
|
|
415
|
+
"""Response body for the EventStream stream response"""
|
|
416
|
+
|
|
417
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
418
|
+
|
|
419
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
420
|
+
DATA_FIELD_NUMBER: builtins.int
|
|
421
|
+
type: builtins.str
|
|
422
|
+
"""String key indicating the type of event that is being received, for example, provider_ready or configuration_change"""
|
|
423
|
+
@property
|
|
424
|
+
def data(self) -> google.protobuf.struct_pb2.Struct:
|
|
425
|
+
"""Object structure for use when sending relevant metadata to provide context to the event.
|
|
426
|
+
Can be left unset when it is not required.
|
|
427
|
+
"""
|
|
428
|
+
|
|
429
|
+
def __init__(
|
|
430
|
+
self,
|
|
431
|
+
*,
|
|
432
|
+
type: builtins.str = ...,
|
|
433
|
+
data: google.protobuf.struct_pb2.Struct | None = ...,
|
|
434
|
+
) -> None: ...
|
|
435
|
+
def HasField(self, field_name: typing.Literal["data", b"data"]) -> builtins.bool: ...
|
|
436
|
+
def ClearField(self, field_name: typing.Literal["data", b"data", "type", b"type"]) -> None: ...
|
|
437
|
+
|
|
438
|
+
global___EventStreamResponse = EventStreamResponse
|
|
439
|
+
|
|
440
|
+
@typing.final
|
|
441
|
+
class EventStreamRequest(google.protobuf.message.Message):
|
|
442
|
+
"""Empty stream request body"""
|
|
443
|
+
|
|
444
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
445
|
+
|
|
446
|
+
def __init__(
|
|
447
|
+
self,
|
|
448
|
+
) -> None: ...
|
|
449
|
+
|
|
450
|
+
global___EventStreamRequest = EventStreamRequest
|