-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathasset.py
More file actions
641 lines (603 loc) · 33.1 KB
/
Copy pathasset.py
File metadata and controls
641 lines (603 loc) · 33.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
"""
Shotstack
Official Python SDK for the Shotstack Cloud Video Editing API
The version of the OpenAPI document: v1
Contact: pypi@shotstack.io
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from shotstack_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from shotstack_sdk.exceptions import ApiAttributeError
def lazy_import():
AudioAsset
AudioAssetVolume
Border
CaptionAsset
CaptionMargin
ChromaKey
Crop
Html5Asset
HtmlAsset
ImageAsset
ImageToVideoAsset
LumaAsset
Offset
RichCaptionActive
RichCaptionAnimation
RichCaptionAsset
RichCaptionAssetFont
RichCaptionAssetPadding
RichTextAlignment
RichTextAsset
RichTextShadow
ShapeAsset
ShapeAssetCircle
ShapeAssetFill
ShapeAssetLine
ShapeAssetRectangle
ShapeAssetStroke
SvgAsset
TextAlignment
TextAsset
TextToImageAsset
TextToSpeechAsset
TitleAsset
VideoAsset
class Asset(ModelComposed):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
('type',): {
''video'': 'video',
''image'': 'image',
''text'': 'text',
''rich-text'': 'rich-text',
''audio'': 'audio',
''luma'': 'luma',
''caption'': 'caption',
''rich-caption'': 'rich-caption',
''html'': 'html',
''html5'': 'html5',
''title'': 'title',
''shape'': 'shape',
''svg'': 'svg',
''text-to-image'': 'text-to-image',
''image-to-video'': 'image-to-video',
''text-to-speech'': 'text-to-speech',
},
('shape',): {
''rectangle'': 'rectangle',
''circle'': 'circle',
''line'': 'line',
},
('volume_effect',): {
''none'': 'none',
''fadeIn'': 'fadeIn',
''fadeOut'': 'fadeOut',
''fadeInFadeOut'': 'fadeInFadeOut',
},
('style',): {
''minimal'': 'minimal',
''blockbuster'': 'blockbuster',
''vogue'': 'vogue',
''sketchy'': 'sketchy',
''skinny'': 'skinny',
''chunk'': 'chunk',
''chunkLight'': 'chunkLight',
''marker'': 'marker',
''future'': 'future',
''subtitle'': 'subtitle',
},
('effect',): {
''none'': 'none',
''fadeIn'': 'fadeIn',
''fadeOut'': 'fadeOut',
''fadeInFadeOut'': 'fadeInFadeOut',
},
('position',): {
''top'': 'top',
''topRight'': 'topRight',
''right'': 'right',
''bottomRight'': 'bottomRight',
''bottom'': 'bottom',
''bottomLeft'': 'bottomLeft',
''left'': 'left',
''topLeft'': 'topLeft',
''center'': 'center',
},
('size',): {
''xx-small'': 'xx-small',
''x-small'': 'x-small',
''small'': 'small',
''medium'': 'medium',
''large'': 'large',
''x-large'': 'x-large',
''xx-large'': 'xx-large',
},
('aspect_ratio',): {
''1:1'': '1:1',
''4:3'': '4:3',
''16:9'': '16:9',
''9:16'': '9:16',
''3:4'': '3:4',
''21:9'': '21:9',
''9:21'': '9:21',
},
}
validations = {
('src',): {
'min_length': 1,
},
('speed',): {
'inclusive_maximum': 10,
'inclusive_minimum': 0,
},
}
additional_properties_type = None
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'type': (str,), # noqa: E501
'src': (str,), # noqa: E501
'text': (str,), # noqa: E501
'html': (str,), # noqa: E501
'shape': (str,), # noqa: E501
'prompt': (str,), # noqa: E501
'voice': (str,), # noqa: E501
'transcode': (bool,), # noqa: E501
'trim': (float,), # noqa: E501
'volume': (AudioAssetVolume,), # noqa: E501
'volume_effect': (str,), # noqa: E501
'speed': (float,), # noqa: E501
'crop': (Crop,), # noqa: E501
'chroma_key': (ChromaKey,), # noqa: E501
'width': (int,), # noqa: E501
'height': (int,), # noqa: E501
'font': (RichCaptionAssetFont,), # noqa: E501
'background': (str,), # noqa: E501
'alignment': (TextAlignment,), # noqa: E501
'stroke': (ShapeAssetStroke,), # noqa: E501
'animation': (RichCaptionAnimation,), # noqa: E501
'ellipsis': (str,), # noqa: E501
'style': (str,), # noqa: E501
'shadow': (RichTextShadow,), # noqa: E501
'border': (Border,), # noqa: E501
'padding': (RichCaptionAssetPadding,), # noqa: E501
'align': (RichTextAlignment,), # noqa: E501
'effect': (str,), # noqa: E501
'margin': (CaptionMargin,), # noqa: E501
'active': (RichCaptionActive,), # noqa: E501
'css': (str,), # noqa: E501
'position': (str,), # noqa: E501
'js': (str,), # noqa: E501
'color': (str,), # noqa: E501
'size': (str,), # noqa: E501
'offset': (Offset,), # noqa: E501
'fill': (ShapeAssetFill,), # noqa: E501
'rectangle': (ShapeAssetRectangle,), # noqa: E501
'circle': (ShapeAssetCircle,), # noqa: E501
'line': (ShapeAssetLine,), # noqa: E501
'aspect_ratio': (str,), # noqa: E501
'language': (str,), # noqa: E501
'newscaster': (bool,), # noqa: E501
}
@cached_property
def discriminator():
lazy_import()
val = {
'audio': AudioAsset,
'caption': CaptionAsset,
'html': HtmlAsset,
'html5': Html5Asset,
'image': ImageAsset,
'image-to-video': ImageToVideoAsset,
'luma': LumaAsset,
'rich-caption': RichCaptionAsset,
'rich-text': RichTextAsset,
'shape': ShapeAsset,
'svg': SvgAsset,
'text': TextAsset,
'text-to-image': TextToImageAsset,
'text-to-speech': TextToSpeechAsset,
'title': TitleAsset,
'video': VideoAsset,
'AudioAsset': AudioAsset,
'CaptionAsset': CaptionAsset,
'Html5Asset': Html5Asset,
'HtmlAsset': HtmlAsset,
'ImageAsset': ImageAsset,
'ImageToVideoAsset': ImageToVideoAsset,
'LumaAsset': LumaAsset,
'RichCaptionAsset': RichCaptionAsset,
'RichTextAsset': RichTextAsset,
'ShapeAsset': ShapeAsset,
'SvgAsset': SvgAsset,
'TextAsset': TextAsset,
'TextToImageAsset': TextToImageAsset,
'TextToSpeechAsset': TextToSpeechAsset,
'TitleAsset': TitleAsset,
'VideoAsset': VideoAsset,
}
if not val:
return None
return {'type': val}
attribute_map = {
'type': 'type', # noqa: E501
'src': 'src', # noqa: E501
'text': 'text', # noqa: E501
'html': 'html', # noqa: E501
'shape': 'shape', # noqa: E501
'prompt': 'prompt', # noqa: E501
'voice': 'voice', # noqa: E501
'transcode': 'transcode', # noqa: E501
'trim': 'trim', # noqa: E501
'volume': 'volume', # noqa: E501
'volume_effect': 'volumeEffect', # noqa: E501
'speed': 'speed', # noqa: E501
'crop': 'crop', # noqa: E501
'chroma_key': 'chromaKey', # noqa: E501
'width': 'width', # noqa: E501
'height': 'height', # noqa: E501
'font': 'font', # noqa: E501
'background': 'background', # noqa: E501
'alignment': 'alignment', # noqa: E501
'stroke': 'stroke', # noqa: E501
'animation': 'animation', # noqa: E501
'ellipsis': 'ellipsis', # noqa: E501
'style': 'style', # noqa: E501
'shadow': 'shadow', # noqa: E501
'border': 'border', # noqa: E501
'padding': 'padding', # noqa: E501
'align': 'align', # noqa: E501
'effect': 'effect', # noqa: E501
'margin': 'margin', # noqa: E501
'active': 'active', # noqa: E501
'css': 'css', # noqa: E501
'position': 'position', # noqa: E501
'js': 'js', # noqa: E501
'color': 'color', # noqa: E501
'size': 'size', # noqa: E501
'offset': 'offset', # noqa: E501
'fill': 'fill', # noqa: E501
'rectangle': 'rectangle', # noqa: E501
'circle': 'circle', # noqa: E501
'line': 'line', # noqa: E501
'aspect_ratio': 'aspectRatio', # noqa: E501
'language': 'language', # noqa: E501
'newscaster': 'newscaster', # noqa: E501
}
read_only_vars = {
}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""Asset - a model defined in OpenAPI
Keyword Args:
type (str): The type of asset - set to `video` for videos.. defaults to 'video', must be one of ['video', 'image', 'text', 'rich-text', 'audio', 'luma', 'caption', 'rich-caption', 'html', 'html5', 'title', 'shape', 'svg', 'text-to-image', 'image-to-video', 'text-to-speech', ] # noqa: E501
src (str): The image source URL. The URL must be publicly accessible or include credentials.
text (str): The text to convert to speech.
html (str): The HTML markup for the asset.
shape (str): The shape to display.
prompt (str): The instructions for modifying the image into a video sequence.
voice (str): The voice to use for the text-to-speech conversion.
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
transcode (bool): Set to `true` to force re-encoding of the video during preprocessing. This can help resolve compatibility issues, fix rotation problems, synchronize audio, or convert formats. The video will be processed to ensure optimal compatibility with the rendering engine.. [optional] # noqa: E501
trim (float): The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the trim point. The audio will play until the file ends or the Clip length is reached.. [optional] # noqa: E501
volume (AudioAssetVolume): [optional] # noqa: E501
volume_effect (str): Preset volume effects to apply to the video asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
speed (float): Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length.. [optional] # noqa: E501
crop (Crop): [optional] # noqa: E501
chroma_key (ChromaKey): [optional] # noqa: E501
width (int): The width of the image in pixels.. [optional] # noqa: E501
height (int): The height of the image in pixels.. [optional] # noqa: E501
font (RichCaptionAssetFont): [optional] # noqa: E501
background (str): Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background.. [optional] # noqa: E501
alignment (TextAlignment): [optional] # noqa: E501
stroke (ShapeAssetStroke): [optional] # noqa: E501
animation (RichCaptionAnimation): [optional] # noqa: E501
ellipsis (str): The string to display when text overflows its bounding box. Set to an ellipsis character or custom string to indicate truncated text.. [optional] # noqa: E501
style (str): Uses a preset to apply font properties and styling to the title. <ul> <li>`minimal`</li> <li>`blockbuster`</li> <li>`vogue`</li> <li>`sketchy`</li> <li>`skinny`</li> <li>`chunk`</li> <li>`chunkLight`</li> <li>`marker`</li> <li>`future`</li> <li>`subtitle`</li> </ul>. [optional] # noqa: E501
shadow (RichTextShadow): [optional] # noqa: E501
border (Border): [optional] # noqa: E501
padding (RichCaptionAssetPadding): [optional] # noqa: E501
align (RichTextAlignment): [optional] # noqa: E501
effect (str): The effect to apply to the audio asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
margin (CaptionMargin): [optional] # noqa: E501
active (RichCaptionActive): [optional] # noqa: E501
css (str): The CSS string applied to the HTML.. [optional] # noqa: E501
position (str): Place the title in one of nine predefined positions of the viewport. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>. [optional] # noqa: E501
js (str): Optional JavaScript. Use for chart libraries, animations, or DOM manipulation. `gsap`, `d3`, `anime` and `lottie` are always available. CSS animations, transitions, and `Element.animate()` are also captured automatically. . [optional] # noqa: E501
color (str): Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.. [optional] # noqa: E501
size (str): Set the relative size of the text using predefined sizes from xx-small to xx-large. <ul> <li>`xx-small`</li> <li>`x-small`</li> <li>`small`</li> <li>`medium`</li> <li>`large`</li> <li>`x-large`</li> <li>`xx-large`</li> </ul>. [optional] # noqa: E501
offset (Offset): [optional] # noqa: E501
fill (ShapeAssetFill): [optional] # noqa: E501
rectangle (ShapeAssetRectangle): [optional] # noqa: E501
circle (ShapeAssetCircle): [optional] # noqa: E501
line (ShapeAssetLine): [optional] # noqa: E501
aspect_ratio (str): The aspect ratio (shape) of the video output.. [optional] # noqa: E501
language (str): The language code for the text-to-speech conversion.. [optional] # noqa: E501
newscaster (bool): Set the voice to newscaster mode.. [optional] if omitted the server will use the default value of False # noqa: E501
"""
type = kwargs.get('type', 'video')
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
constant_args = {
'_check_type': _check_type,
'_path_to_item': _path_to_item,
'_spec_property_naming': _spec_property_naming,
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
composed_info = validate_get_composed_info(
constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
discarded_args = composed_info[3]
for var_name, var_value in kwargs.items():
if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
'_composed_instances',
'_var_name_to_model_instances',
'_additional_properties_model_instances',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""Asset - a model defined in OpenAPI
Keyword Args:
type (str): The type of asset - set to `video` for videos.. defaults to 'video', must be one of ['video', 'image', 'text', 'rich-text', 'audio', 'luma', 'caption', 'rich-caption', 'html', 'html5', 'title', 'shape', 'svg', 'text-to-image', 'image-to-video', 'text-to-speech', ] # noqa: E501
src (str): The image source URL. The URL must be publicly accessible or include credentials.
text (str): The text to convert to speech.
html (str): The HTML markup for the asset.
shape (str): The shape to display.
prompt (str): The instructions for modifying the image into a video sequence.
voice (str): The voice to use for the text-to-speech conversion.
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
transcode (bool): Set to `true` to force re-encoding of the video during preprocessing. This can help resolve compatibility issues, fix rotation problems, synchronize audio, or convert formats. The video will be processed to ensure optimal compatibility with the rendering engine.. [optional] # noqa: E501
trim (float): The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the trim point. The audio will play until the file ends or the Clip length is reached.. [optional] # noqa: E501
volume (AudioAssetVolume): [optional] # noqa: E501
volume_effect (str): Preset volume effects to apply to the video asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
speed (float): Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length.. [optional] # noqa: E501
crop (Crop): [optional] # noqa: E501
chroma_key (ChromaKey): [optional] # noqa: E501
width (int): The width of the image in pixels.. [optional] # noqa: E501
height (int): The height of the image in pixels.. [optional] # noqa: E501
font (RichCaptionAssetFont): [optional] # noqa: E501
background (str): Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background.. [optional] # noqa: E501
alignment (TextAlignment): [optional] # noqa: E501
stroke (ShapeAssetStroke): [optional] # noqa: E501
animation (RichCaptionAnimation): [optional] # noqa: E501
ellipsis (str): The string to display when text overflows its bounding box. Set to an ellipsis character or custom string to indicate truncated text.. [optional] # noqa: E501
style (str): Uses a preset to apply font properties and styling to the title. <ul> <li>`minimal`</li> <li>`blockbuster`</li> <li>`vogue`</li> <li>`sketchy`</li> <li>`skinny`</li> <li>`chunk`</li> <li>`chunkLight`</li> <li>`marker`</li> <li>`future`</li> <li>`subtitle`</li> </ul>. [optional] # noqa: E501
shadow (RichTextShadow): [optional] # noqa: E501
border (Border): [optional] # noqa: E501
padding (RichCaptionAssetPadding): [optional] # noqa: E501
align (RichTextAlignment): [optional] # noqa: E501
effect (str): The effect to apply to the audio asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
margin (CaptionMargin): [optional] # noqa: E501
active (RichCaptionActive): [optional] # noqa: E501
css (str): The CSS string applied to the HTML.. [optional] # noqa: E501
position (str): Place the title in one of nine predefined positions of the viewport. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>. [optional] # noqa: E501
js (str): Optional JavaScript. Use for chart libraries, animations, or DOM manipulation. `gsap`, `d3`, `anime` and `lottie` are always available. CSS animations, transitions, and `Element.animate()` are also captured automatically. . [optional] # noqa: E501
color (str): Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.. [optional] # noqa: E501
size (str): Set the relative size of the text using predefined sizes from xx-small to xx-large. <ul> <li>`xx-small`</li> <li>`x-small`</li> <li>`small`</li> <li>`medium`</li> <li>`large`</li> <li>`x-large`</li> <li>`xx-large`</li> </ul>. [optional] # noqa: E501
offset (Offset): [optional] # noqa: E501
fill (ShapeAssetFill): [optional] # noqa: E501
rectangle (ShapeAssetRectangle): [optional] # noqa: E501
circle (ShapeAssetCircle): [optional] # noqa: E501
line (ShapeAssetLine): [optional] # noqa: E501
aspect_ratio (str): The aspect ratio (shape) of the video output.. [optional] # noqa: E501
language (str): The language code for the text-to-speech conversion.. [optional] # noqa: E501
newscaster (bool): Set the voice to newscaster mode.. [optional] if omitted the server will use the default value of False # noqa: E501
"""
type = kwargs.get('type', 'video')
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
constant_args = {
'_check_type': _check_type,
'_path_to_item': _path_to_item,
'_spec_property_naming': _spec_property_naming,
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
composed_info = validate_get_composed_info(
constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
discarded_args = composed_info[3]
for var_name, var_value in kwargs.items():
if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")
@cached_property
def _composed_schemas():
# we need this here to make our import statements work
# we must store _composed_schemas in here so the code is only run
# when we invoke this method. If we kept this at the class
# level we would get an error because the class level
# code would be run when this module is imported, and these composed
# classes don't exist yet because their module has not finished
# loading
lazy_import()
return {
'anyOf': [
],
'allOf': [
],
'oneOf': [
AudioAsset,
CaptionAsset,
Html5Asset,
HtmlAsset,
ImageAsset,
ImageToVideoAsset,
LumaAsset,
RichCaptionAsset,
RichTextAsset,
ShapeAsset,
SvgAsset,
TextAsset,
TextToImageAsset,
TextToSpeechAsset,
TitleAsset,
VideoAsset,
],
}