@@ -137,11 +137,10 @@ def analyze(self,
137
137
params = {'version' : self .version }
138
138
139
139
form_data = []
140
- for item in collection_ids :
141
- form_data .append (
142
- ('collection_ids' , (None , item , 'application/json' )))
143
- for item in features :
144
- form_data .append (('features' , (None , item , 'application/json' )))
140
+ collection_ids = self ._convert_list (collection_ids )
141
+ form_data .append (('collection_ids' , (None , collection_ids , 'text/plain' )))
142
+ features = self ._convert_list (features )
143
+ form_data .append (('features' , (None , features , 'text/plain' )))
145
144
if images_file :
146
145
for item in images_file :
147
146
form_data .append (('images_file' , (item .filename , item .data ,
@@ -3144,18 +3143,18 @@ class UpdateObjectMetadata():
3144
3143
:attr str object: The updated name of the object. The name can contain
3145
3144
alphanumeric, underscore, hyphen, space, and dot characters. It cannot begin
3146
3145
with the reserved prefix `sys-`.
3147
- :attr int count: (optional) Number of bounding boxes in the collection with the
3146
+ :attr int count: Number of bounding boxes in the collection with the
3148
3147
updated object name.
3149
3148
"""
3150
3149
3151
- def __init__ (self , object : str , * , count : int = None ) -> None :
3150
+ def __init__ (self , object : str , count : int ) -> None :
3152
3151
"""
3153
3152
Initialize a UpdateObjectMetadata object.
3154
3153
3155
3154
:param str object: The updated name of the object. The name can contain
3156
3155
alphanumeric, underscore, hyphen, space, and dot characters. It cannot
3157
3156
begin with the reserved prefix `sys-`.
3158
- :param int count: (optional) Number of bounding boxes in the collection
3157
+ :param int count: Number of bounding boxes in the collection
3159
3158
with the updated object name.
3160
3159
"""
3161
3160
self .object = object
@@ -3179,6 +3178,10 @@ def from_dict(cls, _dict: Dict) -> 'UpdateObjectMetadata':
3179
3178
)
3180
3179
if 'count' in _dict :
3181
3180
args ['count' ] = _dict .get ('count' )
3181
+ else :
3182
+ raise ValueError (
3183
+ 'Required property \' count\' not present in UpdateObjectMetadata JSON'
3184
+ )
3182
3185
return cls (** args )
3183
3186
3184
3187
@classmethod
0 commit comments