77from stone .backends .python_rsrc import stone_base as bb
88from stone .backends .python_rsrc import stone_validators as bv
99
10-
1110class LaunchResultBase (bb .Union ):
1211 """
1312 Result returned by methods that launch an asynchronous job. A method who may
@@ -37,15 +36,15 @@ def async_job_id(cls, val):
3736 :param str val:
3837 :rtype: LaunchResultBase
3938 """
40- return cls (" async_job_id" , val )
39+ return cls (' async_job_id' , val )
4140
4241 def is_async_job_id (self ):
4342 """
4443 Check if the union tag is ``async_job_id``.
4544
4645 :rtype: bool
4746 """
48- return self ._tag == " async_job_id"
47+ return self ._tag == ' async_job_id'
4948
5049 def get_async_job_id (self ):
5150 """
@@ -61,14 +60,10 @@ def get_async_job_id(self):
6160 return self ._value
6261
6362 def _process_custom_annotations (self , annotation_type , field_path , processor ):
64- super (LaunchResultBase , self )._process_custom_annotations (
65- annotation_type , field_path , processor
66- )
67-
63+ super (LaunchResultBase , self )._process_custom_annotations (annotation_type , field_path , processor )
6864
6965LaunchResultBase_validator = bv .Union (LaunchResultBase )
7066
71-
7267class LaunchEmptyResult (LaunchResultBase ):
7368 """
7469 Result returned by methods that may either launch an asynchronous job or
@@ -92,17 +87,13 @@ def is_complete(self):
9287
9388 :rtype: bool
9489 """
95- return self ._tag == " complete"
90+ return self ._tag == ' complete'
9691
9792 def _process_custom_annotations (self , annotation_type , field_path , processor ):
98- super (LaunchEmptyResult , self )._process_custom_annotations (
99- annotation_type , field_path , processor
100- )
101-
93+ super (LaunchEmptyResult , self )._process_custom_annotations (annotation_type , field_path , processor )
10294
10395LaunchEmptyResult_validator = bv .Union (LaunchEmptyResult )
10496
105-
10697class PollArg (bb .Struct ):
10798 """
10899 Arguments for methods that poll the status of an asynchronous job.
@@ -113,12 +104,13 @@ class PollArg(bb.Struct):
113104 """
114105
115106 __slots__ = [
116- " _async_job_id_value" ,
107+ ' _async_job_id_value' ,
117108 ]
118109
119110 _has_required_fields = True
120111
121- def __init__ (self , async_job_id = None ):
112+ def __init__ (self ,
113+ async_job_id = None ):
122114 self ._async_job_id_value = bb .NOT_SET
123115 if async_job_id is not None :
124116 self .async_job_id = async_job_id
@@ -129,10 +121,8 @@ def __init__(self, async_job_id=None):
129121 def _process_custom_annotations (self , annotation_type , field_path , processor ):
130122 super (PollArg , self )._process_custom_annotations (annotation_type , field_path , processor )
131123
132-
133124PollArg_validator = bv .Struct (PollArg )
134125
135-
136126class PollResultBase (bb .Union ):
137127 """
138128 Result returned by methods that poll for the status of an asynchronous job.
@@ -158,17 +148,13 @@ def is_in_progress(self):
158148
159149 :rtype: bool
160150 """
161- return self ._tag == " in_progress"
151+ return self ._tag == ' in_progress'
162152
163153 def _process_custom_annotations (self , annotation_type , field_path , processor ):
164- super (PollResultBase , self )._process_custom_annotations (
165- annotation_type , field_path , processor
166- )
167-
154+ super (PollResultBase , self )._process_custom_annotations (annotation_type , field_path , processor )
168155
169156PollResultBase_validator = bv .Union (PollResultBase )
170157
171-
172158class PollEmptyResult (PollResultBase ):
173159 """
174160 Result returned by methods that poll for the status of an asynchronous job.
@@ -191,17 +177,13 @@ def is_complete(self):
191177
192178 :rtype: bool
193179 """
194- return self ._tag == " complete"
180+ return self ._tag == ' complete'
195181
196182 def _process_custom_annotations (self , annotation_type , field_path , processor ):
197- super (PollEmptyResult , self )._process_custom_annotations (
198- annotation_type , field_path , processor
199- )
200-
183+ super (PollEmptyResult , self )._process_custom_annotations (annotation_type , field_path , processor )
201184
202185PollEmptyResult_validator = bv .Union (PollEmptyResult )
203186
204-
205187class PollError (bb .Union ):
206188 """
207189 Error returned by methods for polling the status of asynchronous job.
@@ -218,7 +200,7 @@ class PollError(bb.Union):
218200 This should happen very rarely.
219201 """
220202
221- _catch_all = " other"
203+ _catch_all = ' other'
222204 # Attribute is overwritten below the class definition
223205 invalid_async_job_id = None
224206 # Attribute is overwritten below the class definition
@@ -232,74 +214,75 @@ def is_invalid_async_job_id(self):
232214
233215 :rtype: bool
234216 """
235- return self ._tag == " invalid_async_job_id"
217+ return self ._tag == ' invalid_async_job_id'
236218
237219 def is_internal_error (self ):
238220 """
239221 Check if the union tag is ``internal_error``.
240222
241223 :rtype: bool
242224 """
243- return self ._tag == " internal_error"
225+ return self ._tag == ' internal_error'
244226
245227 def is_other (self ):
246228 """
247229 Check if the union tag is ``other``.
248230
249231 :rtype: bool
250232 """
251- return self ._tag == " other"
233+ return self ._tag == ' other'
252234
253235 def _process_custom_annotations (self , annotation_type , field_path , processor ):
254236 super (PollError , self )._process_custom_annotations (annotation_type , field_path , processor )
255237
256-
257238PollError_validator = bv .Union (PollError )
258239
259240AsyncJobId_validator = bv .String (min_length = 1 )
260241LaunchResultBase ._async_job_id_validator = AsyncJobId_validator
261242LaunchResultBase ._tagmap = {
262- " async_job_id" : LaunchResultBase ._async_job_id_validator ,
243+ ' async_job_id' : LaunchResultBase ._async_job_id_validator ,
263244}
264245
265246LaunchEmptyResult ._complete_validator = bv .Void ()
266247LaunchEmptyResult ._tagmap = {
267- " complete" : LaunchEmptyResult ._complete_validator ,
248+ ' complete' : LaunchEmptyResult ._complete_validator ,
268249}
269250LaunchEmptyResult ._tagmap .update (LaunchResultBase ._tagmap )
270251
271- LaunchEmptyResult .complete = LaunchEmptyResult (" complete" )
252+ LaunchEmptyResult .complete = LaunchEmptyResult (' complete' )
272253
273254PollArg .async_job_id .validator = AsyncJobId_validator
274- PollArg ._all_field_names_ = set ([" async_job_id" ])
275- PollArg ._all_fields_ = [(" async_job_id" , PollArg .async_job_id .validator )]
255+ PollArg ._all_field_names_ = set ([' async_job_id' ])
256+ PollArg ._all_fields_ = [(' async_job_id' , PollArg .async_job_id .validator )]
276257
277258PollResultBase ._in_progress_validator = bv .Void ()
278259PollResultBase ._tagmap = {
279- " in_progress" : PollResultBase ._in_progress_validator ,
260+ ' in_progress' : PollResultBase ._in_progress_validator ,
280261}
281262
282- PollResultBase .in_progress = PollResultBase (" in_progress" )
263+ PollResultBase .in_progress = PollResultBase (' in_progress' )
283264
284265PollEmptyResult ._complete_validator = bv .Void ()
285266PollEmptyResult ._tagmap = {
286- " complete" : PollEmptyResult ._complete_validator ,
267+ ' complete' : PollEmptyResult ._complete_validator ,
287268}
288269PollEmptyResult ._tagmap .update (PollResultBase ._tagmap )
289270
290- PollEmptyResult .complete = PollEmptyResult (" complete" )
271+ PollEmptyResult .complete = PollEmptyResult (' complete' )
291272
292273PollError ._invalid_async_job_id_validator = bv .Void ()
293274PollError ._internal_error_validator = bv .Void ()
294275PollError ._other_validator = bv .Void ()
295276PollError ._tagmap = {
296- " invalid_async_job_id" : PollError ._invalid_async_job_id_validator ,
297- " internal_error" : PollError ._internal_error_validator ,
298- " other" : PollError ._other_validator ,
277+ ' invalid_async_job_id' : PollError ._invalid_async_job_id_validator ,
278+ ' internal_error' : PollError ._internal_error_validator ,
279+ ' other' : PollError ._other_validator ,
299280}
300281
301- PollError .invalid_async_job_id = PollError ("invalid_async_job_id" )
302- PollError .internal_error = PollError ("internal_error" )
303- PollError .other = PollError ("other" )
282+ PollError .invalid_async_job_id = PollError ('invalid_async_job_id' )
283+ PollError .internal_error = PollError ('internal_error' )
284+ PollError .other = PollError ('other' )
285+
286+ ROUTES = {
287+ }
304288
305- ROUTES = {}
0 commit comments