@@ -101,6 +101,9 @@ def get_paper_access_denied(self):
101101 raise AttributeError ("tag 'paper_access_denied' not set" )
102102 return self ._value
103103
104+ def _process_custom_annotations (self , annotation_type , processor ):
105+ super (AccessError , self )._process_custom_annotations (annotation_type , processor )
106+
104107 def __repr__ (self ):
105108 return 'AccessError(%r, %r)' % (self ._tag , self ._value )
106109
@@ -120,6 +123,7 @@ class AuthError(bb.Union):
120123 :ivar invalid_select_admin: The user specified in 'Dropbox-API-Select-Admin'
121124 is not a Dropbox Business team admin.
122125 :ivar user_suspended: The user has been suspended.
126+ :ivar expired_access_token: The access token has expired.
123127 """
124128
125129 _catch_all = 'other'
@@ -132,6 +136,8 @@ class AuthError(bb.Union):
132136 # Attribute is overwritten below the class definition
133137 user_suspended = None
134138 # Attribute is overwritten below the class definition
139+ expired_access_token = None
140+ # Attribute is overwritten below the class definition
135141 other = None
136142
137143 def is_invalid_access_token (self ):
@@ -166,6 +172,14 @@ def is_user_suspended(self):
166172 """
167173 return self ._tag == 'user_suspended'
168174
175+ def is_expired_access_token (self ):
176+ """
177+ Check if the union tag is ``expired_access_token``.
178+
179+ :rtype: bool
180+ """
181+ return self ._tag == 'expired_access_token'
182+
169183 def is_other (self ):
170184 """
171185 Check if the union tag is ``other``.
@@ -174,6 +188,9 @@ def is_other(self):
174188 """
175189 return self ._tag == 'other'
176190
191+ def _process_custom_annotations (self , annotation_type , processor ):
192+ super (AuthError , self )._process_custom_annotations (annotation_type , processor )
193+
177194 def __repr__ (self ):
178195 return 'AuthError(%r, %r)' % (self ._tag , self ._value )
179196
@@ -223,6 +240,9 @@ def is_other(self):
223240 """
224241 return self ._tag == 'other'
225242
243+ def _process_custom_annotations (self , annotation_type , processor ):
244+ super (InvalidAccountTypeError , self )._process_custom_annotations (annotation_type , processor )
245+
226246 def __repr__ (self ):
227247 return 'InvalidAccountTypeError(%r, %r)' % (self ._tag , self ._value )
228248
@@ -270,12 +290,15 @@ def is_other(self):
270290 """
271291 return self ._tag == 'other'
272292
293+ def _process_custom_annotations (self , annotation_type , processor ):
294+ super (PaperAccessError , self )._process_custom_annotations (annotation_type , processor )
295+
273296 def __repr__ (self ):
274297 return 'PaperAccessError(%r, %r)' % (self ._tag , self ._value )
275298
276299PaperAccessError_validator = bv .Union (PaperAccessError )
277300
278- class RateLimitError (object ):
301+ class RateLimitError (bb . Struct ):
279302 """
280303 Error occurred because the app is being rate limited.
281304
@@ -352,6 +375,9 @@ def retry_after(self):
352375 self ._retry_after_value = None
353376 self ._retry_after_present = False
354377
378+ def _process_custom_annotations (self , annotation_type , processor ):
379+ super (RateLimitError , self )._process_custom_annotations (annotation_type , processor )
380+
355381 def __repr__ (self ):
356382 return 'RateLimitError(reason={!r}, retry_after={!r})' .format (
357383 self ._reason_value ,
@@ -404,12 +430,15 @@ def is_other(self):
404430 """
405431 return self ._tag == 'other'
406432
433+ def _process_custom_annotations (self , annotation_type , processor ):
434+ super (RateLimitReason , self )._process_custom_annotations (annotation_type , processor )
435+
407436 def __repr__ (self ):
408437 return 'RateLimitReason(%r, %r)' % (self ._tag , self ._value )
409438
410439RateLimitReason_validator = bv .Union (RateLimitReason )
411440
412- class TokenFromOAuth1Arg (object ):
441+ class TokenFromOAuth1Arg (bb . Struct ):
413442 """
414443 :ivar oauth1_token: The supplied OAuth 1.0 access token.
415444 :ivar oauth1_token_secret: The token secret associated with the supplied
@@ -483,6 +512,9 @@ def oauth1_token_secret(self):
483512 self ._oauth1_token_secret_value = None
484513 self ._oauth1_token_secret_present = False
485514
515+ def _process_custom_annotations (self , annotation_type , processor ):
516+ super (TokenFromOAuth1Arg , self )._process_custom_annotations (annotation_type , processor )
517+
486518 def __repr__ (self ):
487519 return 'TokenFromOAuth1Arg(oauth1_token={!r}, oauth1_token_secret={!r})' .format (
488520 self ._oauth1_token_value ,
@@ -535,12 +567,15 @@ def is_other(self):
535567 """
536568 return self ._tag == 'other'
537569
570+ def _process_custom_annotations (self , annotation_type , processor ):
571+ super (TokenFromOAuth1Error , self )._process_custom_annotations (annotation_type , processor )
572+
538573 def __repr__ (self ):
539574 return 'TokenFromOAuth1Error(%r, %r)' % (self ._tag , self ._value )
540575
541576TokenFromOAuth1Error_validator = bv .Union (TokenFromOAuth1Error )
542577
543- class TokenFromOAuth1Result (object ):
578+ class TokenFromOAuth1Result (bb . Struct ):
544579 """
545580 :ivar oauth2_token: The OAuth 2.0 token generated from the supplied OAuth
546581 1.0 token.
@@ -583,6 +618,9 @@ def oauth2_token(self):
583618 self ._oauth2_token_value = None
584619 self ._oauth2_token_present = False
585620
621+ def _process_custom_annotations (self , annotation_type , processor ):
622+ super (TokenFromOAuth1Result , self )._process_custom_annotations (annotation_type , processor )
623+
586624 def __repr__ (self ):
587625 return 'TokenFromOAuth1Result(oauth2_token={!r})' .format (
588626 self ._oauth2_token_value ,
@@ -605,19 +643,22 @@ def __repr__(self):
605643AuthError ._invalid_select_user_validator = bv .Void ()
606644AuthError ._invalid_select_admin_validator = bv .Void ()
607645AuthError ._user_suspended_validator = bv .Void ()
646+ AuthError ._expired_access_token_validator = bv .Void ()
608647AuthError ._other_validator = bv .Void ()
609648AuthError ._tagmap = {
610649 'invalid_access_token' : AuthError ._invalid_access_token_validator ,
611650 'invalid_select_user' : AuthError ._invalid_select_user_validator ,
612651 'invalid_select_admin' : AuthError ._invalid_select_admin_validator ,
613652 'user_suspended' : AuthError ._user_suspended_validator ,
653+ 'expired_access_token' : AuthError ._expired_access_token_validator ,
614654 'other' : AuthError ._other_validator ,
615655}
616656
617657AuthError .invalid_access_token = AuthError ('invalid_access_token' )
618658AuthError .invalid_select_user = AuthError ('invalid_select_user' )
619659AuthError .invalid_select_admin = AuthError ('invalid_select_admin' )
620660AuthError .user_suspended = AuthError ('user_suspended' )
661+ AuthError .expired_access_token = AuthError ('expired_access_token' )
621662AuthError .other = AuthError ('other' )
622663
623664InvalidAccountTypeError ._endpoint_validator = bv .Void ()
0 commit comments