@@ -10204,6 +10204,71 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
10204
10204
10205
10205
UploadSessionStartArg_validator = bv .Struct (UploadSessionStartArg )
10206
10206
10207
+ class UploadSessionStartBatchArg (bb .Struct ):
10208
+ """
10209
+ :ivar files.UploadSessionStartBatchArg.session_type: Type of upload session
10210
+ you want to start. If not specified, default is
10211
+ ``UploadSessionType.sequential``.
10212
+ :ivar files.UploadSessionStartBatchArg.num_sessions: The number of upload
10213
+ sessions to start.
10214
+ """
10215
+
10216
+ __slots__ = [
10217
+ '_session_type_value' ,
10218
+ '_num_sessions_value' ,
10219
+ ]
10220
+
10221
+ _has_required_fields = True
10222
+
10223
+ def __init__ (self ,
10224
+ num_sessions = None ,
10225
+ session_type = None ):
10226
+ self ._session_type_value = bb .NOT_SET
10227
+ self ._num_sessions_value = bb .NOT_SET
10228
+ if session_type is not None :
10229
+ self .session_type = session_type
10230
+ if num_sessions is not None :
10231
+ self .num_sessions = num_sessions
10232
+
10233
+ # Instance attribute type: UploadSessionType (validator is set below)
10234
+ session_type = bb .Attribute ("session_type" , nullable = True , user_defined = True )
10235
+
10236
+ # Instance attribute type: int (validator is set below)
10237
+ num_sessions = bb .Attribute ("num_sessions" )
10238
+
10239
+ def _process_custom_annotations (self , annotation_type , field_path , processor ):
10240
+ super (UploadSessionStartBatchArg , self )._process_custom_annotations (annotation_type , field_path , processor )
10241
+
10242
+ UploadSessionStartBatchArg_validator = bv .Struct (UploadSessionStartBatchArg )
10243
+
10244
+ class UploadSessionStartBatchResult (bb .Struct ):
10245
+ """
10246
+ :ivar files.UploadSessionStartBatchResult.session_ids: A List of unique
10247
+ identifiers for the upload session. Pass each session_id to
10248
+ :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_append` and
10249
+ :meth:`dropbox.dropbox_client.Dropbox.files_upload_session_finish`.
10250
+ """
10251
+
10252
+ __slots__ = [
10253
+ '_session_ids_value' ,
10254
+ ]
10255
+
10256
+ _has_required_fields = True
10257
+
10258
+ def __init__ (self ,
10259
+ session_ids = None ):
10260
+ self ._session_ids_value = bb .NOT_SET
10261
+ if session_ids is not None :
10262
+ self .session_ids = session_ids
10263
+
10264
+ # Instance attribute type: list of [str] (validator is set below)
10265
+ session_ids = bb .Attribute ("session_ids" )
10266
+
10267
+ def _process_custom_annotations (self , annotation_type , field_path , processor ):
10268
+ super (UploadSessionStartBatchResult , self )._process_custom_annotations (annotation_type , field_path , processor )
10269
+
10270
+ UploadSessionStartBatchResult_validator = bv .Struct (UploadSessionStartBatchResult )
10271
+
10207
10272
class UploadSessionStartError (bb .Union ):
10208
10273
"""
10209
10274
This class acts as a tagged union. Only one of the ``is_*`` methods will
@@ -13015,6 +13080,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
13015
13080
('content_hash' , UploadSessionStartArg .content_hash .validator ),
13016
13081
]
13017
13082
13083
+ UploadSessionStartBatchArg .session_type .validator = bv .Nullable (UploadSessionType_validator )
13084
+ UploadSessionStartBatchArg .num_sessions .validator = bv .UInt64 (min_value = 1 , max_value = 1000 )
13085
+ UploadSessionStartBatchArg ._all_field_names_ = set ([
13086
+ 'session_type' ,
13087
+ 'num_sessions' ,
13088
+ ])
13089
+ UploadSessionStartBatchArg ._all_fields_ = [
13090
+ ('session_type' , UploadSessionStartBatchArg .session_type .validator ),
13091
+ ('num_sessions' , UploadSessionStartBatchArg .num_sessions .validator ),
13092
+ ]
13093
+
13094
+ UploadSessionStartBatchResult .session_ids .validator = bv .List (bv .String ())
13095
+ UploadSessionStartBatchResult ._all_field_names_ = set (['session_ids' ])
13096
+ UploadSessionStartBatchResult ._all_fields_ = [('session_ids' , UploadSessionStartBatchResult .session_ids .validator )]
13097
+
13018
13098
UploadSessionStartError ._concurrent_session_data_not_allowed_validator = bv .Void ()
13019
13099
UploadSessionStartError ._concurrent_session_close_not_allowed_validator = bv .Void ()
13020
13100
UploadSessionStartError ._payload_too_large_validator = bv .Void ()
@@ -13922,6 +14002,17 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
13922
14002
'host' : 'content' ,
13923
14003
'style' : 'upload' },
13924
14004
)
14005
+ upload_session_start_batch = bb .Route (
14006
+ 'upload_session/start_batch' ,
14007
+ 1 ,
14008
+ False ,
14009
+ UploadSessionStartBatchArg_validator ,
14010
+ UploadSessionStartBatchResult_validator ,
14011
+ bv .Void (),
14012
+ {'auth' : 'user' ,
14013
+ 'host' : 'api' ,
14014
+ 'style' : 'rpc' },
14015
+ )
13925
14016
13926
14017
ROUTES = {
13927
14018
'alpha/get_metadata' : alpha_get_metadata ,
@@ -13992,5 +14083,6 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
13992
14083
'upload_session/finish_batch:2' : upload_session_finish_batch_v2 ,
13993
14084
'upload_session/finish_batch/check' : upload_session_finish_batch_check ,
13994
14085
'upload_session/start' : upload_session_start ,
14086
+ 'upload_session/start_batch' : upload_session_start_batch ,
13995
14087
}
13996
14088
0 commit comments