diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/__init__.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/__init__.py index 2a0c95b5d2f0..cc486f139158 100644 --- a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/__init__.py +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/__init__.py @@ -130,6 +130,7 @@ MediaGraphInstanceState, MediaGraphMotionDetectionSensitivity, MediaGraphOutputSelectorOperator, + MediaGraphOutputSelectorProperty, MediaGraphParameterType, MediaGraphRtspTransport, ) @@ -198,6 +199,7 @@ 'MediaGraphInstanceState', 'MediaGraphMotionDetectionSensitivity', 'MediaGraphOutputSelectorOperator', + 'MediaGraphOutputSelectorProperty', 'MediaGraphParameterType', 'MediaGraphRtspTransport', ] diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_direct_methodsfor_live_video_analyticson_io_tedge_enums.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_direct_methodsfor_live_video_analyticson_io_tedge_enums.py index eb8b24817ee0..60e852e0c6a2 100644 --- a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_direct_methodsfor_live_video_analyticson_io_tedge_enums.py +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_direct_methodsfor_live_video_analyticson_io_tedge_enums.py @@ -82,6 +82,12 @@ class MediaGraphOutputSelectorOperator(with_metaclass(_CaseInsensitiveEnumMeta, IS_ENUM = "is" #: A media type is the same type or a subtype. IS_NOT = "isNot" #: A media type is not the same type or a subtype. +class MediaGraphOutputSelectorProperty(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The stream property to compare with. + """ + + MEDIA_TYPE = "mediaType" #: The stream's MIME type or subtype. + class MediaGraphParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of the parameter. """ diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py index d16abafbecc2..2f843bcfc0ea 100644 --- a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py @@ -10,7 +10,7 @@ class MethodRequest(msrest.serialization.Model): - """MethodRequest. + """Base Class for Method Requests. You probably want to use the sub-classes and not this class directly. Known sub-classes are: MediaGraphInstanceListRequest, MediaGraphInstanceSetRequest, MediaGraphTopologyListRequest, MediaGraphTopologySetRequest, ItemNonSetRequestBase, MediaGraphInstanceSetRequestBody, MediaGraphTopologySetRequestBody. @@ -842,11 +842,8 @@ def __init__( class MediaGraphImageScale(msrest.serialization.Model): """The scaling mode for the image. - All required parameters must be populated in order to send to Azure. - - :param mode: Required. Describes the modes for scaling an input video frame into an image, - before it is sent to an inference engine. Possible values include: "PreserveAspectRatio", - "Pad", "Stretch". + :param mode: Describes the modes for scaling an input video frame into an image, before it is + sent to an inference engine. Possible values include: "PreserveAspectRatio", "Pad", "Stretch". :type mode: str or ~azure.media.analyticsedge.models.MediaGraphImageScaleMode :param width: The desired output width of the image. :type width: str @@ -854,10 +851,6 @@ class MediaGraphImageScale(msrest.serialization.Model): :type height: str """ - _validation = { - 'mode': {'required': True}, - } - _attribute_map = { 'mode': {'key': 'mode', 'type': 'str'}, 'width': {'key': 'width', 'type': 'str'}, @@ -869,7 +862,7 @@ def __init__( **kwargs ): super(MediaGraphImageScale, self).__init__(**kwargs) - self.mode = kwargs['mode'] + self.mode = kwargs.get('mode', None) self.width = kwargs.get('width', None) self.height = kwargs.get('height', None) @@ -909,7 +902,7 @@ def __init__( class MediaGraphInstanceActivateRequest(ItemNonSetRequestBase): - """MediaGraphInstanceActivateRequest. + """Represents the MediaGraphInstanceActivateRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -971,7 +964,7 @@ def __init__( class MediaGraphInstanceDeActivateRequest(ItemNonSetRequestBase): - """MediaGraphInstanceDeActivateRequest. + """Represents the MediaGraphInstanceDeactivateRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1008,7 +1001,7 @@ def __init__( class MediaGraphInstanceDeleteRequest(ItemNonSetRequestBase): - """MediaGraphInstanceDeleteRequest. + """Represents the MediaGraphInstanceDeleteRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1045,7 +1038,7 @@ def __init__( class MediaGraphInstanceGetRequest(ItemNonSetRequestBase): - """MediaGraphInstanceGetRequest. + """Represents the MediaGraphInstanceGetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1082,7 +1075,7 @@ def __init__( class MediaGraphInstanceListRequest(MethodRequest): - """MediaGraphInstanceListRequest. + """Represents the MediaGraphInstanceListRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1148,7 +1141,7 @@ def __init__( class MediaGraphInstanceSetRequest(MethodRequest): - """MediaGraphInstanceSetRequest. + """Represents the MediaGraphInstanceSetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1186,7 +1179,7 @@ def __init__( class MediaGraphInstanceSetRequestBody(MediaGraphInstance, MethodRequest): - """MediaGraphInstanceSetRequestBody. + """Represents the MediaGraphInstanceSetRequest body. Variables are only populated by the server, and will be ignored when sending a request. @@ -1399,13 +1392,19 @@ def __init__( class MediaGraphNodeInput(msrest.serialization.Model): """Represents the input to any node in a media graph. - :param node_name: The name of another node in the media graph, the output of which is used as - input to this node. + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of another node in the media graph, the output of which is + used as input to this node. :type node_name: str :param output_selectors: Allows for the selection of particular streams from another node. :type output_selectors: list[~azure.media.analyticsedge.models.MediaGraphOutputSelector] """ + _validation = { + 'node_name': {'required': True}, + } + _attribute_map = { 'node_name': {'key': 'nodeName', 'type': 'str'}, 'output_selectors': {'key': 'outputSelectors', 'type': '[MediaGraphOutputSelector]'}, @@ -1416,40 +1415,33 @@ def __init__( **kwargs ): super(MediaGraphNodeInput, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) + self.node_name = kwargs['node_name'] self.output_selectors = kwargs.get('output_selectors', None) class MediaGraphOutputSelector(msrest.serialization.Model): """Allows for the selection of particular streams from another node. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar property: The stream property to compare with. Default value: "mediaType". - :vartype property: str + :param property: The stream property to compare with. Possible values include: "mediaType". + :type property: str or ~azure.media.analyticsedge.models.MediaGraphOutputSelectorProperty :param operator: The operator to compare streams by. Possible values include: "is", "isNot". :type operator: str or ~azure.media.analyticsedge.models.MediaGraphOutputSelectorOperator :param value: Value to compare against. :type value: str """ - _validation = { - 'property': {'constant': True}, - } - _attribute_map = { 'property': {'key': 'property', 'type': 'str'}, 'operator': {'key': 'operator', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, } - property = "mediaType" - def __init__( self, **kwargs ): super(MediaGraphOutputSelector, self).__init__(**kwargs) + self.property = kwargs.get('property', None) self.operator = kwargs.get('operator', None) self.value = kwargs.get('value', None) @@ -1826,7 +1818,7 @@ def __init__( class MediaGraphTopologyDeleteRequest(ItemNonSetRequestBase): - """MediaGraphTopologyDeleteRequest. + """Represents the MediaGraphTopologyDeleteRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1863,7 +1855,7 @@ def __init__( class MediaGraphTopologyGetRequest(ItemNonSetRequestBase): - """MediaGraphTopologyGetRequest. + """Represents the MediaGraphTopologyGetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1900,7 +1892,7 @@ def __init__( class MediaGraphTopologyListRequest(MethodRequest): - """MediaGraphTopologyListRequest. + """Represents the MediaGraphTopologyListRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1970,7 +1962,7 @@ def __init__( class MediaGraphTopologySetRequest(MethodRequest): - """MediaGraphTopologySetRequest. + """Represents the MediaGraphTopologySetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -2008,7 +2000,7 @@ def __init__( class MediaGraphTopologySetRequestBody(MediaGraphTopology, MethodRequest): - """MediaGraphTopologySetRequestBody. + """Represents the MediaGraphTopologySetRequest body. Variables are only populated by the server, and will be ignored when sending a request. @@ -2096,14 +2088,15 @@ class MediaGraphUsernamePasswordCredentials(MediaGraphCredentials): :type type: str :param username: Required. Username for a username/password pair. :type username: str - :param password: Password for a username/password pair. Please use a parameter so that the - actual value is not returned on PUT or GET requests. + :param password: Required. Password for a username/password pair. Please use a parameter so + that the actual value is not returned on PUT or GET requests. :type password: str """ _validation = { 'type': {'required': True}, 'username': {'required': True}, + 'password': {'required': True}, } _attribute_map = { @@ -2119,4 +2112,4 @@ def __init__( super(MediaGraphUsernamePasswordCredentials, self).__init__(**kwargs) self.type = '#Microsoft.Media.MediaGraphUsernamePasswordCredentials' # type: str self.username = kwargs['username'] - self.password = kwargs.get('password', None) + self.password = kwargs['password'] diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py index 7542b26cb7dc..ec1193da89e3 100644 --- a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py @@ -15,7 +15,7 @@ class MethodRequest(msrest.serialization.Model): - """MethodRequest. + """Base Class for Method Requests. You probably want to use the sub-classes and not this class directly. Known sub-classes are: MediaGraphInstanceListRequest, MediaGraphInstanceSetRequest, MediaGraphTopologyListRequest, MediaGraphTopologySetRequest, ItemNonSetRequestBase, MediaGraphInstanceSetRequestBody, MediaGraphTopologySetRequestBody. @@ -910,11 +910,8 @@ def __init__( class MediaGraphImageScale(msrest.serialization.Model): """The scaling mode for the image. - All required parameters must be populated in order to send to Azure. - - :param mode: Required. Describes the modes for scaling an input video frame into an image, - before it is sent to an inference engine. Possible values include: "PreserveAspectRatio", - "Pad", "Stretch". + :param mode: Describes the modes for scaling an input video frame into an image, before it is + sent to an inference engine. Possible values include: "PreserveAspectRatio", "Pad", "Stretch". :type mode: str or ~azure.media.analyticsedge.models.MediaGraphImageScaleMode :param width: The desired output width of the image. :type width: str @@ -922,10 +919,6 @@ class MediaGraphImageScale(msrest.serialization.Model): :type height: str """ - _validation = { - 'mode': {'required': True}, - } - _attribute_map = { 'mode': {'key': 'mode', 'type': 'str'}, 'width': {'key': 'width', 'type': 'str'}, @@ -935,7 +928,7 @@ class MediaGraphImageScale(msrest.serialization.Model): def __init__( self, *, - mode: Union[str, "MediaGraphImageScaleMode"], + mode: Optional[Union[str, "MediaGraphImageScaleMode"]] = None, width: Optional[str] = None, height: Optional[str] = None, **kwargs @@ -985,7 +978,7 @@ def __init__( class MediaGraphInstanceActivateRequest(ItemNonSetRequestBase): - """MediaGraphInstanceActivateRequest. + """Represents the MediaGraphInstanceActivateRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1052,7 +1045,7 @@ def __init__( class MediaGraphInstanceDeActivateRequest(ItemNonSetRequestBase): - """MediaGraphInstanceDeActivateRequest. + """Represents the MediaGraphInstanceDeactivateRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1091,7 +1084,7 @@ def __init__( class MediaGraphInstanceDeleteRequest(ItemNonSetRequestBase): - """MediaGraphInstanceDeleteRequest. + """Represents the MediaGraphInstanceDeleteRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1130,7 +1123,7 @@ def __init__( class MediaGraphInstanceGetRequest(ItemNonSetRequestBase): - """MediaGraphInstanceGetRequest. + """Represents the MediaGraphInstanceGetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1169,7 +1162,7 @@ def __init__( class MediaGraphInstanceListRequest(MethodRequest): - """MediaGraphInstanceListRequest. + """Represents the MediaGraphInstanceListRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1240,7 +1233,7 @@ def __init__( class MediaGraphInstanceSetRequest(MethodRequest): - """MediaGraphInstanceSetRequest. + """Represents the MediaGraphInstanceSetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1280,7 +1273,7 @@ def __init__( class MediaGraphInstanceSetRequestBody(MediaGraphInstance, MethodRequest): - """MediaGraphInstanceSetRequestBody. + """Represents the MediaGraphInstanceSetRequest body. Variables are only populated by the server, and will be ignored when sending a request. @@ -1512,13 +1505,19 @@ def __init__( class MediaGraphNodeInput(msrest.serialization.Model): """Represents the input to any node in a media graph. - :param node_name: The name of another node in the media graph, the output of which is used as - input to this node. + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of another node in the media graph, the output of which is + used as input to this node. :type node_name: str :param output_selectors: Allows for the selection of particular streams from another node. :type output_selectors: list[~azure.media.analyticsedge.models.MediaGraphOutputSelector] """ + _validation = { + 'node_name': {'required': True}, + } + _attribute_map = { 'node_name': {'key': 'nodeName', 'type': 'str'}, 'output_selectors': {'key': 'outputSelectors', 'type': '[MediaGraphOutputSelector]'}, @@ -1527,7 +1526,7 @@ class MediaGraphNodeInput(msrest.serialization.Model): def __init__( self, *, - node_name: Optional[str] = None, + node_name: str, output_selectors: Optional[List["MediaGraphOutputSelector"]] = None, **kwargs ): @@ -1539,36 +1538,30 @@ def __init__( class MediaGraphOutputSelector(msrest.serialization.Model): """Allows for the selection of particular streams from another node. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar property: The stream property to compare with. Default value: "mediaType". - :vartype property: str + :param property: The stream property to compare with. Possible values include: "mediaType". + :type property: str or ~azure.media.analyticsedge.models.MediaGraphOutputSelectorProperty :param operator: The operator to compare streams by. Possible values include: "is", "isNot". :type operator: str or ~azure.media.analyticsedge.models.MediaGraphOutputSelectorOperator :param value: Value to compare against. :type value: str """ - _validation = { - 'property': {'constant': True}, - } - _attribute_map = { 'property': {'key': 'property', 'type': 'str'}, 'operator': {'key': 'operator', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, } - property = "mediaType" - def __init__( self, *, + property: Optional[Union[str, "MediaGraphOutputSelectorProperty"]] = None, operator: Optional[Union[str, "MediaGraphOutputSelectorOperator"]] = None, value: Optional[str] = None, **kwargs ): super(MediaGraphOutputSelector, self).__init__(**kwargs) + self.property = property self.operator = operator self.value = value @@ -1987,7 +1980,7 @@ def __init__( class MediaGraphTopologyDeleteRequest(ItemNonSetRequestBase): - """MediaGraphTopologyDeleteRequest. + """Represents the MediaGraphTopologyDeleteRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -2026,7 +2019,7 @@ def __init__( class MediaGraphTopologyGetRequest(ItemNonSetRequestBase): - """MediaGraphTopologyGetRequest. + """Represents the MediaGraphTopologyGetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -2065,7 +2058,7 @@ def __init__( class MediaGraphTopologyListRequest(MethodRequest): - """MediaGraphTopologyListRequest. + """Represents the MediaGraphTopologyListRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -2141,7 +2134,7 @@ def __init__( class MediaGraphTopologySetRequest(MethodRequest): - """MediaGraphTopologySetRequest. + """Represents the MediaGraphTopologySetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -2181,7 +2174,7 @@ def __init__( class MediaGraphTopologySetRequestBody(MediaGraphTopology, MethodRequest): - """MediaGraphTopologySetRequestBody. + """Represents the MediaGraphTopologySetRequest body. Variables are only populated by the server, and will be ignored when sending a request. @@ -2276,14 +2269,15 @@ class MediaGraphUsernamePasswordCredentials(MediaGraphCredentials): :type type: str :param username: Required. Username for a username/password pair. :type username: str - :param password: Password for a username/password pair. Please use a parameter so that the - actual value is not returned on PUT or GET requests. + :param password: Required. Password for a username/password pair. Please use a parameter so + that the actual value is not returned on PUT or GET requests. :type password: str """ _validation = { 'type': {'required': True}, 'username': {'required': True}, + 'password': {'required': True}, } _attribute_map = { @@ -2296,7 +2290,7 @@ def __init__( self, *, username: str, - password: Optional[str] = None, + password: str, **kwargs ): super(MediaGraphUsernamePasswordCredentials, self).__init__(**kwargs) diff --git a/sdk/media/azure-media-analytics-edge/swagger/autorest.md b/sdk/media/azure-media-analytics-edge/swagger/autorest.md index 919859203e35..54492c50c561 100644 --- a/sdk/media/azure-media-analytics-edge/swagger/autorest.md +++ b/sdk/media/azure-media-analytics-edge/swagger/autorest.md @@ -10,7 +10,7 @@ autorest --v3 --python ## Settings ```yaml -require: https://github.com/Azure/azure-rest-api-specs/blob/7b34c62199a8d84f7252dcb8b08c1b593ae65124/specification/mediaservices/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/297b7526f051e08f3a430b50daadd356ba74c6e2/specification/mediaservices/data-plane/readme.md output-folder: ../azure/media/analyticsedge/_generated namespace: azure.media.analyticsedge no-namespace-folders: true