8
8
Generated by: https://openapi-generator.tech
9
9
"""
10
10
11
-
12
11
import re # noqa: F401
13
12
import sys # noqa: F401
14
13
25
24
file_type ,
26
25
none_type ,
27
26
validate_get_composed_info ,
28
- OpenApiModel
27
+ OpenApiModel ,
29
28
)
30
29
from groundlight_openapi_client .exceptions import ApiAttributeError
31
30
@@ -34,9 +33,10 @@ def lazy_import():
34
33
from groundlight_openapi_client .model .blank_enum import BlankEnum
35
34
from groundlight_openapi_client .model .escalation_type_enum import EscalationTypeEnum
36
35
from groundlight_openapi_client .model .status_enum import StatusEnum
37
- globals ()['BlankEnum' ] = BlankEnum
38
- globals ()['EscalationTypeEnum' ] = EscalationTypeEnum
39
- globals ()['StatusEnum' ] = StatusEnum
36
+
37
+ globals ()["BlankEnum" ] = BlankEnum
38
+ globals ()["EscalationTypeEnum" ] = EscalationTypeEnum
39
+ globals ()["StatusEnum" ] = StatusEnum
40
40
41
41
42
42
class PatchedDetectorRequest (ModelNormal ):
@@ -63,21 +63,20 @@ class PatchedDetectorRequest(ModelNormal):
63
63
as additional properties values.
64
64
"""
65
65
66
- allowed_values = {
67
- }
66
+ allowed_values = {}
68
67
69
68
validations = {
70
- (' name' ,): {
71
- ' max_length' : 200 ,
72
- ' min_length' : 1 ,
69
+ (" name" ,): {
70
+ " max_length" : 200 ,
71
+ " min_length" : 1 ,
73
72
},
74
- (' confidence_threshold' ,): {
75
- ' inclusive_maximum' : 1.0 ,
76
- ' inclusive_minimum' : 0.0 ,
73
+ (" confidence_threshold" ,): {
74
+ " inclusive_maximum" : 1.0 ,
75
+ " inclusive_minimum" : 0.0 ,
77
76
},
78
- (' patience_time' ,): {
79
- ' inclusive_maximum' : 3600 ,
80
- ' inclusive_minimum' : 0 ,
77
+ (" patience_time" ,): {
78
+ " inclusive_maximum" : 3600 ,
79
+ " inclusive_minimum" : 0 ,
81
80
},
82
81
}
83
82
@@ -88,7 +87,17 @@ def additional_properties_type():
88
87
of type self, this must run after the class is loaded
89
88
"""
90
89
lazy_import ()
91
- return (bool , date , datetime , dict , float , int , list , str , none_type ,) # noqa: E501
90
+ return (
91
+ bool ,
92
+ date ,
93
+ datetime ,
94
+ dict ,
95
+ float ,
96
+ int ,
97
+ list ,
98
+ str ,
99
+ none_type ,
100
+ ) # noqa: E501
92
101
93
102
_nullable = False
94
103
@@ -104,28 +113,46 @@ def openapi_types():
104
113
"""
105
114
lazy_import ()
106
115
return {
107
- 'name' : (str ,), # noqa: E501
108
- 'confidence_threshold' : (float ,), # noqa: E501
109
- 'patience_time' : (float ,), # noqa: E501
110
- 'status' : (bool , date , datetime , dict , float , int , list , str , none_type ,), # noqa: E501
111
- 'escalation_type' : (bool , date , datetime , dict , float , int , list , str , none_type ,), # noqa: E501
116
+ "name" : (str ,), # noqa: E501
117
+ "confidence_threshold" : (float ,), # noqa: E501
118
+ "patience_time" : (float ,), # noqa: E501
119
+ "status" : (
120
+ bool ,
121
+ date ,
122
+ datetime ,
123
+ dict ,
124
+ float ,
125
+ int ,
126
+ list ,
127
+ str ,
128
+ none_type ,
129
+ ), # noqa: E501
130
+ "escalation_type" : (
131
+ bool ,
132
+ date ,
133
+ datetime ,
134
+ dict ,
135
+ float ,
136
+ int ,
137
+ list ,
138
+ str ,
139
+ none_type ,
140
+ ), # noqa: E501
112
141
}
113
142
114
143
@cached_property
115
144
def discriminator ():
116
145
return None
117
146
118
-
119
147
attribute_map = {
120
- ' name' : ' name' , # noqa: E501
121
- ' confidence_threshold' : ' confidence_threshold' , # noqa: E501
122
- ' patience_time' : ' patience_time' , # noqa: E501
123
- ' status' : ' status' , # noqa: E501
124
- ' escalation_type' : ' escalation_type' , # noqa: E501
148
+ " name" : " name" , # noqa: E501
149
+ " confidence_threshold" : " confidence_threshold" , # noqa: E501
150
+ " patience_time" : " patience_time" , # noqa: E501
151
+ " status" : " status" , # noqa: E501
152
+ " escalation_type" : " escalation_type" , # noqa: E501
125
153
}
126
154
127
- read_only_vars = {
128
- }
155
+ read_only_vars = {}
129
156
130
157
_composed_schemas = {}
131
158
@@ -172,17 +199,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
172
199
escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501
173
200
"""
174
201
175
- _check_type = kwargs .pop (' _check_type' , True )
176
- _spec_property_naming = kwargs .pop (' _spec_property_naming' , False )
177
- _path_to_item = kwargs .pop (' _path_to_item' , ())
178
- _configuration = kwargs .pop (' _configuration' , None )
179
- _visited_composed_classes = kwargs .pop (' _visited_composed_classes' , ())
202
+ _check_type = kwargs .pop (" _check_type" , True )
203
+ _spec_property_naming = kwargs .pop (" _spec_property_naming" , False )
204
+ _path_to_item = kwargs .pop (" _path_to_item" , ())
205
+ _configuration = kwargs .pop (" _configuration" , None )
206
+ _visited_composed_classes = kwargs .pop (" _visited_composed_classes" , ())
180
207
181
208
self = super (OpenApiModel , cls ).__new__ (cls )
182
209
183
210
if args :
184
211
raise ApiTypeError (
185
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
212
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
213
+ % (
186
214
args ,
187
215
self .__class__ .__name__ ,
188
216
),
@@ -198,22 +226,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
198
226
self ._visited_composed_classes = _visited_composed_classes + (self .__class__ ,)
199
227
200
228
for var_name , var_value in kwargs .items ():
201
- if var_name not in self .attribute_map and \
202
- self ._configuration is not None and \
203
- self ._configuration .discard_unknown_keys and \
204
- self .additional_properties_type is None :
229
+ if (
230
+ var_name not in self .attribute_map
231
+ and self ._configuration is not None
232
+ and self ._configuration .discard_unknown_keys
233
+ and self .additional_properties_type is None
234
+ ):
205
235
# discard variable.
206
236
continue
207
237
setattr (self , var_name , var_value )
208
238
return self
209
239
210
240
required_properties = set ([
211
- ' _data_store' ,
212
- ' _check_type' ,
213
- ' _spec_property_naming' ,
214
- ' _path_to_item' ,
215
- ' _configuration' ,
216
- ' _visited_composed_classes' ,
241
+ " _data_store" ,
242
+ " _check_type" ,
243
+ " _spec_property_naming" ,
244
+ " _path_to_item" ,
245
+ " _configuration" ,
246
+ " _visited_composed_classes" ,
217
247
])
218
248
219
249
@convert_js_args_to_python_args
@@ -258,15 +288,16 @@ def __init__(self, *args, **kwargs): # noqa: E501
258
288
escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501
259
289
"""
260
290
261
- _check_type = kwargs .pop (' _check_type' , True )
262
- _spec_property_naming = kwargs .pop (' _spec_property_naming' , False )
263
- _path_to_item = kwargs .pop (' _path_to_item' , ())
264
- _configuration = kwargs .pop (' _configuration' , None )
265
- _visited_composed_classes = kwargs .pop (' _visited_composed_classes' , ())
291
+ _check_type = kwargs .pop (" _check_type" , True )
292
+ _spec_property_naming = kwargs .pop (" _spec_property_naming" , False )
293
+ _path_to_item = kwargs .pop (" _path_to_item" , ())
294
+ _configuration = kwargs .pop (" _configuration" , None )
295
+ _visited_composed_classes = kwargs .pop (" _visited_composed_classes" , ())
266
296
267
297
if args :
268
298
raise ApiTypeError (
269
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
299
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
300
+ % (
270
301
args ,
271
302
self .__class__ .__name__ ,
272
303
),
@@ -282,13 +313,17 @@ def __init__(self, *args, **kwargs): # noqa: E501
282
313
self ._visited_composed_classes = _visited_composed_classes + (self .__class__ ,)
283
314
284
315
for var_name , var_value in kwargs .items ():
285
- if var_name not in self .attribute_map and \
286
- self ._configuration is not None and \
287
- self ._configuration .discard_unknown_keys and \
288
- self .additional_properties_type is None :
316
+ if (
317
+ var_name not in self .attribute_map
318
+ and self ._configuration is not None
319
+ and self ._configuration .discard_unknown_keys
320
+ and self .additional_properties_type is None
321
+ ):
289
322
# discard variable.
290
323
continue
291
324
setattr (self , var_name , var_value )
292
325
if var_name in self .read_only_vars :
293
- raise ApiAttributeError (f"`{ var_name } ` is a read-only attribute. Use `from_openapi_data` to instantiate "
294
- f"class with read only attributes." )
326
+ raise ApiAttributeError (
327
+ f"`{ var_name } ` is a read-only attribute. Use `from_openapi_data` to instantiate "
328
+ "class with read only attributes."
329
+ )
0 commit comments