Source code for azure.mgmt.media.models.layer_py3

# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


[docs]class Layer(Model): """The encoder can be configured to produce video and/or images (thumbnails) at different resolutions, by specifying a layer for each desired resolution. A layer represents the properties for the video or image at a resolution. You probably want to use the sub-classes and not this class directly. Known sub-classes are: VideoLayer, JpgLayer, PngLayer All required parameters must be populated in order to send to Azure. :param width: The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. :type width: str :param height: The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. :type height: str :param label: The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. :type label: str :param odatatype: Required. Constant filled by server. :type odatatype: str """ _validation = { 'odatatype': {'required': True}, } _attribute_map = { 'width': {'key': 'width', 'type': 'str'}, 'height': {'key': 'height', 'type': 'str'}, 'label': {'key': 'label', 'type': 'str'}, 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, } _subtype_map = { 'odatatype': {'#Microsoft.Media.VideoLayer': 'VideoLayer', '#Microsoft.Media.JpgLayer': 'JpgLayer', '#Microsoft.Media.PngLayer': 'PngLayer'} } def __init__(self, *, width: str=None, height: str=None, label: str=None, **kwargs) -> None: super(Layer, self).__init__(**kwargs) self.width = width self.height = height self.label = label self.odatatype = None