├── .gitignore ├── README.md ├── requirements.txt ├── setup.py └── shotstack_sdk ├── __init__.py ├── api ├── __init__.py ├── create_api.py ├── edit_api.py ├── ingest_api.py └── serve_api.py ├── api_client.py ├── api_response.py ├── apis └── __init__.py ├── configuration.py ├── exceptions.py ├── model ├── __init__.py ├── asset.py ├── asset_render_response.py ├── asset_response.py ├── asset_response_attributes.py ├── asset_response_data.py ├── audio_asset.py ├── audio_enhancement.py ├── clip.py ├── crop.py ├── destinations.py ├── did_generated_asset.py ├── did_generated_asset_options.py ├── did_text_to_avatar_options.py ├── dolby_enhancement.py ├── dolby_enhancement_options.py ├── edit.py ├── eleven_labs_generated_asset.py ├── eleven_labs_generated_asset_options.py ├── eleven_labs_text_to_speech_options.py ├── enhancements.py ├── flip_transformation.py ├── font.py ├── generated_asset.py ├── generated_asset_error_response.py ├── generated_asset_error_response_data.py ├── generated_asset_response.py ├── generated_asset_response_attributes.py ├── generated_asset_response_data.py ├── google_cloud_storage_destination.py ├── google_cloud_storage_destination_options.py ├── google_drive_destination.py ├── google_drive_destination_options.py ├── hey_gen_generated_asset.py ├── hey_gen_generated_asset_options.py ├── hey_gen_text_to_avatar_options.py ├── html_asset.py ├── image_asset.py ├── ingest_error_response.py ├── ingest_error_response_data.py ├── luma_asset.py ├── merge_field.py ├── mux_destination.py ├── mux_destination_options.py ├── offset.py ├── open_ai_generated_asset.py ├── open_ai_generated_asset_options.py ├── open_ai_text_generator_options.py ├── output.py ├── outputs.py ├── outputs_response.py ├── poster.py ├── probe_response.py ├── queued_response.py ├── queued_response_data.py ├── queued_source_response.py ├── queued_source_response_data.py ├── range.py ├── render_response.py ├── render_response_data.py ├── rendition.py ├── rendition_response_attributes.py ├── rotate_transformation.py ├── s3_destination.py ├── s3_destination_options.py ├── shotstack_destination.py ├── shotstack_generated_asset.py ├── shotstack_generated_asset_options.py ├── shotstack_image_to_video_options.py ├── shotstack_text_generator_options.py ├── shotstack_text_to_image_options.py ├── shotstack_text_to_speech_options.py ├── size.py ├── skew_transformation.py ├── soundtrack.py ├── source.py ├── source_list_response.py ├── source_response.py ├── source_response_attributes.py ├── source_response_data.py ├── speed.py ├── stability_ai_generated_asset.py ├── stability_ai_generated_asset_options.py ├── stability_ai_text_to_image_options.py ├── template.py ├── template_data_response.py ├── template_data_response_data.py ├── template_list_response.py ├── template_list_response_data.py ├── template_list_response_item.py ├── template_render.py ├── template_response.py ├── template_response_data.py ├── thumbnail.py ├── timeline.py ├── title_asset.py ├── track.py ├── transcription.py ├── transfer.py ├── transfer_response.py ├── transfer_response_attributes.py ├── transfer_response_data.py ├── transformation.py ├── transition.py ├── upload_response.py ├── upload_response_attributes.py ├── upload_response_data.py └── video_asset.py ├── model_utils.py ├── models └── __init__.py ├── py.typed └── rest.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | python_dateutil >= 2.5.3 2 | setuptools >= 21.0.0 3 | urllib3 >= 1.25.3 4 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages # noqa: H301 2 | from pathlib import Path 3 | 4 | NAME = "shotstack-sdk" 5 | VERSION = "0.2.8" 6 | # To install the library, run the following 7 | # 8 | # python setup.py install 9 | # 10 | # prerequisite: setuptools 11 | # http://pypi.python.org/pypi/setuptools 12 | 13 | REQUIRES = [ 14 | "urllib3 >= 1.25.3", 15 | "python-dateutil", 16 | ] 17 | 18 | this_directory = Path(__file__).parent 19 | long_description = (this_directory / "README.md").read_text() 20 | 21 | setup( 22 | name=NAME, 23 | version=VERSION, 24 | description="Shotstack", 25 | author="Shotstack", 26 | author_email="pypi@shotstack.io", 27 | url="https://shotstack.io/product/sdk/python/", 28 | keywords=["shotstack", "video", "video editing", "video editor", "video editing api", "video generation", "video manipulation", "ffmpeg"], 29 | python_requires=">=3.6", 30 | install_requires=REQUIRES, 31 | packages=find_packages(exclude=["test", "tests"]), 32 | include_package_data=True, 33 | license="MIT", 34 | long_description=long_description, 35 | long_description_content_type="text/markdown" 36 | ) 37 | -------------------------------------------------------------------------------- /shotstack_sdk/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | """ 4 | Shotstack 5 | 6 | Official Python SDK for the Shotstack Cloud Video Editing API 7 | 8 | The version of the OpenAPI document: v1 9 | Contact: pypi@shotstack.io 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | __version__ = "0.2.8" 15 | 16 | # import ApiClient 17 | from shotstack_sdk.api_client import ApiClient 18 | 19 | # import Configuration 20 | from shotstack_sdk.configuration import Configuration 21 | 22 | # import exceptions 23 | from shotstack_sdk.exceptions import OpenApiException 24 | from shotstack_sdk.exceptions import ApiAttributeError 25 | from shotstack_sdk.exceptions import ApiTypeError 26 | from shotstack_sdk.exceptions import ApiValueError 27 | from shotstack_sdk.exceptions import ApiKeyError 28 | from shotstack_sdk.exceptions import ApiException 29 | -------------------------------------------------------------------------------- /shotstack_sdk/api/__init__.py: -------------------------------------------------------------------------------- 1 | # do not import all apis into this module because that uses a lot of memory and stack frames 2 | # if you need the ability to import all apis from one package, import them with 3 | # from shotstack_sdk.apis import CreateApi 4 | -------------------------------------------------------------------------------- /shotstack_sdk/api_response.py: -------------------------------------------------------------------------------- 1 | """API response object.""" 2 | 3 | from __future__ import annotations 4 | from typing import Optional, Generic, Mapping, TypeVar 5 | from pydantic import Field, StrictInt, StrictBytes, BaseModel 6 | 7 | T = TypeVar("T") 8 | 9 | class ApiResponse(BaseModel, Generic[T]): 10 | """ 11 | API response object 12 | """ 13 | 14 | status_code: StrictInt = Field(description="HTTP status code") 15 | headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") 16 | data: T = Field(description="Deserialized data given the data type") 17 | raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") 18 | 19 | model_config = { 20 | "arbitrary_types_allowed": True 21 | } 22 | -------------------------------------------------------------------------------- /shotstack_sdk/apis/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # flake8: noqa 3 | 4 | # Import all APIs into this package. 5 | # If you have many APIs here with many many models used in each API this may 6 | # raise a `RecursionError`. 7 | # In order to avoid this, import only the API that you directly need like: 8 | # 9 | # from .api.create_api import CreateApi 10 | # 11 | # or import this package, but before doing it, use: 12 | # 13 | # import sys 14 | # sys.setrecursionlimit(n) 15 | 16 | # Import APIs into API package: 17 | from shotstack_sdk.api.create_api import CreateApi 18 | from shotstack_sdk.api.edit_api import EditApi 19 | from shotstack_sdk.api.ingest_api import IngestApi 20 | from shotstack_sdk.api.serve_api import ServeApi 21 | -------------------------------------------------------------------------------- /shotstack_sdk/exceptions.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | 13 | class OpenApiException(Exception): 14 | """The base exception class for all OpenAPIExceptions""" 15 | 16 | 17 | class ApiTypeError(OpenApiException, TypeError): 18 | def __init__(self, msg, path_to_item=None, valid_classes=None, 19 | key_type=None): 20 | """ Raises an exception for TypeErrors 21 | 22 | Args: 23 | msg (str): the exception message 24 | 25 | Keyword Args: 26 | path_to_item (list): a list of keys an indices to get to the 27 | current_item 28 | None if unset 29 | valid_classes (tuple): the primitive classes that current item 30 | should be an instance of 31 | None if unset 32 | key_type (bool): False if our value is a value in a dict 33 | True if it is a key in a dict 34 | False if our item is an item in a list 35 | None if unset 36 | """ 37 | self.path_to_item = path_to_item 38 | self.valid_classes = valid_classes 39 | self.key_type = key_type 40 | full_msg = msg 41 | if path_to_item: 42 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 43 | super(ApiTypeError, self).__init__(full_msg) 44 | 45 | 46 | class ApiValueError(OpenApiException, ValueError): 47 | def __init__(self, msg, path_to_item=None): 48 | """ 49 | Args: 50 | msg (str): the exception message 51 | 52 | Keyword Args: 53 | path_to_item (list) the path to the exception in the 54 | received_data dict. None if unset 55 | """ 56 | 57 | self.path_to_item = path_to_item 58 | full_msg = msg 59 | if path_to_item: 60 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 61 | super(ApiValueError, self).__init__(full_msg) 62 | 63 | 64 | class ApiAttributeError(OpenApiException, AttributeError): 65 | def __init__(self, msg, path_to_item=None): 66 | """ 67 | Raised when an attribute reference or assignment fails. 68 | 69 | Args: 70 | msg (str): the exception message 71 | 72 | Keyword Args: 73 | path_to_item (None/list) the path to the exception in the 74 | received_data dict 75 | """ 76 | self.path_to_item = path_to_item 77 | full_msg = msg 78 | if path_to_item: 79 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 80 | super(ApiAttributeError, self).__init__(full_msg) 81 | 82 | 83 | class ApiKeyError(OpenApiException, KeyError): 84 | def __init__(self, msg, path_to_item=None): 85 | """ 86 | Args: 87 | msg (str): the exception message 88 | 89 | Keyword Args: 90 | path_to_item (None/list) the path to the exception in the 91 | received_data dict 92 | """ 93 | self.path_to_item = path_to_item 94 | full_msg = msg 95 | if path_to_item: 96 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 97 | super(ApiKeyError, self).__init__(full_msg) 98 | 99 | 100 | class ApiException(OpenApiException): 101 | 102 | def __init__(self, status=None, reason=None, http_resp=None): 103 | if http_resp: 104 | self.status = http_resp.status 105 | self.reason = http_resp.reason 106 | self.body = http_resp.data 107 | self.headers = http_resp.getheaders() 108 | else: 109 | self.status = status 110 | self.reason = reason 111 | self.body = None 112 | self.headers = None 113 | 114 | def __str__(self): 115 | """Custom error messages for exception""" 116 | error_message = "({0})\n"\ 117 | "Reason: {1}\n".format(self.status, self.reason) 118 | if self.headers: 119 | error_message += "HTTP response headers: {0}\n".format( 120 | self.headers) 121 | 122 | if self.body: 123 | error_message += "HTTP response body: {0}\n".format(self.body) 124 | 125 | return error_message 126 | 127 | 128 | class NotFoundException(ApiException): 129 | 130 | def __init__(self, status=None, reason=None, http_resp=None): 131 | super(NotFoundException, self).__init__(status, reason, http_resp) 132 | 133 | 134 | class UnauthorizedException(ApiException): 135 | 136 | def __init__(self, status=None, reason=None, http_resp=None): 137 | super(UnauthorizedException, self).__init__(status, reason, http_resp) 138 | 139 | 140 | class ForbiddenException(ApiException): 141 | 142 | def __init__(self, status=None, reason=None, http_resp=None): 143 | super(ForbiddenException, self).__init__(status, reason, http_resp) 144 | 145 | 146 | class ServiceException(ApiException): 147 | 148 | def __init__(self, status=None, reason=None, http_resp=None): 149 | super(ServiceException, self).__init__(status, reason, http_resp) 150 | 151 | 152 | def render_path(path_to_item): 153 | """Returns a string representation of a path""" 154 | result = "" 155 | for pth in path_to_item: 156 | if isinstance(pth, int): 157 | result += "[{0}]".format(pth) 158 | else: 159 | result += "['{0}']".format(pth) 160 | return result 161 | -------------------------------------------------------------------------------- /shotstack_sdk/model/__init__.py: -------------------------------------------------------------------------------- 1 | # we can not import model classes here because that would create a circular 2 | # reference which would not work in python2 3 | # do not import all models into this module because that uses a lot of memory and stack frames 4 | # if you need the ability to import all models from one package, import them with 5 | # from {{packageName}.models import ModelA, ModelB 6 | -------------------------------------------------------------------------------- /shotstack_sdk/model/asset_render_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.asset_response_data import AssetResponseData 35 | globals()['AssetResponseData'] = AssetResponseData 36 | 37 | 38 | class AssetRenderResponse(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'data': ([AssetResponseData],), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'data': 'data', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 111 | """AssetRenderResponse - a model defined in OpenAPI 112 | 113 | Args: 114 | data ([AssetResponseData]): An array of asset resources grouped by render id. 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.data = data 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, data, *args, **kwargs): # noqa: E501 196 | """AssetRenderResponse - a model defined in OpenAPI 197 | 198 | Args: 199 | data ([AssetResponseData]): An array of asset resources grouped by render id. 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.data = data 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/asset_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.asset_response_data import AssetResponseData 35 | globals()['AssetResponseData'] = AssetResponseData 36 | 37 | 38 | class AssetResponse(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'data': (AssetResponseData,), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'data': 'data', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 111 | """AssetResponse - a model defined in OpenAPI 112 | 113 | Args: 114 | data (AssetResponseData): 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.data = data 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, data, *args, **kwargs): # noqa: E501 196 | """AssetResponse - a model defined in OpenAPI 197 | 198 | Args: 199 | data (AssetResponseData): 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.data = data 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/enhancements.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.audio_enhancement import AudioEnhancement 35 | globals()['AudioEnhancement'] = AudioEnhancement 36 | 37 | 38 | class Enhancements(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'audio': (AudioEnhancement,), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'audio': 'audio', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 111 | """Enhancements - a model defined in OpenAPI 112 | 113 | Keyword Args: 114 | _check_type (bool): if True, values for parameters in openapi_types 115 | will be type checked and a TypeError will be 116 | raised if the wrong type is input. 117 | Defaults to True 118 | _path_to_item (tuple/list): This is a list of keys or values to 119 | drill down to the model in received_data 120 | when deserializing a response 121 | _spec_property_naming (bool): True if the variable names in the input data 122 | are serialized names, as specified in the OpenAPI document. 123 | False if the variable names in the input data 124 | are pythonic names, e.g. snake case (default) 125 | _configuration (Configuration): the instance to use when 126 | deserializing a file_type parameter. 127 | If passed, type conversion is attempted 128 | If omitted no type conversion is done. 129 | _visited_composed_classes (tuple): This stores a tuple of 130 | classes that we have traveled through so that 131 | if we see that class again we will not use its 132 | discriminator again. 133 | When traveling through a discriminator, the 134 | composed schema that is 135 | is traveled through is added to this set. 136 | For example if Animal has a discriminator 137 | petType and we pass in "Dog", and the class Dog 138 | allOf includes Animal, we move through Animal 139 | once using the discriminator, and pick Dog. 140 | Then in Dog, we will make an instance of the 141 | Animal class but this time we won't travel 142 | through its discriminator because we passed in 143 | _visited_composed_classes = (Animal,) 144 | audio (AudioEnhancement): [optional] # noqa: E501 145 | """ 146 | 147 | _check_type = kwargs.pop('_check_type', True) 148 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 149 | _path_to_item = kwargs.pop('_path_to_item', ()) 150 | _configuration = kwargs.pop('_configuration', None) 151 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 152 | 153 | self = super(OpenApiModel, cls).__new__(cls) 154 | 155 | if args: 156 | raise ApiTypeError( 157 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 158 | args, 159 | self.__class__.__name__, 160 | ), 161 | path_to_item=_path_to_item, 162 | valid_classes=(self.__class__,), 163 | ) 164 | 165 | self._data_store = {} 166 | self._check_type = _check_type 167 | self._spec_property_naming = _spec_property_naming 168 | self._path_to_item = _path_to_item 169 | self._configuration = _configuration 170 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 171 | 172 | for var_name, var_value in kwargs.items(): 173 | if var_name not in self.attribute_map and \ 174 | self._configuration is not None and \ 175 | self._configuration.discard_unknown_keys and \ 176 | self.additional_properties_type is None: 177 | # discard variable. 178 | continue 179 | setattr(self, var_name, var_value) 180 | return self 181 | 182 | required_properties = set([ 183 | '_data_store', 184 | '_check_type', 185 | '_spec_property_naming', 186 | '_path_to_item', 187 | '_configuration', 188 | '_visited_composed_classes', 189 | ]) 190 | 191 | @convert_js_args_to_python_args 192 | def __init__(self, *args, **kwargs): # noqa: E501 193 | """Enhancements - a model defined in OpenAPI 194 | 195 | Keyword Args: 196 | _check_type (bool): if True, values for parameters in openapi_types 197 | will be type checked and a TypeError will be 198 | raised if the wrong type is input. 199 | Defaults to True 200 | _path_to_item (tuple/list): This is a list of keys or values to 201 | drill down to the model in received_data 202 | when deserializing a response 203 | _spec_property_naming (bool): True if the variable names in the input data 204 | are serialized names, as specified in the OpenAPI document. 205 | False if the variable names in the input data 206 | are pythonic names, e.g. snake case (default) 207 | _configuration (Configuration): the instance to use when 208 | deserializing a file_type parameter. 209 | If passed, type conversion is attempted 210 | If omitted no type conversion is done. 211 | _visited_composed_classes (tuple): This stores a tuple of 212 | classes that we have traveled through so that 213 | if we see that class again we will not use its 214 | discriminator again. 215 | When traveling through a discriminator, the 216 | composed schema that is 217 | is traveled through is added to this set. 218 | For example if Animal has a discriminator 219 | petType and we pass in "Dog", and the class Dog 220 | allOf includes Animal, we move through Animal 221 | once using the discriminator, and pick Dog. 222 | Then in Dog, we will make an instance of the 223 | Animal class but this time we won't travel 224 | through its discriminator because we passed in 225 | _visited_composed_classes = (Animal,) 226 | audio (AudioEnhancement): [optional] # noqa: E501 227 | """ 228 | 229 | _check_type = kwargs.pop('_check_type', True) 230 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 231 | _path_to_item = kwargs.pop('_path_to_item', ()) 232 | _configuration = kwargs.pop('_configuration', None) 233 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 234 | 235 | if args: 236 | raise ApiTypeError( 237 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 238 | args, 239 | self.__class__.__name__, 240 | ), 241 | path_to_item=_path_to_item, 242 | valid_classes=(self.__class__,), 243 | ) 244 | 245 | self._data_store = {} 246 | self._check_type = _check_type 247 | self._spec_property_naming = _spec_property_naming 248 | self._path_to_item = _path_to_item 249 | self._configuration = _configuration 250 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 251 | 252 | for var_name, var_value in kwargs.items(): 253 | if var_name not in self.attribute_map and \ 254 | self._configuration is not None and \ 255 | self._configuration.discard_unknown_keys and \ 256 | self.additional_properties_type is None: 257 | # discard variable. 258 | continue 259 | setattr(self, var_name, var_value) 260 | if var_name in self.read_only_vars: 261 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 262 | f"class with read only attributes.") 263 | -------------------------------------------------------------------------------- /shotstack_sdk/model/flip_transformation.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class FlipTransformation(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | } 60 | 61 | validations = { 62 | } 63 | 64 | @cached_property 65 | def additional_properties_type(): 66 | """ 67 | This must be a method because a model may have properties that are 68 | of type self, this must run after the class is loaded 69 | """ 70 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 71 | 72 | _nullable = False 73 | 74 | @cached_property 75 | def openapi_types(): 76 | """ 77 | This must be a method because a model may have properties that are 78 | of type self, this must run after the class is loaded 79 | 80 | Returns 81 | openapi_types (dict): The key is attribute name 82 | and the value is attribute type. 83 | """ 84 | return { 85 | 'horizontal': (bool,), # noqa: E501 86 | 'vertical': (bool,), # noqa: E501 87 | } 88 | 89 | @cached_property 90 | def discriminator(): 91 | return None 92 | 93 | 94 | attribute_map = { 95 | 'horizontal': 'horizontal', # noqa: E501 96 | 'vertical': 'vertical', # noqa: E501 97 | } 98 | 99 | read_only_vars = { 100 | } 101 | 102 | _composed_schemas = {} 103 | 104 | @classmethod 105 | @convert_js_args_to_python_args 106 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 107 | """FlipTransformation - a model defined in OpenAPI 108 | 109 | Keyword Args: 110 | _check_type (bool): if True, values for parameters in openapi_types 111 | will be type checked and a TypeError will be 112 | raised if the wrong type is input. 113 | Defaults to True 114 | _path_to_item (tuple/list): This is a list of keys or values to 115 | drill down to the model in received_data 116 | when deserializing a response 117 | _spec_property_naming (bool): True if the variable names in the input data 118 | are serialized names, as specified in the OpenAPI document. 119 | False if the variable names in the input data 120 | are pythonic names, e.g. snake case (default) 121 | _configuration (Configuration): the instance to use when 122 | deserializing a file_type parameter. 123 | If passed, type conversion is attempted 124 | If omitted no type conversion is done. 125 | _visited_composed_classes (tuple): This stores a tuple of 126 | classes that we have traveled through so that 127 | if we see that class again we will not use its 128 | discriminator again. 129 | When traveling through a discriminator, the 130 | composed schema that is 131 | is traveled through is added to this set. 132 | For example if Animal has a discriminator 133 | petType and we pass in "Dog", and the class Dog 134 | allOf includes Animal, we move through Animal 135 | once using the discriminator, and pick Dog. 136 | Then in Dog, we will make an instance of the 137 | Animal class but this time we won't travel 138 | through its discriminator because we passed in 139 | _visited_composed_classes = (Animal,) 140 | horizontal (bool): Flip a clip horizontally.. [optional] # noqa: E501 141 | vertical (bool): Flip a clip vertically.. [optional] # noqa: E501 142 | """ 143 | 144 | _check_type = kwargs.pop('_check_type', True) 145 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 146 | _path_to_item = kwargs.pop('_path_to_item', ()) 147 | _configuration = kwargs.pop('_configuration', None) 148 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 149 | 150 | self = super(OpenApiModel, cls).__new__(cls) 151 | 152 | if args: 153 | raise ApiTypeError( 154 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 155 | args, 156 | self.__class__.__name__, 157 | ), 158 | path_to_item=_path_to_item, 159 | valid_classes=(self.__class__,), 160 | ) 161 | 162 | self._data_store = {} 163 | self._check_type = _check_type 164 | self._spec_property_naming = _spec_property_naming 165 | self._path_to_item = _path_to_item 166 | self._configuration = _configuration 167 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 168 | 169 | for var_name, var_value in kwargs.items(): 170 | if var_name not in self.attribute_map and \ 171 | self._configuration is not None and \ 172 | self._configuration.discard_unknown_keys and \ 173 | self.additional_properties_type is None: 174 | # discard variable. 175 | continue 176 | setattr(self, var_name, var_value) 177 | return self 178 | 179 | required_properties = set([ 180 | '_data_store', 181 | '_check_type', 182 | '_spec_property_naming', 183 | '_path_to_item', 184 | '_configuration', 185 | '_visited_composed_classes', 186 | ]) 187 | 188 | @convert_js_args_to_python_args 189 | def __init__(self, *args, **kwargs): # noqa: E501 190 | """FlipTransformation - a model defined in OpenAPI 191 | 192 | Keyword Args: 193 | _check_type (bool): if True, values for parameters in openapi_types 194 | will be type checked and a TypeError will be 195 | raised if the wrong type is input. 196 | Defaults to True 197 | _path_to_item (tuple/list): This is a list of keys or values to 198 | drill down to the model in received_data 199 | when deserializing a response 200 | _spec_property_naming (bool): True if the variable names in the input data 201 | are serialized names, as specified in the OpenAPI document. 202 | False if the variable names in the input data 203 | are pythonic names, e.g. snake case (default) 204 | _configuration (Configuration): the instance to use when 205 | deserializing a file_type parameter. 206 | If passed, type conversion is attempted 207 | If omitted no type conversion is done. 208 | _visited_composed_classes (tuple): This stores a tuple of 209 | classes that we have traveled through so that 210 | if we see that class again we will not use its 211 | discriminator again. 212 | When traveling through a discriminator, the 213 | composed schema that is 214 | is traveled through is added to this set. 215 | For example if Animal has a discriminator 216 | petType and we pass in "Dog", and the class Dog 217 | allOf includes Animal, we move through Animal 218 | once using the discriminator, and pick Dog. 219 | Then in Dog, we will make an instance of the 220 | Animal class but this time we won't travel 221 | through its discriminator because we passed in 222 | _visited_composed_classes = (Animal,) 223 | horizontal (bool): Flip a clip horizontally.. [optional] # noqa: E501 224 | vertical (bool): Flip a clip vertically.. [optional] # noqa: E501 225 | """ 226 | 227 | _check_type = kwargs.pop('_check_type', True) 228 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 229 | _path_to_item = kwargs.pop('_path_to_item', ()) 230 | _configuration = kwargs.pop('_configuration', None) 231 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 232 | 233 | if args: 234 | raise ApiTypeError( 235 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 236 | args, 237 | self.__class__.__name__, 238 | ), 239 | path_to_item=_path_to_item, 240 | valid_classes=(self.__class__,), 241 | ) 242 | 243 | self._data_store = {} 244 | self._check_type = _check_type 245 | self._spec_property_naming = _spec_property_naming 246 | self._path_to_item = _path_to_item 247 | self._configuration = _configuration 248 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 249 | 250 | for var_name, var_value in kwargs.items(): 251 | if var_name not in self.attribute_map and \ 252 | self._configuration is not None and \ 253 | self._configuration.discard_unknown_keys and \ 254 | self.additional_properties_type is None: 255 | # discard variable. 256 | continue 257 | setattr(self, var_name, var_value) 258 | if var_name in self.read_only_vars: 259 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 260 | f"class with read only attributes.") 261 | -------------------------------------------------------------------------------- /shotstack_sdk/model/font.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class Font(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | } 60 | 61 | validations = { 62 | } 63 | 64 | @cached_property 65 | def additional_properties_type(): 66 | """ 67 | This must be a method because a model may have properties that are 68 | of type self, this must run after the class is loaded 69 | """ 70 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 71 | 72 | _nullable = False 73 | 74 | @cached_property 75 | def openapi_types(): 76 | """ 77 | This must be a method because a model may have properties that are 78 | of type self, this must run after the class is loaded 79 | 80 | Returns 81 | openapi_types (dict): The key is attribute name 82 | and the value is attribute type. 83 | """ 84 | return { 85 | 'src': (str,), # noqa: E501 86 | } 87 | 88 | @cached_property 89 | def discriminator(): 90 | return None 91 | 92 | 93 | attribute_map = { 94 | 'src': 'src', # noqa: E501 95 | } 96 | 97 | read_only_vars = { 98 | } 99 | 100 | _composed_schemas = {} 101 | 102 | @classmethod 103 | @convert_js_args_to_python_args 104 | def _from_openapi_data(cls, src, *args, **kwargs): # noqa: E501 105 | """Font - a model defined in OpenAPI 106 | 107 | Args: 108 | src (str): The URL of the font file. The URL must be publicly accessible or include credentials. 109 | 110 | Keyword Args: 111 | _check_type (bool): if True, values for parameters in openapi_types 112 | will be type checked and a TypeError will be 113 | raised if the wrong type is input. 114 | Defaults to True 115 | _path_to_item (tuple/list): This is a list of keys or values to 116 | drill down to the model in received_data 117 | when deserializing a response 118 | _spec_property_naming (bool): True if the variable names in the input data 119 | are serialized names, as specified in the OpenAPI document. 120 | False if the variable names in the input data 121 | are pythonic names, e.g. snake case (default) 122 | _configuration (Configuration): the instance to use when 123 | deserializing a file_type parameter. 124 | If passed, type conversion is attempted 125 | If omitted no type conversion is done. 126 | _visited_composed_classes (tuple): This stores a tuple of 127 | classes that we have traveled through so that 128 | if we see that class again we will not use its 129 | discriminator again. 130 | When traveling through a discriminator, the 131 | composed schema that is 132 | is traveled through is added to this set. 133 | For example if Animal has a discriminator 134 | petType and we pass in "Dog", and the class Dog 135 | allOf includes Animal, we move through Animal 136 | once using the discriminator, and pick Dog. 137 | Then in Dog, we will make an instance of the 138 | Animal class but this time we won't travel 139 | through its discriminator because we passed in 140 | _visited_composed_classes = (Animal,) 141 | """ 142 | 143 | _check_type = kwargs.pop('_check_type', True) 144 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 145 | _path_to_item = kwargs.pop('_path_to_item', ()) 146 | _configuration = kwargs.pop('_configuration', None) 147 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 148 | 149 | self = super(OpenApiModel, cls).__new__(cls) 150 | 151 | if args: 152 | raise ApiTypeError( 153 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 154 | args, 155 | self.__class__.__name__, 156 | ), 157 | path_to_item=_path_to_item, 158 | valid_classes=(self.__class__,), 159 | ) 160 | 161 | self._data_store = {} 162 | self._check_type = _check_type 163 | self._spec_property_naming = _spec_property_naming 164 | self._path_to_item = _path_to_item 165 | self._configuration = _configuration 166 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 167 | 168 | self.src = src 169 | for var_name, var_value in kwargs.items(): 170 | if var_name not in self.attribute_map and \ 171 | self._configuration is not None and \ 172 | self._configuration.discard_unknown_keys and \ 173 | self.additional_properties_type is None: 174 | # discard variable. 175 | continue 176 | setattr(self, var_name, var_value) 177 | return self 178 | 179 | required_properties = set([ 180 | '_data_store', 181 | '_check_type', 182 | '_spec_property_naming', 183 | '_path_to_item', 184 | '_configuration', 185 | '_visited_composed_classes', 186 | ]) 187 | 188 | @convert_js_args_to_python_args 189 | def __init__(self, src, *args, **kwargs): # noqa: E501 190 | """Font - a model defined in OpenAPI 191 | 192 | Args: 193 | src (str): The URL of the font file. The URL must be publicly accessible or include credentials. 194 | 195 | Keyword Args: 196 | _check_type (bool): if True, values for parameters in openapi_types 197 | will be type checked and a TypeError will be 198 | raised if the wrong type is input. 199 | Defaults to True 200 | _path_to_item (tuple/list): This is a list of keys or values to 201 | drill down to the model in received_data 202 | when deserializing a response 203 | _spec_property_naming (bool): True if the variable names in the input data 204 | are serialized names, as specified in the OpenAPI document. 205 | False if the variable names in the input data 206 | are pythonic names, e.g. snake case (default) 207 | _configuration (Configuration): the instance to use when 208 | deserializing a file_type parameter. 209 | If passed, type conversion is attempted 210 | If omitted no type conversion is done. 211 | _visited_composed_classes (tuple): This stores a tuple of 212 | classes that we have traveled through so that 213 | if we see that class again we will not use its 214 | discriminator again. 215 | When traveling through a discriminator, the 216 | composed schema that is 217 | is traveled through is added to this set. 218 | For example if Animal has a discriminator 219 | petType and we pass in "Dog", and the class Dog 220 | allOf includes Animal, we move through Animal 221 | once using the discriminator, and pick Dog. 222 | Then in Dog, we will make an instance of the 223 | Animal class but this time we won't travel 224 | through its discriminator because we passed in 225 | _visited_composed_classes = (Animal,) 226 | """ 227 | 228 | _check_type = kwargs.pop('_check_type', True) 229 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 230 | _path_to_item = kwargs.pop('_path_to_item', ()) 231 | _configuration = kwargs.pop('_configuration', None) 232 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 233 | 234 | if args: 235 | raise ApiTypeError( 236 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 237 | args, 238 | self.__class__.__name__, 239 | ), 240 | path_to_item=_path_to_item, 241 | valid_classes=(self.__class__,), 242 | ) 243 | 244 | self._data_store = {} 245 | self._check_type = _check_type 246 | self._spec_property_naming = _spec_property_naming 247 | self._path_to_item = _path_to_item 248 | self._configuration = _configuration 249 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 250 | 251 | self.src = src 252 | for var_name, var_value in kwargs.items(): 253 | if var_name not in self.attribute_map and \ 254 | self._configuration is not None and \ 255 | self._configuration.discard_unknown_keys and \ 256 | self.additional_properties_type is None: 257 | # discard variable. 258 | continue 259 | setattr(self, var_name, var_value) 260 | if var_name in self.read_only_vars: 261 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 262 | f"class with read only attributes.") 263 | -------------------------------------------------------------------------------- /shotstack_sdk/model/generated_asset_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.generated_asset_response_data import GeneratedAssetResponseData 35 | globals()['GeneratedAssetResponseData'] = GeneratedAssetResponseData 36 | 37 | 38 | class GeneratedAssetResponse(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'data': (GeneratedAssetResponseData,), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'data': 'data', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 111 | """GeneratedAssetResponse - a model defined in OpenAPI 112 | 113 | Args: 114 | data (GeneratedAssetResponseData): 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.data = data 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, data, *args, **kwargs): # noqa: E501 196 | """GeneratedAssetResponse - a model defined in OpenAPI 197 | 198 | Args: 199 | data (GeneratedAssetResponseData): 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.data = data 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/poster.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class Poster(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | } 60 | 61 | validations = { 62 | } 63 | 64 | @cached_property 65 | def additional_properties_type(): 66 | """ 67 | This must be a method because a model may have properties that are 68 | of type self, this must run after the class is loaded 69 | """ 70 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 71 | 72 | _nullable = False 73 | 74 | @cached_property 75 | def openapi_types(): 76 | """ 77 | This must be a method because a model may have properties that are 78 | of type self, this must run after the class is loaded 79 | 80 | Returns 81 | openapi_types (dict): The key is attribute name 82 | and the value is attribute type. 83 | """ 84 | return { 85 | 'capture': (float,), # noqa: E501 86 | } 87 | 88 | @cached_property 89 | def discriminator(): 90 | return None 91 | 92 | 93 | attribute_map = { 94 | 'capture': 'capture', # noqa: E501 95 | } 96 | 97 | read_only_vars = { 98 | } 99 | 100 | _composed_schemas = {} 101 | 102 | @classmethod 103 | @convert_js_args_to_python_args 104 | def _from_openapi_data(cls, capture, *args, **kwargs): # noqa: E501 105 | """Poster - a model defined in OpenAPI 106 | 107 | Args: 108 | capture (float): The point on the timeline in seconds to capture a single frame to use as the poster image. 109 | 110 | Keyword Args: 111 | _check_type (bool): if True, values for parameters in openapi_types 112 | will be type checked and a TypeError will be 113 | raised if the wrong type is input. 114 | Defaults to True 115 | _path_to_item (tuple/list): This is a list of keys or values to 116 | drill down to the model in received_data 117 | when deserializing a response 118 | _spec_property_naming (bool): True if the variable names in the input data 119 | are serialized names, as specified in the OpenAPI document. 120 | False if the variable names in the input data 121 | are pythonic names, e.g. snake case (default) 122 | _configuration (Configuration): the instance to use when 123 | deserializing a file_type parameter. 124 | If passed, type conversion is attempted 125 | If omitted no type conversion is done. 126 | _visited_composed_classes (tuple): This stores a tuple of 127 | classes that we have traveled through so that 128 | if we see that class again we will not use its 129 | discriminator again. 130 | When traveling through a discriminator, the 131 | composed schema that is 132 | is traveled through is added to this set. 133 | For example if Animal has a discriminator 134 | petType and we pass in "Dog", and the class Dog 135 | allOf includes Animal, we move through Animal 136 | once using the discriminator, and pick Dog. 137 | Then in Dog, we will make an instance of the 138 | Animal class but this time we won't travel 139 | through its discriminator because we passed in 140 | _visited_composed_classes = (Animal,) 141 | """ 142 | 143 | _check_type = kwargs.pop('_check_type', True) 144 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 145 | _path_to_item = kwargs.pop('_path_to_item', ()) 146 | _configuration = kwargs.pop('_configuration', None) 147 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 148 | 149 | self = super(OpenApiModel, cls).__new__(cls) 150 | 151 | if args: 152 | raise ApiTypeError( 153 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 154 | args, 155 | self.__class__.__name__, 156 | ), 157 | path_to_item=_path_to_item, 158 | valid_classes=(self.__class__,), 159 | ) 160 | 161 | self._data_store = {} 162 | self._check_type = _check_type 163 | self._spec_property_naming = _spec_property_naming 164 | self._path_to_item = _path_to_item 165 | self._configuration = _configuration 166 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 167 | 168 | self.capture = capture 169 | for var_name, var_value in kwargs.items(): 170 | if var_name not in self.attribute_map and \ 171 | self._configuration is not None and \ 172 | self._configuration.discard_unknown_keys and \ 173 | self.additional_properties_type is None: 174 | # discard variable. 175 | continue 176 | setattr(self, var_name, var_value) 177 | return self 178 | 179 | required_properties = set([ 180 | '_data_store', 181 | '_check_type', 182 | '_spec_property_naming', 183 | '_path_to_item', 184 | '_configuration', 185 | '_visited_composed_classes', 186 | ]) 187 | 188 | @convert_js_args_to_python_args 189 | def __init__(self, capture, *args, **kwargs): # noqa: E501 190 | """Poster - a model defined in OpenAPI 191 | 192 | Args: 193 | capture (float): The point on the timeline in seconds to capture a single frame to use as the poster image. 194 | 195 | Keyword Args: 196 | _check_type (bool): if True, values for parameters in openapi_types 197 | will be type checked and a TypeError will be 198 | raised if the wrong type is input. 199 | Defaults to True 200 | _path_to_item (tuple/list): This is a list of keys or values to 201 | drill down to the model in received_data 202 | when deserializing a response 203 | _spec_property_naming (bool): True if the variable names in the input data 204 | are serialized names, as specified in the OpenAPI document. 205 | False if the variable names in the input data 206 | are pythonic names, e.g. snake case (default) 207 | _configuration (Configuration): the instance to use when 208 | deserializing a file_type parameter. 209 | If passed, type conversion is attempted 210 | If omitted no type conversion is done. 211 | _visited_composed_classes (tuple): This stores a tuple of 212 | classes that we have traveled through so that 213 | if we see that class again we will not use its 214 | discriminator again. 215 | When traveling through a discriminator, the 216 | composed schema that is 217 | is traveled through is added to this set. 218 | For example if Animal has a discriminator 219 | petType and we pass in "Dog", and the class Dog 220 | allOf includes Animal, we move through Animal 221 | once using the discriminator, and pick Dog. 222 | Then in Dog, we will make an instance of the 223 | Animal class but this time we won't travel 224 | through its discriminator because we passed in 225 | _visited_composed_classes = (Animal,) 226 | """ 227 | 228 | _check_type = kwargs.pop('_check_type', True) 229 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 230 | _path_to_item = kwargs.pop('_path_to_item', ()) 231 | _configuration = kwargs.pop('_configuration', None) 232 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 233 | 234 | if args: 235 | raise ApiTypeError( 236 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 237 | args, 238 | self.__class__.__name__, 239 | ), 240 | path_to_item=_path_to_item, 241 | valid_classes=(self.__class__,), 242 | ) 243 | 244 | self._data_store = {} 245 | self._check_type = _check_type 246 | self._spec_property_naming = _spec_property_naming 247 | self._path_to_item = _path_to_item 248 | self._configuration = _configuration 249 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 250 | 251 | self.capture = capture 252 | for var_name, var_value in kwargs.items(): 253 | if var_name not in self.attribute_map and \ 254 | self._configuration is not None and \ 255 | self._configuration.discard_unknown_keys and \ 256 | self.additional_properties_type is None: 257 | # discard variable. 258 | continue 259 | setattr(self, var_name, var_value) 260 | if var_name in self.read_only_vars: 261 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 262 | f"class with read only attributes.") 263 | -------------------------------------------------------------------------------- /shotstack_sdk/model/queued_source_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.queued_source_response_data import QueuedSourceResponseData 35 | globals()['QueuedSourceResponseData'] = QueuedSourceResponseData 36 | 37 | 38 | class QueuedSourceResponse(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'data': (QueuedSourceResponseData,), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'data': 'data', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 111 | """QueuedSourceResponse - a model defined in OpenAPI 112 | 113 | Args: 114 | data (QueuedSourceResponseData): 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.data = data 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, data, *args, **kwargs): # noqa: E501 196 | """QueuedSourceResponse - a model defined in OpenAPI 197 | 198 | Args: 199 | data (QueuedSourceResponseData): 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.data = data 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/queued_source_response_data.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class QueuedSourceResponseData(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | } 60 | 61 | validations = { 62 | } 63 | 64 | @cached_property 65 | def additional_properties_type(): 66 | """ 67 | This must be a method because a model may have properties that are 68 | of type self, this must run after the class is loaded 69 | """ 70 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 71 | 72 | _nullable = False 73 | 74 | @cached_property 75 | def openapi_types(): 76 | """ 77 | This must be a method because a model may have properties that are 78 | of type self, this must run after the class is loaded 79 | 80 | Returns 81 | openapi_types (dict): The key is attribute name 82 | and the value is attribute type. 83 | """ 84 | return { 85 | 'type': (str,), # noqa: E501 86 | 'id': (str,), # noqa: E501 87 | } 88 | 89 | @cached_property 90 | def discriminator(): 91 | return None 92 | 93 | 94 | attribute_map = { 95 | 'type': 'type', # noqa: E501 96 | 'id': 'id', # noqa: E501 97 | } 98 | 99 | read_only_vars = { 100 | } 101 | 102 | _composed_schemas = {} 103 | 104 | @classmethod 105 | @convert_js_args_to_python_args 106 | def _from_openapi_data(cls, type, id, *args, **kwargs): # noqa: E501 107 | """QueuedSourceResponseData - a model defined in OpenAPI 108 | 109 | Args: 110 | type (str): The type of resource, in this case it is a source. 111 | id (str): The source id. 112 | 113 | Keyword Args: 114 | _check_type (bool): if True, values for parameters in openapi_types 115 | will be type checked and a TypeError will be 116 | raised if the wrong type is input. 117 | Defaults to True 118 | _path_to_item (tuple/list): This is a list of keys or values to 119 | drill down to the model in received_data 120 | when deserializing a response 121 | _spec_property_naming (bool): True if the variable names in the input data 122 | are serialized names, as specified in the OpenAPI document. 123 | False if the variable names in the input data 124 | are pythonic names, e.g. snake case (default) 125 | _configuration (Configuration): the instance to use when 126 | deserializing a file_type parameter. 127 | If passed, type conversion is attempted 128 | If omitted no type conversion is done. 129 | _visited_composed_classes (tuple): This stores a tuple of 130 | classes that we have traveled through so that 131 | if we see that class again we will not use its 132 | discriminator again. 133 | When traveling through a discriminator, the 134 | composed schema that is 135 | is traveled through is added to this set. 136 | For example if Animal has a discriminator 137 | petType and we pass in "Dog", and the class Dog 138 | allOf includes Animal, we move through Animal 139 | once using the discriminator, and pick Dog. 140 | Then in Dog, we will make an instance of the 141 | Animal class but this time we won't travel 142 | through its discriminator because we passed in 143 | _visited_composed_classes = (Animal,) 144 | """ 145 | 146 | _check_type = kwargs.pop('_check_type', True) 147 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 148 | _path_to_item = kwargs.pop('_path_to_item', ()) 149 | _configuration = kwargs.pop('_configuration', None) 150 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 151 | 152 | self = super(OpenApiModel, cls).__new__(cls) 153 | 154 | if args: 155 | raise ApiTypeError( 156 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 157 | args, 158 | self.__class__.__name__, 159 | ), 160 | path_to_item=_path_to_item, 161 | valid_classes=(self.__class__,), 162 | ) 163 | 164 | self._data_store = {} 165 | self._check_type = _check_type 166 | self._spec_property_naming = _spec_property_naming 167 | self._path_to_item = _path_to_item 168 | self._configuration = _configuration 169 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 170 | 171 | self.type = type 172 | self.id = id 173 | for var_name, var_value in kwargs.items(): 174 | if var_name not in self.attribute_map and \ 175 | self._configuration is not None and \ 176 | self._configuration.discard_unknown_keys and \ 177 | self.additional_properties_type is None: 178 | # discard variable. 179 | continue 180 | setattr(self, var_name, var_value) 181 | return self 182 | 183 | required_properties = set([ 184 | '_data_store', 185 | '_check_type', 186 | '_spec_property_naming', 187 | '_path_to_item', 188 | '_configuration', 189 | '_visited_composed_classes', 190 | ]) 191 | 192 | @convert_js_args_to_python_args 193 | def __init__(self, type, id, *args, **kwargs): # noqa: E501 194 | """QueuedSourceResponseData - a model defined in OpenAPI 195 | 196 | Args: 197 | type (str): The type of resource, in this case it is a source. 198 | id (str): The source id. 199 | 200 | Keyword Args: 201 | _check_type (bool): if True, values for parameters in openapi_types 202 | will be type checked and a TypeError will be 203 | raised if the wrong type is input. 204 | Defaults to True 205 | _path_to_item (tuple/list): This is a list of keys or values to 206 | drill down to the model in received_data 207 | when deserializing a response 208 | _spec_property_naming (bool): True if the variable names in the input data 209 | are serialized names, as specified in the OpenAPI document. 210 | False if the variable names in the input data 211 | are pythonic names, e.g. snake case (default) 212 | _configuration (Configuration): the instance to use when 213 | deserializing a file_type parameter. 214 | If passed, type conversion is attempted 215 | If omitted no type conversion is done. 216 | _visited_composed_classes (tuple): This stores a tuple of 217 | classes that we have traveled through so that 218 | if we see that class again we will not use its 219 | discriminator again. 220 | When traveling through a discriminator, the 221 | composed schema that is 222 | is traveled through is added to this set. 223 | For example if Animal has a discriminator 224 | petType and we pass in "Dog", and the class Dog 225 | allOf includes Animal, we move through Animal 226 | once using the discriminator, and pick Dog. 227 | Then in Dog, we will make an instance of the 228 | Animal class but this time we won't travel 229 | through its discriminator because we passed in 230 | _visited_composed_classes = (Animal,) 231 | """ 232 | 233 | _check_type = kwargs.pop('_check_type', True) 234 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 235 | _path_to_item = kwargs.pop('_path_to_item', ()) 236 | _configuration = kwargs.pop('_configuration', None) 237 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 238 | 239 | if args: 240 | raise ApiTypeError( 241 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 242 | args, 243 | self.__class__.__name__, 244 | ), 245 | path_to_item=_path_to_item, 246 | valid_classes=(self.__class__,), 247 | ) 248 | 249 | self._data_store = {} 250 | self._check_type = _check_type 251 | self._spec_property_naming = _spec_property_naming 252 | self._path_to_item = _path_to_item 253 | self._configuration = _configuration 254 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 255 | 256 | self.type = type 257 | self.id = id 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/rotate_transformation.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class RotateTransformation(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | } 60 | 61 | validations = { 62 | } 63 | 64 | @cached_property 65 | def additional_properties_type(): 66 | """ 67 | This must be a method because a model may have properties that are 68 | of type self, this must run after the class is loaded 69 | """ 70 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 71 | 72 | _nullable = False 73 | 74 | @cached_property 75 | def openapi_types(): 76 | """ 77 | This must be a method because a model may have properties that are 78 | of type self, this must run after the class is loaded 79 | 80 | Returns 81 | openapi_types (dict): The key is attribute name 82 | and the value is attribute type. 83 | """ 84 | return { 85 | 'angle': (int,), # noqa: E501 86 | } 87 | 88 | @cached_property 89 | def discriminator(): 90 | return None 91 | 92 | 93 | attribute_map = { 94 | 'angle': 'angle', # noqa: E501 95 | } 96 | 97 | read_only_vars = { 98 | } 99 | 100 | _composed_schemas = {} 101 | 102 | @classmethod 103 | @convert_js_args_to_python_args 104 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 105 | """RotateTransformation - a model defined in OpenAPI 106 | 107 | Keyword Args: 108 | _check_type (bool): if True, values for parameters in openapi_types 109 | will be type checked and a TypeError will be 110 | raised if the wrong type is input. 111 | Defaults to True 112 | _path_to_item (tuple/list): This is a list of keys or values to 113 | drill down to the model in received_data 114 | when deserializing a response 115 | _spec_property_naming (bool): True if the variable names in the input data 116 | are serialized names, as specified in the OpenAPI document. 117 | False if the variable names in the input data 118 | are pythonic names, e.g. snake case (default) 119 | _configuration (Configuration): the instance to use when 120 | deserializing a file_type parameter. 121 | If passed, type conversion is attempted 122 | If omitted no type conversion is done. 123 | _visited_composed_classes (tuple): This stores a tuple of 124 | classes that we have traveled through so that 125 | if we see that class again we will not use its 126 | discriminator again. 127 | When traveling through a discriminator, the 128 | composed schema that is 129 | is traveled through is added to this set. 130 | For example if Animal has a discriminator 131 | petType and we pass in "Dog", and the class Dog 132 | allOf includes Animal, we move through Animal 133 | once using the discriminator, and pick Dog. 134 | Then in Dog, we will make an instance of the 135 | Animal class but this time we won't travel 136 | through its discriminator because we passed in 137 | _visited_composed_classes = (Animal,) 138 | angle (int): The angle to rotate the clip. Can be 0 to 360, or 0 to -360. Using a positive number rotates the clip clockwise, negative numbers counter-clockwise.. [optional] # noqa: E501 139 | """ 140 | 141 | _check_type = kwargs.pop('_check_type', True) 142 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 143 | _path_to_item = kwargs.pop('_path_to_item', ()) 144 | _configuration = kwargs.pop('_configuration', None) 145 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 146 | 147 | self = super(OpenApiModel, cls).__new__(cls) 148 | 149 | if args: 150 | raise ApiTypeError( 151 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 152 | args, 153 | self.__class__.__name__, 154 | ), 155 | path_to_item=_path_to_item, 156 | valid_classes=(self.__class__,), 157 | ) 158 | 159 | self._data_store = {} 160 | self._check_type = _check_type 161 | self._spec_property_naming = _spec_property_naming 162 | self._path_to_item = _path_to_item 163 | self._configuration = _configuration 164 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 165 | 166 | for var_name, var_value in kwargs.items(): 167 | if var_name not in self.attribute_map and \ 168 | self._configuration is not None and \ 169 | self._configuration.discard_unknown_keys and \ 170 | self.additional_properties_type is None: 171 | # discard variable. 172 | continue 173 | setattr(self, var_name, var_value) 174 | return self 175 | 176 | required_properties = set([ 177 | '_data_store', 178 | '_check_type', 179 | '_spec_property_naming', 180 | '_path_to_item', 181 | '_configuration', 182 | '_visited_composed_classes', 183 | ]) 184 | 185 | @convert_js_args_to_python_args 186 | def __init__(self, *args, **kwargs): # noqa: E501 187 | """RotateTransformation - a model defined in OpenAPI 188 | 189 | Keyword Args: 190 | _check_type (bool): if True, values for parameters in openapi_types 191 | will be type checked and a TypeError will be 192 | raised if the wrong type is input. 193 | Defaults to True 194 | _path_to_item (tuple/list): This is a list of keys or values to 195 | drill down to the model in received_data 196 | when deserializing a response 197 | _spec_property_naming (bool): True if the variable names in the input data 198 | are serialized names, as specified in the OpenAPI document. 199 | False if the variable names in the input data 200 | are pythonic names, e.g. snake case (default) 201 | _configuration (Configuration): the instance to use when 202 | deserializing a file_type parameter. 203 | If passed, type conversion is attempted 204 | If omitted no type conversion is done. 205 | _visited_composed_classes (tuple): This stores a tuple of 206 | classes that we have traveled through so that 207 | if we see that class again we will not use its 208 | discriminator again. 209 | When traveling through a discriminator, the 210 | composed schema that is 211 | is traveled through is added to this set. 212 | For example if Animal has a discriminator 213 | petType and we pass in "Dog", and the class Dog 214 | allOf includes Animal, we move through Animal 215 | once using the discriminator, and pick Dog. 216 | Then in Dog, we will make an instance of the 217 | Animal class but this time we won't travel 218 | through its discriminator because we passed in 219 | _visited_composed_classes = (Animal,) 220 | angle (int): The angle to rotate the clip. Can be 0 to 360, or 0 to -360. Using a positive number rotates the clip clockwise, negative numbers counter-clockwise.. [optional] # noqa: E501 221 | """ 222 | 223 | _check_type = kwargs.pop('_check_type', True) 224 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 225 | _path_to_item = kwargs.pop('_path_to_item', ()) 226 | _configuration = kwargs.pop('_configuration', None) 227 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 228 | 229 | if args: 230 | raise ApiTypeError( 231 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 232 | args, 233 | self.__class__.__name__, 234 | ), 235 | path_to_item=_path_to_item, 236 | valid_classes=(self.__class__,), 237 | ) 238 | 239 | self._data_store = {} 240 | self._check_type = _check_type 241 | self._spec_property_naming = _spec_property_naming 242 | self._path_to_item = _path_to_item 243 | self._configuration = _configuration 244 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 245 | 246 | for var_name, var_value in kwargs.items(): 247 | if var_name not in self.attribute_map and \ 248 | self._configuration is not None and \ 249 | self._configuration.discard_unknown_keys and \ 250 | self.additional_properties_type is None: 251 | # discard variable. 252 | continue 253 | setattr(self, var_name, var_value) 254 | if var_name in self.read_only_vars: 255 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 256 | f"class with read only attributes.") 257 | -------------------------------------------------------------------------------- /shotstack_sdk/model/skew_transformation.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class SkewTransformation(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | } 60 | 61 | validations = { 62 | } 63 | 64 | @cached_property 65 | def additional_properties_type(): 66 | """ 67 | This must be a method because a model may have properties that are 68 | of type self, this must run after the class is loaded 69 | """ 70 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 71 | 72 | _nullable = False 73 | 74 | @cached_property 75 | def openapi_types(): 76 | """ 77 | This must be a method because a model may have properties that are 78 | of type self, this must run after the class is loaded 79 | 80 | Returns 81 | openapi_types (dict): The key is attribute name 82 | and the value is attribute type. 83 | """ 84 | return { 85 | 'x': (float,), # noqa: E501 86 | 'y': (float,), # noqa: E501 87 | } 88 | 89 | @cached_property 90 | def discriminator(): 91 | return None 92 | 93 | 94 | attribute_map = { 95 | 'x': 'x', # noqa: E501 96 | 'y': 'y', # noqa: E501 97 | } 98 | 99 | read_only_vars = { 100 | } 101 | 102 | _composed_schemas = {} 103 | 104 | @classmethod 105 | @convert_js_args_to_python_args 106 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 107 | """SkewTransformation - a model defined in OpenAPI 108 | 109 | Keyword Args: 110 | _check_type (bool): if True, values for parameters in openapi_types 111 | will be type checked and a TypeError will be 112 | raised if the wrong type is input. 113 | Defaults to True 114 | _path_to_item (tuple/list): This is a list of keys or values to 115 | drill down to the model in received_data 116 | when deserializing a response 117 | _spec_property_naming (bool): True if the variable names in the input data 118 | are serialized names, as specified in the OpenAPI document. 119 | False if the variable names in the input data 120 | are pythonic names, e.g. snake case (default) 121 | _configuration (Configuration): the instance to use when 122 | deserializing a file_type parameter. 123 | If passed, type conversion is attempted 124 | If omitted no type conversion is done. 125 | _visited_composed_classes (tuple): This stores a tuple of 126 | classes that we have traveled through so that 127 | if we see that class again we will not use its 128 | discriminator again. 129 | When traveling through a discriminator, the 130 | composed schema that is 131 | is traveled through is added to this set. 132 | For example if Animal has a discriminator 133 | petType and we pass in "Dog", and the class Dog 134 | allOf includes Animal, we move through Animal 135 | once using the discriminator, and pick Dog. 136 | Then in Dog, we will make an instance of the 137 | Animal class but this time we won't travel 138 | through its discriminator because we passed in 139 | _visited_composed_classes = (Animal,) 140 | x (float): Skew the clip along it's x axis.. [optional] # noqa: E501 141 | y (float): Skew the clip along it's y axis.. [optional] # noqa: E501 142 | """ 143 | 144 | _check_type = kwargs.pop('_check_type', True) 145 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 146 | _path_to_item = kwargs.pop('_path_to_item', ()) 147 | _configuration = kwargs.pop('_configuration', None) 148 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 149 | 150 | self = super(OpenApiModel, cls).__new__(cls) 151 | 152 | if args: 153 | raise ApiTypeError( 154 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 155 | args, 156 | self.__class__.__name__, 157 | ), 158 | path_to_item=_path_to_item, 159 | valid_classes=(self.__class__,), 160 | ) 161 | 162 | self._data_store = {} 163 | self._check_type = _check_type 164 | self._spec_property_naming = _spec_property_naming 165 | self._path_to_item = _path_to_item 166 | self._configuration = _configuration 167 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 168 | 169 | for var_name, var_value in kwargs.items(): 170 | if var_name not in self.attribute_map and \ 171 | self._configuration is not None and \ 172 | self._configuration.discard_unknown_keys and \ 173 | self.additional_properties_type is None: 174 | # discard variable. 175 | continue 176 | setattr(self, var_name, var_value) 177 | return self 178 | 179 | required_properties = set([ 180 | '_data_store', 181 | '_check_type', 182 | '_spec_property_naming', 183 | '_path_to_item', 184 | '_configuration', 185 | '_visited_composed_classes', 186 | ]) 187 | 188 | @convert_js_args_to_python_args 189 | def __init__(self, *args, **kwargs): # noqa: E501 190 | """SkewTransformation - a model defined in OpenAPI 191 | 192 | Keyword Args: 193 | _check_type (bool): if True, values for parameters in openapi_types 194 | will be type checked and a TypeError will be 195 | raised if the wrong type is input. 196 | Defaults to True 197 | _path_to_item (tuple/list): This is a list of keys or values to 198 | drill down to the model in received_data 199 | when deserializing a response 200 | _spec_property_naming (bool): True if the variable names in the input data 201 | are serialized names, as specified in the OpenAPI document. 202 | False if the variable names in the input data 203 | are pythonic names, e.g. snake case (default) 204 | _configuration (Configuration): the instance to use when 205 | deserializing a file_type parameter. 206 | If passed, type conversion is attempted 207 | If omitted no type conversion is done. 208 | _visited_composed_classes (tuple): This stores a tuple of 209 | classes that we have traveled through so that 210 | if we see that class again we will not use its 211 | discriminator again. 212 | When traveling through a discriminator, the 213 | composed schema that is 214 | is traveled through is added to this set. 215 | For example if Animal has a discriminator 216 | petType and we pass in "Dog", and the class Dog 217 | allOf includes Animal, we move through Animal 218 | once using the discriminator, and pick Dog. 219 | Then in Dog, we will make an instance of the 220 | Animal class but this time we won't travel 221 | through its discriminator because we passed in 222 | _visited_composed_classes = (Animal,) 223 | x (float): Skew the clip along it's x axis.. [optional] # noqa: E501 224 | y (float): Skew the clip along it's y axis.. [optional] # noqa: E501 225 | """ 226 | 227 | _check_type = kwargs.pop('_check_type', True) 228 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 229 | _path_to_item = kwargs.pop('_path_to_item', ()) 230 | _configuration = kwargs.pop('_configuration', None) 231 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 232 | 233 | if args: 234 | raise ApiTypeError( 235 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 236 | args, 237 | self.__class__.__name__, 238 | ), 239 | path_to_item=_path_to_item, 240 | valid_classes=(self.__class__,), 241 | ) 242 | 243 | self._data_store = {} 244 | self._check_type = _check_type 245 | self._spec_property_naming = _spec_property_naming 246 | self._path_to_item = _path_to_item 247 | self._configuration = _configuration 248 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 249 | 250 | for var_name, var_value in kwargs.items(): 251 | if var_name not in self.attribute_map and \ 252 | self._configuration is not None and \ 253 | self._configuration.discard_unknown_keys and \ 254 | self.additional_properties_type is None: 255 | # discard variable. 256 | continue 257 | setattr(self, var_name, var_value) 258 | if var_name in self.read_only_vars: 259 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 260 | f"class with read only attributes.") 261 | -------------------------------------------------------------------------------- /shotstack_sdk/model/source_list_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.source_response_data import SourceResponseData 35 | globals()['SourceResponseData'] = SourceResponseData 36 | 37 | 38 | class SourceListResponse(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'data': ([SourceResponseData],), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'data': 'data', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 111 | """SourceListResponse - a model defined in OpenAPI 112 | 113 | Args: 114 | data ([SourceResponseData]): An array of ingested source files. 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.data = data 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, data, *args, **kwargs): # noqa: E501 196 | """SourceListResponse - a model defined in OpenAPI 197 | 198 | Args: 199 | data ([SourceResponseData]): An array of ingested source files. 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.data = data 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/source_response.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.source_response_data import SourceResponseData 35 | globals()['SourceResponseData'] = SourceResponseData 36 | 37 | 38 | class SourceResponse(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'data': (SourceResponseData,), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'data': 'data', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 111 | """SourceResponse - a model defined in OpenAPI 112 | 113 | Args: 114 | data (SourceResponseData): 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.data = data 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, data, *args, **kwargs): # noqa: E501 196 | """SourceResponse - a model defined in OpenAPI 197 | 198 | Args: 199 | data (SourceResponseData): 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.data = data 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/track.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | def lazy_import(): 34 | from shotstack_sdk.model.clip import Clip 35 | globals()['Clip'] = Clip 36 | 37 | 38 | class Track(ModelNormal): 39 | """NOTE: This class is auto generated by OpenAPI Generator. 40 | Ref: https://openapi-generator.tech 41 | 42 | Do not edit the class manually. 43 | 44 | Attributes: 45 | allowed_values (dict): The key is the tuple path to the attribute 46 | and the for var_name this is (var_name,). The value is a dict 47 | with a capitalized key describing the allowed value and an allowed 48 | value. These dicts store the allowed enum values. 49 | attribute_map (dict): The key is attribute name 50 | and the value is json key in definition. 51 | discriminator_value_class_map (dict): A dict to go from the discriminator 52 | variable value to the discriminator class name. 53 | validations (dict): The key is the tuple path to the attribute 54 | and the for var_name this is (var_name,). The value is a dict 55 | that stores validations for max_length, min_length, max_items, 56 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 57 | inclusive_minimum, and regex. 58 | additional_properties_type (tuple): A tuple of classes accepted 59 | as additional properties values. 60 | """ 61 | 62 | allowed_values = { 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | lazy_import() 75 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 76 | 77 | _nullable = False 78 | 79 | @cached_property 80 | def openapi_types(): 81 | """ 82 | This must be a method because a model may have properties that are 83 | of type self, this must run after the class is loaded 84 | 85 | Returns 86 | openapi_types (dict): The key is attribute name 87 | and the value is attribute type. 88 | """ 89 | lazy_import() 90 | return { 91 | 'clips': ([Clip],), # noqa: E501 92 | } 93 | 94 | @cached_property 95 | def discriminator(): 96 | return None 97 | 98 | 99 | attribute_map = { 100 | 'clips': 'clips', # noqa: E501 101 | } 102 | 103 | read_only_vars = { 104 | } 105 | 106 | _composed_schemas = {} 107 | 108 | @classmethod 109 | @convert_js_args_to_python_args 110 | def _from_openapi_data(cls, clips, *args, **kwargs): # noqa: E501 111 | """Track - a model defined in OpenAPI 112 | 113 | Args: 114 | clips ([Clip]): An array of Clips comprising of TitleClip, ImageClip or VideoClip. 115 | 116 | Keyword Args: 117 | _check_type (bool): if True, values for parameters in openapi_types 118 | will be type checked and a TypeError will be 119 | raised if the wrong type is input. 120 | Defaults to True 121 | _path_to_item (tuple/list): This is a list of keys or values to 122 | drill down to the model in received_data 123 | when deserializing a response 124 | _spec_property_naming (bool): True if the variable names in the input data 125 | are serialized names, as specified in the OpenAPI document. 126 | False if the variable names in the input data 127 | are pythonic names, e.g. snake case (default) 128 | _configuration (Configuration): the instance to use when 129 | deserializing a file_type parameter. 130 | If passed, type conversion is attempted 131 | If omitted no type conversion is done. 132 | _visited_composed_classes (tuple): This stores a tuple of 133 | classes that we have traveled through so that 134 | if we see that class again we will not use its 135 | discriminator again. 136 | When traveling through a discriminator, the 137 | composed schema that is 138 | is traveled through is added to this set. 139 | For example if Animal has a discriminator 140 | petType and we pass in "Dog", and the class Dog 141 | allOf includes Animal, we move through Animal 142 | once using the discriminator, and pick Dog. 143 | Then in Dog, we will make an instance of the 144 | Animal class but this time we won't travel 145 | through its discriminator because we passed in 146 | _visited_composed_classes = (Animal,) 147 | """ 148 | 149 | _check_type = kwargs.pop('_check_type', True) 150 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 151 | _path_to_item = kwargs.pop('_path_to_item', ()) 152 | _configuration = kwargs.pop('_configuration', None) 153 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 154 | 155 | self = super(OpenApiModel, cls).__new__(cls) 156 | 157 | if args: 158 | raise ApiTypeError( 159 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 160 | args, 161 | self.__class__.__name__, 162 | ), 163 | path_to_item=_path_to_item, 164 | valid_classes=(self.__class__,), 165 | ) 166 | 167 | self._data_store = {} 168 | self._check_type = _check_type 169 | self._spec_property_naming = _spec_property_naming 170 | self._path_to_item = _path_to_item 171 | self._configuration = _configuration 172 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 173 | 174 | self.clips = clips 175 | for var_name, var_value in kwargs.items(): 176 | if var_name not in self.attribute_map and \ 177 | self._configuration is not None and \ 178 | self._configuration.discard_unknown_keys and \ 179 | self.additional_properties_type is None: 180 | # discard variable. 181 | continue 182 | setattr(self, var_name, var_value) 183 | return self 184 | 185 | required_properties = set([ 186 | '_data_store', 187 | '_check_type', 188 | '_spec_property_naming', 189 | '_path_to_item', 190 | '_configuration', 191 | '_visited_composed_classes', 192 | ]) 193 | 194 | @convert_js_args_to_python_args 195 | def __init__(self, clips, *args, **kwargs): # noqa: E501 196 | """Track - a model defined in OpenAPI 197 | 198 | Args: 199 | clips ([Clip]): An array of Clips comprising of TitleClip, ImageClip or VideoClip. 200 | 201 | Keyword Args: 202 | _check_type (bool): if True, values for parameters in openapi_types 203 | will be type checked and a TypeError will be 204 | raised if the wrong type is input. 205 | Defaults to True 206 | _path_to_item (tuple/list): This is a list of keys or values to 207 | drill down to the model in received_data 208 | when deserializing a response 209 | _spec_property_naming (bool): True if the variable names in the input data 210 | are serialized names, as specified in the OpenAPI document. 211 | False if the variable names in the input data 212 | are pythonic names, e.g. snake case (default) 213 | _configuration (Configuration): the instance to use when 214 | deserializing a file_type parameter. 215 | If passed, type conversion is attempted 216 | If omitted no type conversion is done. 217 | _visited_composed_classes (tuple): This stores a tuple of 218 | classes that we have traveled through so that 219 | if we see that class again we will not use its 220 | discriminator again. 221 | When traveling through a discriminator, the 222 | composed schema that is 223 | is traveled through is added to this set. 224 | For example if Animal has a discriminator 225 | petType and we pass in "Dog", and the class Dog 226 | allOf includes Animal, we move through Animal 227 | once using the discriminator, and pick Dog. 228 | Then in Dog, we will make an instance of the 229 | Animal class but this time we won't travel 230 | through its discriminator because we passed in 231 | _visited_composed_classes = (Animal,) 232 | """ 233 | 234 | _check_type = kwargs.pop('_check_type', True) 235 | _spec_property_naming = kwargs.pop('_spec_property_naming', False) 236 | _path_to_item = kwargs.pop('_path_to_item', ()) 237 | _configuration = kwargs.pop('_configuration', None) 238 | _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) 239 | 240 | if args: 241 | raise ApiTypeError( 242 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( 243 | args, 244 | self.__class__.__name__, 245 | ), 246 | path_to_item=_path_to_item, 247 | valid_classes=(self.__class__,), 248 | ) 249 | 250 | self._data_store = {} 251 | self._check_type = _check_type 252 | self._spec_property_naming = _spec_property_naming 253 | self._path_to_item = _path_to_item 254 | self._configuration = _configuration 255 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,) 256 | 257 | self.clips = clips 258 | for var_name, var_value in kwargs.items(): 259 | if var_name not in self.attribute_map and \ 260 | self._configuration is not None and \ 261 | self._configuration.discard_unknown_keys and \ 262 | self.additional_properties_type is None: 263 | # discard variable. 264 | continue 265 | setattr(self, var_name, var_value) 266 | if var_name in self.read_only_vars: 267 | raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " 268 | f"class with read only attributes.") 269 | -------------------------------------------------------------------------------- /shotstack_sdk/model/transcription.py: -------------------------------------------------------------------------------- 1 | """ 2 | Shotstack 3 | 4 | Official Python SDK for the Shotstack Cloud Video Editing API 5 | 6 | The version of the OpenAPI document: v1 7 | Contact: pypi@shotstack.io 8 | Generated by: https://openapi-generator.tech 9 | """ 10 | 11 | 12 | import re # noqa: F401 13 | import sys # noqa: F401 14 | 15 | from shotstack_sdk.model_utils import ( # noqa: F401 16 | ApiTypeError, 17 | ModelComposed, 18 | ModelNormal, 19 | ModelSimple, 20 | cached_property, 21 | change_keys_js_to_python, 22 | convert_js_args_to_python_args, 23 | date, 24 | datetime, 25 | file_type, 26 | none_type, 27 | validate_get_composed_info, 28 | OpenApiModel 29 | ) 30 | from shotstack_sdk.exceptions import ApiAttributeError 31 | 32 | 33 | 34 | class Transcription(ModelNormal): 35 | """NOTE: This class is auto generated by OpenAPI Generator. 36 | Ref: https://openapi-generator.tech 37 | 38 | Do not edit the class manually. 39 | 40 | Attributes: 41 | allowed_values (dict): The key is the tuple path to the attribute 42 | and the for var_name this is (var_name,). The value is a dict 43 | with a capitalized key describing the allowed value and an allowed 44 | value. These dicts store the allowed enum values. 45 | attribute_map (dict): The key is attribute name 46 | and the value is json key in definition. 47 | discriminator_value_class_map (dict): A dict to go from the discriminator 48 | variable value to the discriminator class name. 49 | validations (dict): The key is the tuple path to the attribute 50 | and the for var_name this is (var_name,). The value is a dict 51 | that stores validations for max_length, min_length, max_items, 52 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, 53 | inclusive_minimum, and regex. 54 | additional_properties_type (tuple): A tuple of classes accepted 55 | as additional properties values. 56 | """ 57 | 58 | allowed_values = { 59 | ('format',): { 60 | 'SRT': "srt", 61 | 'VTT': "vtt", 62 | }, 63 | } 64 | 65 | validations = { 66 | } 67 | 68 | @cached_property 69 | def additional_properties_type(): 70 | """ 71 | This must be a method because a model may have properties that are 72 | of type self, this must run after the class is loaded 73 | """ 74 | return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 75 | 76 | _nullable = False 77 | 78 | @cached_property 79 | def openapi_types(): 80 | """ 81 | This must be a method because a model may have properties that are 82 | of type self, this must run after the class is loaded 83 | 84 | Returns 85 | openapi_types (dict): The key is attribute name 86 | and the value is attribute type. 87 | """ 88 | return { 89 | 'format': (str,), # noqa: E501 90 | } 91 | 92 | @cached_property 93 | def discriminator(): 94 | return None 95 | 96 | 97 | attribute_map = { 98 | 'format': 'format', # noqa: E501 99 | } 100 | 101 | read_only_vars = { 102 | } 103 | 104 | _composed_schemas = {} 105 | 106 | @classmethod 107 | @convert_js_args_to_python_args 108 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 109 | """Transcription - a model defined in OpenAPI 110 | 111 | Keyword Args: 112 | _check_type (bool): if True, values for parameters in openapi_types 113 | will be type checked and a TypeError will be 114 | raised if the wrong type is input. 115 | Defaults to True 116 | _path_to_item (tuple/list): This is a list of keys or values to 117 | drill down to the model in received_data 118 | when deserializing a response 119 | _spec_property_naming (bool): True if the variable names in the input data 120 | are serialized names, as specified in the OpenAPI document. 121 | False if the variable names in the input data 122 | are pythonic names, e.g. snake case (default) 123 | _configuration (Configuration): the instance to use when 124 | deserializing a file_type parameter. 125 | If passed, type conversion is attempted 126 | If omitted no type conversion is done. 127 | _visited_composed_classes (tuple): This stores a tuple of 128 | classes that we have traveled through so that 129 | if we see that class again we will not use its 130 | discriminator again. 131 | When traveling through a discriminator, the 132 | composed schema that is 133 | is traveled through is added to this set. 134 | For example if Animal has a discriminator 135 | petType and we pass in "Dog", and the class Dog 136 | allOf includes Animal, we move through Animal 137 | once using the discriminator, and pick Dog. 138 | Then in Dog, we will make an instance of the 139 | Animal class but this time we won't travel 140 | through its discriminator because we passed in 141 | _visited_composed_classes = (Animal,) 142 | format (str): The output format of the transcription file. The following formats are available: