diff --git a/sdk/media/azure-media-analytics-edge/CHANGELOG.md b/sdk/media/azure-media-analytics-edge/CHANGELOG.md new file mode 100644 index 000000000000..ab5c55e39865 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/CHANGELOG.md @@ -0,0 +1,8 @@ + +# Release History + +------------------- + +## 1.0.0b1 (Unreleased) + +Initial release diff --git a/sdk/media/azure-media-analytics-edge/MANIFEST.in b/sdk/media/azure-media-analytics-edge/MANIFEST.in new file mode 100644 index 000000000000..355ca1aa3183 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py +include *.md +include azure/__init__.py +include azure/media/__init__.py +recursive-include samples *.py *.md diff --git a/sdk/media/azure-media-analytics-edge/README.md b/sdk/media/azure-media-analytics-edge/README.md new file mode 100644 index 000000000000..001d8d328194 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/README.md @@ -0,0 +1,140 @@ +# Azure Live Video Analytics for IoT Edge client library for Python + +Live Video Analytics on IoT Edge provides a platform to build intelligent video applications that span the edge and the cloud. The platform offers the capability to capture, record, and analyze live video along with publishing the results, video and video analytics, to Azure services in the cloud or the edge. It is designed to be an extensible platform, enabling you to connect different video analysis edge modules (such as Cognitive services containers, custom edge modules built by you with open-source machine learning models or custom models trained with your own data) to it and use them to analyze live video without worrying about the complexity of building and running a live video pipeline. + +Use the client library for Live Video Analytics on IoT Edge to: + +- Simplify interactions with the [Microsoft Azure IoT SDKs](https://github.com/azure/azure-iot-sdks) +- Programatically construct media graph topologies and instances + +[Package (PyPI)][package] | [Product documentation][doc_product] | [Direct methods][doc_direct_methods] | [Media graphs][doc_media_graph] | [Source code][source] | [Samples][samples] + +## Getting started + +### Install the package + +Install the Live Video Analytics client library for Python with pip: + +```bash +pip install azure-media-analytics-edge +``` +### Prerequisites + +* Python 2.7, or 3.5 or later is required to use this package. +* You need an active [Azure subscription][azure_sub], and a [IoT device connection string][iot_device_connection_string] to use this package. +* To interact with Azure IoT Hub you will need to run `pip install azure-iot-hub` +* You will need to use the version of the SDK that corresponds to the version of the LVA Edge module you are using. + + | SDK | LVA Edge Module | + |---|---| + | 1.0.0b1 | 2.0 | +### Creating a graph topology and making requests +Please visit the [Examples](#examples) for starter code +## Key concepts + +### MediaGraph Topology vs MediaGraph Instance +A _graph topology_ is a blueprint or template of a graph. It defines the parameters of the graph using placeholders as values for them. A _graph instance_ references a graph topology and specifies the parameters. This way you are able to have multiple graph instances referencing the same topology but with different values for parameters. For more information please visit [Media graph topologies and instances][doc_media_graph] + +### CloudToDeviceMethod + +The `CloudToDeviceMethod` is part of the [azure-iot-hub SDk][iot-hub-sdk]. This method allows you to communicate one way notifications to a device in your IoT hub. In our case, we want to communicate various graph methods such as `MediaGraphTopologySetRequest` and `MediaGraphTopologyGetRequest`. To use `CloudToDeviceMethod` you need to pass in two parameters: `method_name` and `payload`. + +The first parameter, `method_name`, is the name of the media graph request you are sending. Make sure to use each method's predefined `method_name` property. For example, `MediaGraphTopologySetRequest.method_name`. + +The second parameter, `payload`, sends the entire serialization of the media graph request. For example, `MediaGraphTopologySetRequest.serialize()` + +## Examples + +### Creating a graph topology +To create a graph topology you need to define parameters, sources, and sinks. +``` +#Parameters +user_name_param = MediaGraphParameterDeclaration(name="rtspUserName",type="String",default="dummyusername") +password_param = MediaGraphParameterDeclaration(name="rtspPassword",type="String",default="dummypassword") +url_param = MediaGraphParameterDeclaration(name="rtspUrl",type="String",default="rtsp://rtspsim:554/media/camera-300s.mkv") + +#Source and Sink +source = MediaGraphRtspSource(name="rtspSource", endpoint=MediaGraphUnsecuredEndpoint(url="${rtspUrl}",credentials=MediaGraphUsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}"))) +node = MediaGraphNodeInput(node_name="rtspSource") +sink = MediaGraphAssetSink(name="assetsink", inputs=[node],asset_name_pattern='sampleAsset-${System.GraphTopologyName}-${System.GraphInstanceName}', segment_length="PT0H0M30S",local_media_cache_maximum_size_mi_b=2048,local_media_cache_path="/var/lib/azuremediaservices/tmp/") + +graph_properties = MediaGraphTopologyProperties(parameters=[user_name_param, password_param, url_param], sources=[source], sinks=[sink], description="Continuous video recording to an Azure Media Services Asset") + +graph_topology = MediaGraphTopology(name=graph_topology_name,properties=graph_properties) + +``` + +### Creating a graph instance +To create a graph instance, you need to have an existing graph topology. +``` +url_param = MediaGraphParameterDefinition(name="rtspUrl", value=graph_url) +graph_instance_properties = MediaGraphInstanceProperties(description="Sample graph description", topology_name=graph_topology_name, parameters=[url_param]) + +graph_instance = MediaGraphInstance(name=graph_instance_name, properties=graph_instance_properties) + +``` + +### Invoking a graph method request +To invoke a graph method on your device you need to first define the request using the lva sdk. Then send that method request using the iot sdk's `CloudToDeviceMethod` +``` +set_method_request = MediaGraphTopologySetRequest(graph=graph_topology) +direct_method = CloudToDeviceMethod(method_name=set_method_request.method_name, payload=set_method_request.serialize()) +registry_manager = IoTHubRegistryManager(connection_string) + +registry_manager.invoke_device_module_method(device_id, module_d, direct_method) +``` + +To try different media graph topologies with the SDK, please see the official [Samples][samples]. + +## Troubleshooting + +- When sending a method request using the IoT Hub's `CloudToDeviceMethod` remember to not type in the method request name directly. Instead use `[MethodRequestName.method_name]` +- Make sure to serialize the entire method request before passing it to `CloudToDeviceMethod` + +## Next steps + +- [Samples][samples] +- [Azure IoT Device SDK][iot-device-sdk] +- [Azure IoTHub Service SDK][iot-hub-sdk] + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +If you encounter any issues, please open an issue on our [Github][github-page-issues]. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ + +[cla]: https://cla.microsoft.com +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com + +[package]: TODO://link-to-published-package +[source]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/media +[samples]: https://github.com/Azure-Samples/live-video-analytics-iot-edge-python + +[doc_direct_methods]: https://docs.microsoft.com/azure/media-services/live-video-analytics-edge/direct-methods +[doc_media_graph]: https://docs.microsoft.com/azure/media-services/live-video-analytics-edge/media-graph-concept#media-graph-topologies-and-instances +[doc_product]: https://docs.microsoft.com/azure/media-services/live-video-analytics-edge/ + +[iot-device-sdk]: https://pypi.org/project/azure-iot-device/ +[iot-hub-sdk]: https://pypi.org/project/azure-iot-hub/ +[iot_device_connection_string]: https://docs.microsoft.com/azure/media-services/live-video-analytics-edge/get-started-detect-motion-emit-events-quickstart + +[github-page-issues]: https://github.com/Azure/azure-sdk-for-python/issues \ No newline at end of file diff --git a/sdk/media/azure-media-analytics-edge/azure/__init__.py b/sdk/media/azure-media-analytics-edge/azure/__init__.py new file mode 100644 index 000000000000..e7590fb185e8 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/__init__.py @@ -0,0 +1,7 @@ +# 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. +# -------------------------------------------------------------------------- + +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/media/azure-media-analytics-edge/azure/media/__init__.py b/sdk/media/azure-media-analytics-edge/azure/media/__init__.py new file mode 100644 index 000000000000..69e3be50dac4 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/__init__.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/__init__.py new file mode 100644 index 000000000000..f0e634c72a00 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/__init__.py @@ -0,0 +1,29 @@ +# 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. +# -------------------------------------------------------------------------- +from ._generated.models import * +from ._generated import models +from ._version import VERSION + +__version__ = VERSION +__all__ = models.__all__ + +def _OverrideTopologySetRequestSerialize(self): + graph_body = MediaGraphTopologySetRequestBody(name=self.graph.name) + graph_body.system_data = self.graph.system_data + graph_body.properties = self.graph.properties + + return graph_body.serialize() + +MediaGraphTopologySetRequest.serialize = _OverrideTopologySetRequestSerialize + +def _OverrideInstanceSetRequestSerialize(self): + graph_body = MediaGraphInstanceSetRequestBody(name=self.instance.name) + graph_body.system_data = self.instance.system_data + graph_body.properties = self.instance.properties + + return graph_body.serialize() + +MediaGraphInstanceSetRequest.serialize = _OverrideInstanceSetRequestSerialize diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/__init__.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/__init__.py new file mode 100644 index 000000000000..5960c353a898 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/_version.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/_version.py new file mode 100644 index 000000000000..31ed98425268 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0" 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 new file mode 100644 index 000000000000..2a0c95b5d2f0 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/__init__.py @@ -0,0 +1,203 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ItemNonSetRequestBase + from ._models_py3 import MediaGraphAssetSink + from ._models_py3 import MediaGraphCertificateSource + from ._models_py3 import MediaGraphCognitiveServicesVisionExtension + from ._models_py3 import MediaGraphCredentials + from ._models_py3 import MediaGraphEndpoint + from ._models_py3 import MediaGraphExtensionProcessorBase + from ._models_py3 import MediaGraphFileSink + from ._models_py3 import MediaGraphGrpcExtension + from ._models_py3 import MediaGraphGrpcExtensionDataTransfer + from ._models_py3 import MediaGraphHttpExtension + from ._models_py3 import MediaGraphHttpHeaderCredentials + from ._models_py3 import MediaGraphImage + from ._models_py3 import MediaGraphImageFormat + from ._models_py3 import MediaGraphImageFormatBmp + from ._models_py3 import MediaGraphImageFormatJpeg + from ._models_py3 import MediaGraphImageFormatPng + from ._models_py3 import MediaGraphImageFormatRaw + from ._models_py3 import MediaGraphImageScale + from ._models_py3 import MediaGraphInstance + from ._models_py3 import MediaGraphInstanceActivateRequest + from ._models_py3 import MediaGraphInstanceCollection + from ._models_py3 import MediaGraphInstanceDeActivateRequest + from ._models_py3 import MediaGraphInstanceDeleteRequest + from ._models_py3 import MediaGraphInstanceGetRequest + from ._models_py3 import MediaGraphInstanceListRequest + from ._models_py3 import MediaGraphInstanceProperties + from ._models_py3 import MediaGraphInstanceSetRequest + from ._models_py3 import MediaGraphInstanceSetRequestBody + from ._models_py3 import MediaGraphIoTHubMessageSink + from ._models_py3 import MediaGraphIoTHubMessageSource + from ._models_py3 import MediaGraphMotionDetectionProcessor + from ._models_py3 import MediaGraphNodeInput + from ._models_py3 import MediaGraphOutputSelector + from ._models_py3 import MediaGraphParameterDeclaration + from ._models_py3 import MediaGraphParameterDefinition + from ._models_py3 import MediaGraphPemCertificateList + from ._models_py3 import MediaGraphProcessor + from ._models_py3 import MediaGraphRtspSource + from ._models_py3 import MediaGraphSamplingOptions + from ._models_py3 import MediaGraphSignalGateProcessor + from ._models_py3 import MediaGraphSink + from ._models_py3 import MediaGraphSource + from ._models_py3 import MediaGraphSystemData + from ._models_py3 import MediaGraphTlsEndpoint + from ._models_py3 import MediaGraphTlsValidationOptions + from ._models_py3 import MediaGraphTopology + from ._models_py3 import MediaGraphTopologyCollection + from ._models_py3 import MediaGraphTopologyDeleteRequest + from ._models_py3 import MediaGraphTopologyGetRequest + from ._models_py3 import MediaGraphTopologyListRequest + from ._models_py3 import MediaGraphTopologyProperties + from ._models_py3 import MediaGraphTopologySetRequest + from ._models_py3 import MediaGraphTopologySetRequestBody + from ._models_py3 import MediaGraphUnsecuredEndpoint + from ._models_py3 import MediaGraphUsernamePasswordCredentials + from ._models_py3 import MethodRequest +except (SyntaxError, ImportError): + from ._models import ItemNonSetRequestBase # type: ignore + from ._models import MediaGraphAssetSink # type: ignore + from ._models import MediaGraphCertificateSource # type: ignore + from ._models import MediaGraphCognitiveServicesVisionExtension # type: ignore + from ._models import MediaGraphCredentials # type: ignore + from ._models import MediaGraphEndpoint # type: ignore + from ._models import MediaGraphExtensionProcessorBase # type: ignore + from ._models import MediaGraphFileSink # type: ignore + from ._models import MediaGraphGrpcExtension # type: ignore + from ._models import MediaGraphGrpcExtensionDataTransfer # type: ignore + from ._models import MediaGraphHttpExtension # type: ignore + from ._models import MediaGraphHttpHeaderCredentials # type: ignore + from ._models import MediaGraphImage # type: ignore + from ._models import MediaGraphImageFormat # type: ignore + from ._models import MediaGraphImageFormatBmp # type: ignore + from ._models import MediaGraphImageFormatJpeg # type: ignore + from ._models import MediaGraphImageFormatPng # type: ignore + from ._models import MediaGraphImageFormatRaw # type: ignore + from ._models import MediaGraphImageScale # type: ignore + from ._models import MediaGraphInstance # type: ignore + from ._models import MediaGraphInstanceActivateRequest # type: ignore + from ._models import MediaGraphInstanceCollection # type: ignore + from ._models import MediaGraphInstanceDeActivateRequest # type: ignore + from ._models import MediaGraphInstanceDeleteRequest # type: ignore + from ._models import MediaGraphInstanceGetRequest # type: ignore + from ._models import MediaGraphInstanceListRequest # type: ignore + from ._models import MediaGraphInstanceProperties # type: ignore + from ._models import MediaGraphInstanceSetRequest # type: ignore + from ._models import MediaGraphInstanceSetRequestBody # type: ignore + from ._models import MediaGraphIoTHubMessageSink # type: ignore + from ._models import MediaGraphIoTHubMessageSource # type: ignore + from ._models import MediaGraphMotionDetectionProcessor # type: ignore + from ._models import MediaGraphNodeInput # type: ignore + from ._models import MediaGraphOutputSelector # type: ignore + from ._models import MediaGraphParameterDeclaration # type: ignore + from ._models import MediaGraphParameterDefinition # type: ignore + from ._models import MediaGraphPemCertificateList # type: ignore + from ._models import MediaGraphProcessor # type: ignore + from ._models import MediaGraphRtspSource # type: ignore + from ._models import MediaGraphSamplingOptions # type: ignore + from ._models import MediaGraphSignalGateProcessor # type: ignore + from ._models import MediaGraphSink # type: ignore + from ._models import MediaGraphSource # type: ignore + from ._models import MediaGraphSystemData # type: ignore + from ._models import MediaGraphTlsEndpoint # type: ignore + from ._models import MediaGraphTlsValidationOptions # type: ignore + from ._models import MediaGraphTopology # type: ignore + from ._models import MediaGraphTopologyCollection # type: ignore + from ._models import MediaGraphTopologyDeleteRequest # type: ignore + from ._models import MediaGraphTopologyGetRequest # type: ignore + from ._models import MediaGraphTopologyListRequest # type: ignore + from ._models import MediaGraphTopologyProperties # type: ignore + from ._models import MediaGraphTopologySetRequest # type: ignore + from ._models import MediaGraphTopologySetRequestBody # type: ignore + from ._models import MediaGraphUnsecuredEndpoint # type: ignore + from ._models import MediaGraphUsernamePasswordCredentials # type: ignore + from ._models import MethodRequest # type: ignore + +from ._direct_methodsfor_live_video_analyticson_io_tedge_enums import ( + MediaGraphGrpcExtensionDataTransferMode, + MediaGraphImageFormatRawPixelFormat, + MediaGraphImageScaleMode, + MediaGraphInstanceState, + MediaGraphMotionDetectionSensitivity, + MediaGraphOutputSelectorOperator, + MediaGraphParameterType, + MediaGraphRtspTransport, +) + +__all__ = [ + 'ItemNonSetRequestBase', + 'MediaGraphAssetSink', + 'MediaGraphCertificateSource', + 'MediaGraphCognitiveServicesVisionExtension', + 'MediaGraphCredentials', + 'MediaGraphEndpoint', + 'MediaGraphExtensionProcessorBase', + 'MediaGraphFileSink', + 'MediaGraphGrpcExtension', + 'MediaGraphGrpcExtensionDataTransfer', + 'MediaGraphHttpExtension', + 'MediaGraphHttpHeaderCredentials', + 'MediaGraphImage', + 'MediaGraphImageFormat', + 'MediaGraphImageFormatBmp', + 'MediaGraphImageFormatJpeg', + 'MediaGraphImageFormatPng', + 'MediaGraphImageFormatRaw', + 'MediaGraphImageScale', + 'MediaGraphInstance', + 'MediaGraphInstanceActivateRequest', + 'MediaGraphInstanceCollection', + 'MediaGraphInstanceDeActivateRequest', + 'MediaGraphInstanceDeleteRequest', + 'MediaGraphInstanceGetRequest', + 'MediaGraphInstanceListRequest', + 'MediaGraphInstanceProperties', + 'MediaGraphInstanceSetRequest', + 'MediaGraphInstanceSetRequestBody', + 'MediaGraphIoTHubMessageSink', + 'MediaGraphIoTHubMessageSource', + 'MediaGraphMotionDetectionProcessor', + 'MediaGraphNodeInput', + 'MediaGraphOutputSelector', + 'MediaGraphParameterDeclaration', + 'MediaGraphParameterDefinition', + 'MediaGraphPemCertificateList', + 'MediaGraphProcessor', + 'MediaGraphRtspSource', + 'MediaGraphSamplingOptions', + 'MediaGraphSignalGateProcessor', + 'MediaGraphSink', + 'MediaGraphSource', + 'MediaGraphSystemData', + 'MediaGraphTlsEndpoint', + 'MediaGraphTlsValidationOptions', + 'MediaGraphTopology', + 'MediaGraphTopologyCollection', + 'MediaGraphTopologyDeleteRequest', + 'MediaGraphTopologyGetRequest', + 'MediaGraphTopologyListRequest', + 'MediaGraphTopologyProperties', + 'MediaGraphTopologySetRequest', + 'MediaGraphTopologySetRequestBody', + 'MediaGraphUnsecuredEndpoint', + 'MediaGraphUsernamePasswordCredentials', + 'MethodRequest', + 'MediaGraphGrpcExtensionDataTransferMode', + 'MediaGraphImageFormatRawPixelFormat', + 'MediaGraphImageScaleMode', + 'MediaGraphInstanceState', + 'MediaGraphMotionDetectionSensitivity', + 'MediaGraphOutputSelectorOperator', + '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 new file mode 100644 index 000000000000..eb8b24817ee0 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_direct_methodsfor_live_video_analyticson_io_tedge_enums.py @@ -0,0 +1,100 @@ +# 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 enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class MediaGraphGrpcExtensionDataTransferMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """How frame data should be transmitted to the inference engine. + """ + + EMBEDDED = "Embedded" #: Frames are transferred embedded into the gRPC messages. + SHARED_MEMORY = "SharedMemory" #: Frames are transferred through shared memory. + +class MediaGraphImageFormatRawPixelFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The pixel format that will be used to encode images. + """ + + YUV420_P = "Yuv420p" #: Planar YUV 4:2:0, 12bpp, (1 Cr and Cb sample per 2x2 Y samples). + RGB565_BE = "Rgb565be" #: Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian. + RGB565_LE = "Rgb565le" #: Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian. + RGB555_BE = "Rgb555be" #: Packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined. + RGB555_LE = "Rgb555le" #: Packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined. + RGB24 = "Rgb24" #: Packed RGB 8:8:8, 24bpp, RGBRGB. + BGR24 = "Bgr24" #: Packed RGB 8:8:8, 24bpp, BGRBGR. + ARGB = "Argb" #: Packed ARGB 8:8:8:8, 32bpp, ARGBARGB. + RGBA = "Rgba" #: Packed RGBA 8:8:8:8, 32bpp, RGBARGBA. + ABGR = "Abgr" #: Packed ABGR 8:8:8:8, 32bpp, ABGRABGR. + BGRA = "Bgra" #: Packed BGRA 8:8:8:8, 32bpp, BGRABGRA. + +class MediaGraphImageScaleMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes the modes for scaling an input video frame into an image, before it is sent to an + inference engine. + """ + + PRESERVE_ASPECT_RATIO = "PreserveAspectRatio" #: Use the same aspect ratio as the input frame. + PAD = "Pad" #: Center pad the input frame to match the given dimensions. + STRETCH = "Stretch" #: Stretch input frame to match given dimensions. + +class MediaGraphInstanceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Allowed states for a graph instance. + """ + + INACTIVE = "Inactive" #: The media graph instance is idle and not processing media. + ACTIVATING = "Activating" #: The media graph instance is transitioning into the active state. + ACTIVE = "Active" #: The media graph instance is active and processing media. + DEACTIVATING = "Deactivating" #: The media graph instance is transitioning into the inactive state. + +class MediaGraphMotionDetectionSensitivity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enumeration that specifies the sensitivity of the motion detection processor. + """ + + LOW = "Low" #: Low Sensitivity. + MEDIUM = "Medium" #: Medium Sensitivity. + HIGH = "High" #: High Sensitivity. + +class MediaGraphOutputSelectorOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The operator to compare streams by. + """ + + 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 MediaGraphParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the parameter. + """ + + STRING = "String" #: A string parameter value. + SECRET_STRING = "SecretString" #: A string to hold sensitive information as parameter value. + INT = "Int" #: A 32-bit signed integer as parameter value. + DOUBLE = "Double" #: A 64-bit double-precision floating point type as parameter value. + BOOL = "Bool" #: A boolean value that is either true or false. + +class MediaGraphRtspTransport(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Underlying RTSP transport. This is used to enable or disable HTTP tunneling. + """ + + HTTP = "Http" #: HTTP/HTTPS transport. This should be used when HTTP tunneling is desired. + TCP = "Tcp" #: TCP transport. This should be used when HTTP tunneling is NOT desired. 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 new file mode 100644 index 000000000000..d16abafbecc2 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py @@ -0,0 +1,2122 @@ +# 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. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class MethodRequest(msrest.serialization.Model): + """MethodRequest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphInstanceListRequest, MediaGraphInstanceSetRequest, MediaGraphTopologyListRequest, MediaGraphTopologySetRequest, ItemNonSetRequestBase, MediaGraphInstanceSetRequestBody, MediaGraphTopologySetRequestBody. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + _subtype_map = { + 'method_name': {'GraphInstanceList': 'MediaGraphInstanceListRequest', 'GraphInstanceSet': 'MediaGraphInstanceSetRequest', 'GraphTopologyList': 'MediaGraphTopologyListRequest', 'GraphTopologySet': 'MediaGraphTopologySetRequest', 'ItemNonSetRequestBase': 'ItemNonSetRequestBase', 'MediaGraphInstanceSetRequestBody': 'MediaGraphInstanceSetRequestBody', 'MediaGraphTopologySetRequestBody': 'MediaGraphTopologySetRequestBody'} + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MethodRequest, self).__init__(**kwargs) + self.method_name = None # type: Optional[str] + + +class ItemNonSetRequestBase(MethodRequest): + """ItemNonSetRequestBase. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphInstanceActivateRequest, MediaGraphInstanceDeActivateRequest, MediaGraphInstanceDeleteRequest, MediaGraphInstanceGetRequest, MediaGraphTopologyDeleteRequest, MediaGraphTopologyGetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'method_name': {'GraphInstanceActivate': 'MediaGraphInstanceActivateRequest', 'GraphInstanceDeactivate': 'MediaGraphInstanceDeActivateRequest', 'GraphInstanceDelete': 'MediaGraphInstanceDeleteRequest', 'GraphInstanceGet': 'MediaGraphInstanceGetRequest', 'GraphTopologyDelete': 'MediaGraphTopologyDeleteRequest', 'GraphTopologyGet': 'MediaGraphTopologyGetRequest'} + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(ItemNonSetRequestBase, self).__init__(**kwargs) + self.method_name = 'ItemNonSetRequestBase' # type: str + self.name = kwargs['name'] + + +class MediaGraphSink(msrest.serialization.Model): + """Enables a media graph to write media data to a destination outside of the Live Video Analytics IoT Edge module. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphAssetSink, MediaGraphFileSink, MediaGraphIoTHubMessageSink. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphAssetSink': 'MediaGraphAssetSink', '#Microsoft.Media.MediaGraphFileSink': 'MediaGraphFileSink', '#Microsoft.Media.MediaGraphIoTHubMessageSink': 'MediaGraphIoTHubMessageSink'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphSink, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = kwargs['name'] + self.inputs = kwargs['inputs'] + + +class MediaGraphAssetSink(MediaGraphSink): + """Enables a media graph to record media to an Azure Media Services asset for subsequent playback. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param asset_name_pattern: Required. A name pattern when creating new assets. The pattern must + include at least one system variable. See the documentation for available variables and + additional examples. + :type asset_name_pattern: str + :param segment_length: When writing media to an asset, wait until at least this duration of + media has been accumulated on the Edge. Expressed in increments of 30 seconds, with a minimum + of 30 seconds and a recommended maximum of 5 minutes. + :type segment_length: str + :param local_media_cache_path: Required. Path to a local file system directory for temporary + caching of media before writing to an Asset. Used when the Edge device is temporarily + disconnected from Azure. + :type local_media_cache_path: str + :param local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can be + used for temporary caching of media. + :type local_media_cache_maximum_size_mi_b: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'asset_name_pattern': {'required': True}, + 'local_media_cache_path': {'required': True}, + 'local_media_cache_maximum_size_mi_b': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'asset_name_pattern': {'key': 'assetNamePattern', 'type': 'str'}, + 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'local_media_cache_path': {'key': 'localMediaCachePath', 'type': 'str'}, + 'local_media_cache_maximum_size_mi_b': {'key': 'localMediaCacheMaximumSizeMiB', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphAssetSink, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphAssetSink' # type: str + self.asset_name_pattern = kwargs['asset_name_pattern'] + self.segment_length = kwargs.get('segment_length', None) + self.local_media_cache_path = kwargs['local_media_cache_path'] + self.local_media_cache_maximum_size_mi_b = kwargs['local_media_cache_maximum_size_mi_b'] + + +class MediaGraphCertificateSource(msrest.serialization.Model): + """Base class for certificate sources. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphPemCertificateList. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphPemCertificateList': 'MediaGraphPemCertificateList'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphCertificateSource, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class MediaGraphProcessor(msrest.serialization.Model): + """A node that represents the desired processing of media in a graph. Takes media and/or events as inputs, and emits media and/or event as output. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphExtensionProcessorBase, MediaGraphMotionDetectionProcessor, MediaGraphSignalGateProcessor. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphExtensionProcessorBase': 'MediaGraphExtensionProcessorBase', '#Microsoft.Media.MediaGraphMotionDetectionProcessor': 'MediaGraphMotionDetectionProcessor', '#Microsoft.Media.MediaGraphSignalGateProcessor': 'MediaGraphSignalGateProcessor'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphProcessor, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = kwargs['name'] + self.inputs = kwargs['inputs'] + + +class MediaGraphExtensionProcessorBase(MediaGraphProcessor): + """Processor that allows for extensions outside of the Live Video Analytics Edge module to be integrated into the graph. It is the base class for various different kinds of extension processor types. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphCognitiveServicesVisionExtension, MediaGraphGrpcExtension, MediaGraphHttpExtension. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphCognitiveServicesVisionExtension': 'MediaGraphCognitiveServicesVisionExtension', '#Microsoft.Media.MediaGraphGrpcExtension': 'MediaGraphGrpcExtension', '#Microsoft.Media.MediaGraphHttpExtension': 'MediaGraphHttpExtension'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphExtensionProcessorBase, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphExtensionProcessorBase' # type: str + self.endpoint = kwargs['endpoint'] + self.image = kwargs['image'] + self.sampling_options = kwargs.get('sampling_options', None) + + +class MediaGraphCognitiveServicesVisionExtension(MediaGraphExtensionProcessorBase): + """A processor that allows the media graph to send video frames to a Cognitive Services Vision extension. Inference results are relayed to downstream nodes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphCognitiveServicesVisionExtension, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphCognitiveServicesVisionExtension' # type: str + + +class MediaGraphCredentials(msrest.serialization.Model): + """Credentials to present during authentication. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphHttpHeaderCredentials, MediaGraphUsernamePasswordCredentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphHttpHeaderCredentials': 'MediaGraphHttpHeaderCredentials', '#Microsoft.Media.MediaGraphUsernamePasswordCredentials': 'MediaGraphUsernamePasswordCredentials'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphCredentials, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class MediaGraphEndpoint(msrest.serialization.Model): + """Base class for endpoints. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphTlsEndpoint, MediaGraphUnsecuredEndpoint. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Polymorphic credentials to be presented to the endpoint. + :type credentials: ~azure.media.analyticsedge.models.MediaGraphCredentials + :param url: Required. Url for the endpoint. + :type url: str + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'MediaGraphCredentials'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphTlsEndpoint': 'MediaGraphTlsEndpoint', '#Microsoft.Media.MediaGraphUnsecuredEndpoint': 'MediaGraphUnsecuredEndpoint'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphEndpoint, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.credentials = kwargs.get('credentials', None) + self.url = kwargs['url'] + + +class MediaGraphFileSink(MediaGraphSink): + """Enables a media graph to write/store media (video and audio) to a file on the Edge device. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param base_directory_path: Required. Absolute directory for all outputs to the Edge device + from this sink. + :type base_directory_path: str + :param file_name_pattern: Required. File name pattern for creating new files on the Edge + device. The pattern must include at least one system variable. See the documentation for + available variables and additional examples. + :type file_name_pattern: str + :param maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing + files from this sink. + :type maximum_size_mi_b: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'base_directory_path': {'required': True}, + 'file_name_pattern': {'required': True}, + 'maximum_size_mi_b': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'base_directory_path': {'key': 'baseDirectoryPath', 'type': 'str'}, + 'file_name_pattern': {'key': 'fileNamePattern', 'type': 'str'}, + 'maximum_size_mi_b': {'key': 'maximumSizeMiB', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphFileSink, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphFileSink' # type: str + self.base_directory_path = kwargs['base_directory_path'] + self.file_name_pattern = kwargs['file_name_pattern'] + self.maximum_size_mi_b = kwargs['maximum_size_mi_b'] + + +class MediaGraphGrpcExtension(MediaGraphExtensionProcessorBase): + """A processor that allows the media graph to send video frames to an external inference container over a gRPC connection. This can be done using shared memory (for high frame rates), or over the network. Inference results are relayed to downstream nodes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + :param data_transfer: Required. How media should be transferred to the inference engine. + :type data_transfer: ~azure.media.analyticsedge.models.MediaGraphGrpcExtensionDataTransfer + :param extension_configuration: Optional configuration to pass to the gRPC extension. + :type extension_configuration: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + 'data_transfer': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + 'data_transfer': {'key': 'dataTransfer', 'type': 'MediaGraphGrpcExtensionDataTransfer'}, + 'extension_configuration': {'key': 'extensionConfiguration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphGrpcExtension, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphGrpcExtension' # type: str + self.data_transfer = kwargs['data_transfer'] + self.extension_configuration = kwargs.get('extension_configuration', None) + + +class MediaGraphGrpcExtensionDataTransfer(msrest.serialization.Model): + """Describes how media should be transferred to the inference engine. + + All required parameters must be populated in order to send to Azure. + + :param shared_memory_size_mi_b: The size of the buffer for all in-flight frames in mebibytes if + mode is SharedMemory. Should not be specified otherwise. + :type shared_memory_size_mi_b: str + :param mode: Required. How frame data should be transmitted to the inference engine. Possible + values include: "Embedded", "SharedMemory". + :type mode: str or ~azure.media.analyticsedge.models.MediaGraphGrpcExtensionDataTransferMode + """ + + _validation = { + 'mode': {'required': True}, + } + + _attribute_map = { + 'shared_memory_size_mi_b': {'key': 'sharedMemorySizeMiB', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphGrpcExtensionDataTransfer, self).__init__(**kwargs) + self.shared_memory_size_mi_b = kwargs.get('shared_memory_size_mi_b', None) + self.mode = kwargs['mode'] + + +class MediaGraphHttpExtension(MediaGraphExtensionProcessorBase): + """A processor that allows the media graph to send video frames (mostly at low frame rates e.g. <5 fps) to an external inference container over an HTTP-based RESTful API. Inference results are relayed to downstream nodes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphHttpExtension, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphHttpExtension' # type: str + + +class MediaGraphHttpHeaderCredentials(MediaGraphCredentials): + """Http header service credentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param header_name: Required. HTTP header name. + :type header_name: str + :param header_value: Required. HTTP header value. Please use a parameter so that the actual + value is not returned on PUT or GET requests. + :type header_value: str + """ + + _validation = { + 'type': {'required': True}, + 'header_name': {'required': True}, + 'header_value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'header_value': {'key': 'headerValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphHttpHeaderCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphHttpHeaderCredentials' # type: str + self.header_name = kwargs['header_name'] + self.header_value = kwargs['header_value'] + + +class MediaGraphImage(msrest.serialization.Model): + """Describes the properties of an image frame. + + :param scale: The scaling mode for the image. + :type scale: ~azure.media.analyticsedge.models.MediaGraphImageScale + :param format: Encoding settings for an image. + :type format: ~azure.media.analyticsedge.models.MediaGraphImageFormat + """ + + _attribute_map = { + 'scale': {'key': 'scale', 'type': 'MediaGraphImageScale'}, + 'format': {'key': 'format', 'type': 'MediaGraphImageFormat'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImage, self).__init__(**kwargs) + self.scale = kwargs.get('scale', None) + self.format = kwargs.get('format', None) + + +class MediaGraphImageFormat(msrest.serialization.Model): + """Encoding settings for an image. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphImageFormatBmp, MediaGraphImageFormatJpeg, MediaGraphImageFormatPng, MediaGraphImageFormatRaw. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphImageFormatBmp': 'MediaGraphImageFormatBmp', '#Microsoft.Media.MediaGraphImageFormatJpeg': 'MediaGraphImageFormatJpeg', '#Microsoft.Media.MediaGraphImageFormatPng': 'MediaGraphImageFormatPng', '#Microsoft.Media.MediaGraphImageFormatRaw': 'MediaGraphImageFormatRaw'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormat, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class MediaGraphImageFormatBmp(MediaGraphImageFormat): + """Encoding settings for Bmp images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormatBmp, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatBmp' # type: str + + +class MediaGraphImageFormatJpeg(MediaGraphImageFormat): + """Encoding settings for Jpeg images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param quality: The image quality. Value must be between 0 to 100 (best quality). + :type quality: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'quality': {'key': 'quality', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormatJpeg, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatJpeg' # type: str + self.quality = kwargs.get('quality', None) + + +class MediaGraphImageFormatPng(MediaGraphImageFormat): + """Encoding settings for Png images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormatPng, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatPng' # type: str + + +class MediaGraphImageFormatRaw(MediaGraphImageFormat): + """Encoding settings for raw images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param pixel_format: Required. The pixel format that will be used to encode images. Possible + values include: "Yuv420p", "Rgb565be", "Rgb565le", "Rgb555be", "Rgb555le", "Rgb24", "Bgr24", + "Argb", "Rgba", "Abgr", "Bgra". + :type pixel_format: str or + ~azure.media.analyticsedge.models.MediaGraphImageFormatRawPixelFormat + """ + + _validation = { + 'type': {'required': True}, + 'pixel_format': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'pixel_format': {'key': 'pixelFormat', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormatRaw, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatRaw' # type: str + self.pixel_format = kwargs['pixel_format'] + + +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". + :type mode: str or ~azure.media.analyticsedge.models.MediaGraphImageScaleMode + :param width: The desired output width of the image. + :type width: str + :param height: The desired output height of the image. + :type height: str + """ + + _validation = { + 'mode': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageScale, self).__init__(**kwargs) + self.mode = kwargs['mode'] + self.width = kwargs.get('width', None) + self.height = kwargs.get('height', None) + + +class MediaGraphInstance(msrest.serialization.Model): + """Represents an instance of a media graph. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The identifier for the media graph instance. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: Properties of a media graph instance. + :type properties: ~azure.media.analyticsedge.models.MediaGraphInstanceProperties + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphInstanceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstance, self).__init__(**kwargs) + self.name = kwargs['name'] + self.system_data = kwargs.get('system_data', None) + self.properties = kwargs.get('properties', None) + + +class MediaGraphInstanceActivateRequest(ItemNonSetRequestBase): + """MediaGraphInstanceActivateRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceActivateRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceActivate' # type: str + + +class MediaGraphInstanceCollection(msrest.serialization.Model): + """A collection of media graph instances. + + :param value: A collection of media graph instances. + :type value: list[~azure.media.analyticsedge.models.MediaGraphInstance] + :param continuation_token: A continuation token to use in subsequent calls to enumerate through + the graph instance collection. This is used when the collection contains too many results to + return in one response. + :type continuation_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MediaGraphInstance]'}, + 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class MediaGraphInstanceDeActivateRequest(ItemNonSetRequestBase): + """MediaGraphInstanceDeActivateRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceDeActivateRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceDeactivate' # type: str + + +class MediaGraphInstanceDeleteRequest(ItemNonSetRequestBase): + """MediaGraphInstanceDeleteRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceDeleteRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceDelete' # type: str + + +class MediaGraphInstanceGetRequest(ItemNonSetRequestBase): + """MediaGraphInstanceGetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceGetRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceGet' # type: str + + +class MediaGraphInstanceListRequest(MethodRequest): + """MediaGraphInstanceListRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceListRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceList' # type: str + + +class MediaGraphInstanceProperties(msrest.serialization.Model): + """Properties of a media graph instance. + + :param description: An optional description for the instance. + :type description: str + :param topology_name: The name of the media graph topology that this instance will run. A + topology with this name should already have been set in the Edge module. + :type topology_name: str + :param parameters: List of one or more graph instance parameters. + :type parameters: list[~azure.media.analyticsedge.models.MediaGraphParameterDefinition] + :param state: Allowed states for a graph instance. Possible values include: "Inactive", + "Activating", "Active", "Deactivating". + :type state: str or ~azure.media.analyticsedge.models.MediaGraphInstanceState + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'topology_name': {'key': 'topologyName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[MediaGraphParameterDefinition]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.topology_name = kwargs.get('topology_name', None) + self.parameters = kwargs.get('parameters', None) + self.state = kwargs.get('state', None) + + +class MediaGraphInstanceSetRequest(MethodRequest): + """MediaGraphInstanceSetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param instance: Required. Represents an instance of a media graph. + :type instance: ~azure.media.analyticsedge.models.MediaGraphInstance + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'instance': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'MediaGraphInstance'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceSetRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceSet' # type: str + self.instance = kwargs['instance'] + + +class MediaGraphInstanceSetRequestBody(MediaGraphInstance, MethodRequest): + """MediaGraphInstanceSetRequestBody. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. The identifier for the media graph instance. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: Properties of a media graph instance. + :type properties: ~azure.media.analyticsedge.models.MediaGraphInstanceProperties + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphInstanceProperties'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceSetRequestBody, self).__init__(**kwargs) + self.method_name = 'MediaGraphInstanceSetRequestBody' # type: str + self.method_name = 'MediaGraphInstanceSetRequestBody' # type: str + self.name = kwargs['name'] + self.system_data = kwargs.get('system_data', None) + self.properties = kwargs.get('properties', None) + + +class MediaGraphIoTHubMessageSink(MediaGraphSink): + """Enables a media graph to publish messages that can be delivered via routes declared in the IoT Edge deployment manifest. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param hub_output_name: Required. Name of the output path to which the media graph will publish + message. These messages can then be delivered to desired destinations by declaring routes + referencing the output path in the IoT Edge deployment manifest. + :type hub_output_name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'hub_output_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'hub_output_name': {'key': 'hubOutputName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphIoTHubMessageSink, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphIoTHubMessageSink' # type: str + self.hub_output_name = kwargs['hub_output_name'] + + +class MediaGraphSource(msrest.serialization.Model): + """A source node in a media graph. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphIoTHubMessageSource, MediaGraphRtspSource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the source node. The discriminator for derived + types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for this source node. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphIoTHubMessageSource': 'MediaGraphIoTHubMessageSource', '#Microsoft.Media.MediaGraphRtspSource': 'MediaGraphRtspSource'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphSource, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = kwargs['name'] + + +class MediaGraphIoTHubMessageSource(MediaGraphSource): + """Enables a media graph to receive messages via routes declared in the IoT Edge deployment manifest. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the source node. The discriminator for derived + types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for this source node. + :type name: str + :param hub_input_name: Name of the input path where messages can be routed to (via routes + declared in the IoT Edge deployment manifest). + :type hub_input_name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'hub_input_name': {'key': 'hubInputName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphIoTHubMessageSource, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphIoTHubMessageSource' # type: str + self.hub_input_name = kwargs.get('hub_input_name', None) + + +class MediaGraphMotionDetectionProcessor(MediaGraphProcessor): + """A node that accepts raw video as input, and detects if there are moving objects present. If so, then it emits an event, and allows frames where motion was detected to pass through. Other frames are blocked/dropped. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param sensitivity: Enumeration that specifies the sensitivity of the motion detection + processor. Possible values include: "Low", "Medium", "High". + :type sensitivity: str or + ~azure.media.analyticsedge.models.MediaGraphMotionDetectionSensitivity + :param output_motion_region: Indicates whether the processor should detect and output the + regions, within the video frame, where motion was detected. Default is true. + :type output_motion_region: bool + :param event_aggregation_window: Event aggregation window duration, or 0 for no aggregation. + :type event_aggregation_window: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, + 'output_motion_region': {'key': 'outputMotionRegion', 'type': 'bool'}, + 'event_aggregation_window': {'key': 'eventAggregationWindow', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphMotionDetectionProcessor, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphMotionDetectionProcessor' # type: str + self.sensitivity = kwargs.get('sensitivity', None) + self.output_motion_region = kwargs.get('output_motion_region', None) + self.event_aggregation_window = kwargs.get('event_aggregation_window', None) + + +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. + :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] + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'output_selectors': {'key': 'outputSelectors', 'type': '[MediaGraphOutputSelector]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphNodeInput, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + 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 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.operator = kwargs.get('operator', None) + self.value = kwargs.get('value', None) + + +class MediaGraphParameterDeclaration(msrest.serialization.Model): + """The declaration of a parameter in the media graph topology. A media graph topology can be authored with parameters. Then, during graph instance creation, the value for those parameters can be specified. This allows the same graph topology to be used as a blueprint for multiple graph instances with different values for the parameters. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the parameter. + :type name: str + :param type: Required. The type of the parameter. Possible values include: "String", + "SecretString", "Int", "Double", "Bool". + :type type: str or ~azure.media.analyticsedge.models.MediaGraphParameterType + :param description: Description of the parameter. + :type description: str + :param default: The default value for the parameter to be used if the media graph instance does + not specify a value. + :type default: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 64, 'min_length': 0}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphParameterDeclaration, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type = kwargs['type'] + self.description = kwargs.get('description', None) + self.default = kwargs.get('default', None) + + +class MediaGraphParameterDefinition(msrest.serialization.Model): + """A key-value pair. A media graph topology allows certain values to be parameterized. When an instance is created, the parameters are supplied with arguments specific to that instance. This allows the same graph topology to be used as a blueprint for multiple graph instances with different values for the parameters. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the parameter defined in the media graph topology. + :type name: str + :param value: Required. The value to supply for the named parameter defined in the media graph + topology. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphParameterDefinition, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs['value'] + + +class MediaGraphPemCertificateList(MediaGraphCertificateSource): + """A list of PEM formatted certificates. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param certificates: Required. PEM formatted public certificates one per entry. + :type certificates: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'certificates': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphPemCertificateList, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphPemCertificateList' # type: str + self.certificates = kwargs['certificates'] + + +class MediaGraphRtspSource(MediaGraphSource): + """Enables a media graph to capture media from a RTSP server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the source node. The discriminator for derived + types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for this source node. + :type name: str + :param transport: Underlying RTSP transport. This is used to enable or disable HTTP tunneling. + Possible values include: "Http", "Tcp". + :type transport: str or ~azure.media.analyticsedge.models.MediaGraphRtspTransport + :param endpoint: Required. RTSP endpoint of the stream that is being connected to. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'transport': {'key': 'transport', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphRtspSource, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphRtspSource' # type: str + self.transport = kwargs.get('transport', None) + self.endpoint = kwargs['endpoint'] + + +class MediaGraphSamplingOptions(msrest.serialization.Model): + """Describes the properties of a sample. + + :param skip_samples_without_annotation: If true, limits the samples submitted to the extension + to only samples which have associated inference(s). + :type skip_samples_without_annotation: str + :param maximum_samples_per_second: Maximum rate of samples submitted to the extension. + :type maximum_samples_per_second: str + """ + + _attribute_map = { + 'skip_samples_without_annotation': {'key': 'skipSamplesWithoutAnnotation', 'type': 'str'}, + 'maximum_samples_per_second': {'key': 'maximumSamplesPerSecond', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphSamplingOptions, self).__init__(**kwargs) + self.skip_samples_without_annotation = kwargs.get('skip_samples_without_annotation', None) + self.maximum_samples_per_second = kwargs.get('maximum_samples_per_second', None) + + +class MediaGraphSignalGateProcessor(MediaGraphProcessor): + """A signal gate determines when to block (gate) incoming media, and when to allow it through. It gathers input events over the activationEvaluationWindow, and determines whether to open or close the gate. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param activation_evaluation_window: The period of time over which the gate gathers input + events before evaluating them. + :type activation_evaluation_window: str + :param activation_signal_offset: Required. Signal offset once the gate is activated (can be + negative). It is an offset between the time the event is received, and the timestamp of the + first media sample (eg. video frame) that is allowed through by the gate. + :type activation_signal_offset: str + :param minimum_activation_time: Required. The minimum period for which the gate remains open in + the absence of subsequent triggers (events). + :type minimum_activation_time: str + :param maximum_activation_time: Required. The maximum period for which the gate remains open in + the presence of subsequent events. + :type maximum_activation_time: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'activation_signal_offset': {'required': True}, + 'minimum_activation_time': {'required': True}, + 'maximum_activation_time': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'activation_evaluation_window': {'key': 'activationEvaluationWindow', 'type': 'str'}, + 'activation_signal_offset': {'key': 'activationSignalOffset', 'type': 'str'}, + 'minimum_activation_time': {'key': 'minimumActivationTime', 'type': 'str'}, + 'maximum_activation_time': {'key': 'maximumActivationTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphSignalGateProcessor, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphSignalGateProcessor' # type: str + self.activation_evaluation_window = kwargs.get('activation_evaluation_window', None) + self.activation_signal_offset = kwargs['activation_signal_offset'] + self.minimum_activation_time = kwargs['minimum_activation_time'] + self.maximum_activation_time = kwargs['maximum_activation_time'] + + +class MediaGraphSystemData(msrest.serialization.Model): + """The system data for a resource. This is used by both topologies and instances. + + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphSystemData, self).__init__(**kwargs) + self.created_at = kwargs.get('created_at', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class MediaGraphTlsEndpoint(MediaGraphEndpoint): + """A TLS endpoint for media graph external connections. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Polymorphic credentials to be presented to the endpoint. + :type credentials: ~azure.media.analyticsedge.models.MediaGraphCredentials + :param url: Required. Url for the endpoint. + :type url: str + :param trusted_certificates: Trusted certificates when authenticating a TLS connection. Null + designates that Azure Media Service's source of trust should be used. + :type trusted_certificates: ~azure.media.analyticsedge.models.MediaGraphCertificateSource + :param validation_options: Validation options to use when authenticating a TLS connection. By + default, strict validation is used. + :type validation_options: ~azure.media.analyticsedge.models.MediaGraphTlsValidationOptions + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'MediaGraphCredentials'}, + 'url': {'key': 'url', 'type': 'str'}, + 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'MediaGraphCertificateSource'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MediaGraphTlsValidationOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphTlsEndpoint, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphTlsEndpoint' # type: str + self.trusted_certificates = kwargs.get('trusted_certificates', None) + self.validation_options = kwargs.get('validation_options', None) + + +class MediaGraphTlsValidationOptions(msrest.serialization.Model): + """Options for controlling the authentication of TLS endpoints. + + :param ignore_hostname: Boolean value ignoring the host name (common name) during validation. + :type ignore_hostname: str + :param ignore_signature: Boolean value ignoring the integrity of the certificate chain at the + current time. + :type ignore_signature: str + """ + + _attribute_map = { + 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, + 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphTlsValidationOptions, self).__init__(**kwargs) + self.ignore_hostname = kwargs.get('ignore_hostname', None) + self.ignore_signature = kwargs.get('ignore_signature', None) + + +class MediaGraphTopology(msrest.serialization.Model): + """The definition of a media graph topology. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The identifier for the media graph topology. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: A description of the properties of a media graph topology. + :type properties: ~azure.media.analyticsedge.models.MediaGraphTopologyProperties + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphTopologyProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopology, self).__init__(**kwargs) + self.name = kwargs['name'] + self.system_data = kwargs.get('system_data', None) + self.properties = kwargs.get('properties', None) + + +class MediaGraphTopologyCollection(msrest.serialization.Model): + """A collection of media graph topologies. + + :param value: A collection of media graph topologies. + :type value: list[~azure.media.analyticsedge.models.MediaGraphTopology] + :param continuation_token: A continuation token to use in subsequent calls to enumerate through + the graph topologies collection. This is used when the collection contains too many results to + return in one response. + :type continuation_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MediaGraphTopology]'}, + 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologyCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class MediaGraphTopologyDeleteRequest(ItemNonSetRequestBase): + """MediaGraphTopologyDeleteRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologyDeleteRequest, self).__init__(**kwargs) + self.method_name = 'GraphTopologyDelete' # type: str + + +class MediaGraphTopologyGetRequest(ItemNonSetRequestBase): + """MediaGraphTopologyGetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologyGetRequest, self).__init__(**kwargs) + self.method_name = 'GraphTopologyGet' # type: str + + +class MediaGraphTopologyListRequest(MethodRequest): + """MediaGraphTopologyListRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologyListRequest, self).__init__(**kwargs) + self.method_name = 'GraphTopologyList' # type: str + + +class MediaGraphTopologyProperties(msrest.serialization.Model): + """A description of the properties of a media graph topology. + + :param description: A description of a media graph topology. It is recommended to use this to + describe the expected use of the topology. + :type description: str + :param parameters: The list of parameters defined in the topology. The value for these + parameters are supplied by instances of this topology. + :type parameters: list[~azure.media.analyticsedge.models.MediaGraphParameterDeclaration] + :param sources: The list of source nodes in this topology. + :type sources: list[~azure.media.analyticsedge.models.MediaGraphSource] + :param processors: The list of processor nodes in this topology. + :type processors: list[~azure.media.analyticsedge.models.MediaGraphProcessor] + :param sinks: The list of sink nodes in this topology. + :type sinks: list[~azure.media.analyticsedge.models.MediaGraphSink] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[MediaGraphParameterDeclaration]'}, + 'sources': {'key': 'sources', 'type': '[MediaGraphSource]'}, + 'processors': {'key': 'processors', 'type': '[MediaGraphProcessor]'}, + 'sinks': {'key': 'sinks', 'type': '[MediaGraphSink]'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologyProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.parameters = kwargs.get('parameters', None) + self.sources = kwargs.get('sources', None) + self.processors = kwargs.get('processors', None) + self.sinks = kwargs.get('sinks', None) + + +class MediaGraphTopologySetRequest(MethodRequest): + """MediaGraphTopologySetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param graph: Required. The definition of a media graph topology. + :type graph: ~azure.media.analyticsedge.models.MediaGraphTopology + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'graph': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'graph': {'key': 'graph', 'type': 'MediaGraphTopology'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologySetRequest, self).__init__(**kwargs) + self.method_name = 'GraphTopologySet' # type: str + self.graph = kwargs['graph'] + + +class MediaGraphTopologySetRequestBody(MediaGraphTopology, MethodRequest): + """MediaGraphTopologySetRequestBody. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. The identifier for the media graph topology. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: A description of the properties of a media graph topology. + :type properties: ~azure.media.analyticsedge.models.MediaGraphTopologyProperties + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphTopologyProperties'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologySetRequestBody, self).__init__(**kwargs) + self.method_name = 'MediaGraphTopologySetRequestBody' # type: str + self.method_name = 'MediaGraphTopologySetRequestBody' # type: str + self.name = kwargs['name'] + self.system_data = kwargs.get('system_data', None) + self.properties = kwargs.get('properties', None) + + +class MediaGraphUnsecuredEndpoint(MediaGraphEndpoint): + """An endpoint that the media graph can connect to, with no encryption in transit. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Polymorphic credentials to be presented to the endpoint. + :type credentials: ~azure.media.analyticsedge.models.MediaGraphCredentials + :param url: Required. Url for the endpoint. + :type url: str + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'MediaGraphCredentials'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphUnsecuredEndpoint, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphUnsecuredEndpoint' # type: str + + +class MediaGraphUsernamePasswordCredentials(MediaGraphCredentials): + """Username/password credential pair. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :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. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphUsernamePasswordCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphUsernamePasswordCredentials' # type: str + self.username = kwargs['username'] + self.password = kwargs.get('password', None) 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 new file mode 100644 index 000000000000..7542b26cb7dc --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py @@ -0,0 +1,2305 @@ +# 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. +# -------------------------------------------------------------------------- + +import datetime +from typing import List, Optional, Union + +import msrest.serialization + +from ._direct_methodsfor_live_video_analyticson_io_tedge_enums import * + + +class MethodRequest(msrest.serialization.Model): + """MethodRequest. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphInstanceListRequest, MediaGraphInstanceSetRequest, MediaGraphTopologyListRequest, MediaGraphTopologySetRequest, ItemNonSetRequestBase, MediaGraphInstanceSetRequestBody, MediaGraphTopologySetRequestBody. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + _subtype_map = { + 'method_name': {'GraphInstanceList': 'MediaGraphInstanceListRequest', 'GraphInstanceSet': 'MediaGraphInstanceSetRequest', 'GraphTopologyList': 'MediaGraphTopologyListRequest', 'GraphTopologySet': 'MediaGraphTopologySetRequest', 'ItemNonSetRequestBase': 'ItemNonSetRequestBase', 'MediaGraphInstanceSetRequestBody': 'MediaGraphInstanceSetRequestBody', 'MediaGraphTopologySetRequestBody': 'MediaGraphTopologySetRequestBody'} + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MethodRequest, self).__init__(**kwargs) + self.method_name = None # type: Optional[str] + + +class ItemNonSetRequestBase(MethodRequest): + """ItemNonSetRequestBase. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphInstanceActivateRequest, MediaGraphInstanceDeActivateRequest, MediaGraphInstanceDeleteRequest, MediaGraphInstanceGetRequest, MediaGraphTopologyDeleteRequest, MediaGraphTopologyGetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'method_name': {'GraphInstanceActivate': 'MediaGraphInstanceActivateRequest', 'GraphInstanceDeactivate': 'MediaGraphInstanceDeActivateRequest', 'GraphInstanceDelete': 'MediaGraphInstanceDeleteRequest', 'GraphInstanceGet': 'MediaGraphInstanceGetRequest', 'GraphTopologyDelete': 'MediaGraphTopologyDeleteRequest', 'GraphTopologyGet': 'MediaGraphTopologyGetRequest'} + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(ItemNonSetRequestBase, self).__init__(**kwargs) + self.method_name = 'ItemNonSetRequestBase' # type: str + self.name = name + + +class MediaGraphSink(msrest.serialization.Model): + """Enables a media graph to write media data to a destination outside of the Live Video Analytics IoT Edge module. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphAssetSink, MediaGraphFileSink, MediaGraphIoTHubMessageSink. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphAssetSink': 'MediaGraphAssetSink', '#Microsoft.Media.MediaGraphFileSink': 'MediaGraphFileSink', '#Microsoft.Media.MediaGraphIoTHubMessageSink': 'MediaGraphIoTHubMessageSink'} + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + **kwargs + ): + super(MediaGraphSink, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = name + self.inputs = inputs + + +class MediaGraphAssetSink(MediaGraphSink): + """Enables a media graph to record media to an Azure Media Services asset for subsequent playback. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param asset_name_pattern: Required. A name pattern when creating new assets. The pattern must + include at least one system variable. See the documentation for available variables and + additional examples. + :type asset_name_pattern: str + :param segment_length: When writing media to an asset, wait until at least this duration of + media has been accumulated on the Edge. Expressed in increments of 30 seconds, with a minimum + of 30 seconds and a recommended maximum of 5 minutes. + :type segment_length: str + :param local_media_cache_path: Required. Path to a local file system directory for temporary + caching of media before writing to an Asset. Used when the Edge device is temporarily + disconnected from Azure. + :type local_media_cache_path: str + :param local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can be + used for temporary caching of media. + :type local_media_cache_maximum_size_mi_b: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'asset_name_pattern': {'required': True}, + 'local_media_cache_path': {'required': True}, + 'local_media_cache_maximum_size_mi_b': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'asset_name_pattern': {'key': 'assetNamePattern', 'type': 'str'}, + 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'local_media_cache_path': {'key': 'localMediaCachePath', 'type': 'str'}, + 'local_media_cache_maximum_size_mi_b': {'key': 'localMediaCacheMaximumSizeMiB', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + asset_name_pattern: str, + local_media_cache_path: str, + local_media_cache_maximum_size_mi_b: str, + segment_length: Optional[str] = None, + **kwargs + ): + super(MediaGraphAssetSink, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.Media.MediaGraphAssetSink' # type: str + self.asset_name_pattern = asset_name_pattern + self.segment_length = segment_length + self.local_media_cache_path = local_media_cache_path + self.local_media_cache_maximum_size_mi_b = local_media_cache_maximum_size_mi_b + + +class MediaGraphCertificateSource(msrest.serialization.Model): + """Base class for certificate sources. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphPemCertificateList. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphPemCertificateList': 'MediaGraphPemCertificateList'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphCertificateSource, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class MediaGraphProcessor(msrest.serialization.Model): + """A node that represents the desired processing of media in a graph. Takes media and/or events as inputs, and emits media and/or event as output. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphExtensionProcessorBase, MediaGraphMotionDetectionProcessor, MediaGraphSignalGateProcessor. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphExtensionProcessorBase': 'MediaGraphExtensionProcessorBase', '#Microsoft.Media.MediaGraphMotionDetectionProcessor': 'MediaGraphMotionDetectionProcessor', '#Microsoft.Media.MediaGraphSignalGateProcessor': 'MediaGraphSignalGateProcessor'} + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + **kwargs + ): + super(MediaGraphProcessor, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = name + self.inputs = inputs + + +class MediaGraphExtensionProcessorBase(MediaGraphProcessor): + """Processor that allows for extensions outside of the Live Video Analytics Edge module to be integrated into the graph. It is the base class for various different kinds of extension processor types. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphCognitiveServicesVisionExtension, MediaGraphGrpcExtension, MediaGraphHttpExtension. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphCognitiveServicesVisionExtension': 'MediaGraphCognitiveServicesVisionExtension', '#Microsoft.Media.MediaGraphGrpcExtension': 'MediaGraphGrpcExtension', '#Microsoft.Media.MediaGraphHttpExtension': 'MediaGraphHttpExtension'} + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + endpoint: "MediaGraphEndpoint", + image: "MediaGraphImage", + sampling_options: Optional["MediaGraphSamplingOptions"] = None, + **kwargs + ): + super(MediaGraphExtensionProcessorBase, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.Media.MediaGraphExtensionProcessorBase' # type: str + self.endpoint = endpoint + self.image = image + self.sampling_options = sampling_options + + +class MediaGraphCognitiveServicesVisionExtension(MediaGraphExtensionProcessorBase): + """A processor that allows the media graph to send video frames to a Cognitive Services Vision extension. Inference results are relayed to downstream nodes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + endpoint: "MediaGraphEndpoint", + image: "MediaGraphImage", + sampling_options: Optional["MediaGraphSamplingOptions"] = None, + **kwargs + ): + super(MediaGraphCognitiveServicesVisionExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) + self.type = '#Microsoft.Media.MediaGraphCognitiveServicesVisionExtension' # type: str + + +class MediaGraphCredentials(msrest.serialization.Model): + """Credentials to present during authentication. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphHttpHeaderCredentials, MediaGraphUsernamePasswordCredentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphHttpHeaderCredentials': 'MediaGraphHttpHeaderCredentials', '#Microsoft.Media.MediaGraphUsernamePasswordCredentials': 'MediaGraphUsernamePasswordCredentials'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphCredentials, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class MediaGraphEndpoint(msrest.serialization.Model): + """Base class for endpoints. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphTlsEndpoint, MediaGraphUnsecuredEndpoint. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Polymorphic credentials to be presented to the endpoint. + :type credentials: ~azure.media.analyticsedge.models.MediaGraphCredentials + :param url: Required. Url for the endpoint. + :type url: str + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'MediaGraphCredentials'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphTlsEndpoint': 'MediaGraphTlsEndpoint', '#Microsoft.Media.MediaGraphUnsecuredEndpoint': 'MediaGraphUnsecuredEndpoint'} + } + + def __init__( + self, + *, + url: str, + credentials: Optional["MediaGraphCredentials"] = None, + **kwargs + ): + super(MediaGraphEndpoint, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.credentials = credentials + self.url = url + + +class MediaGraphFileSink(MediaGraphSink): + """Enables a media graph to write/store media (video and audio) to a file on the Edge device. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param base_directory_path: Required. Absolute directory for all outputs to the Edge device + from this sink. + :type base_directory_path: str + :param file_name_pattern: Required. File name pattern for creating new files on the Edge + device. The pattern must include at least one system variable. See the documentation for + available variables and additional examples. + :type file_name_pattern: str + :param maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing + files from this sink. + :type maximum_size_mi_b: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'base_directory_path': {'required': True}, + 'file_name_pattern': {'required': True}, + 'maximum_size_mi_b': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'base_directory_path': {'key': 'baseDirectoryPath', 'type': 'str'}, + 'file_name_pattern': {'key': 'fileNamePattern', 'type': 'str'}, + 'maximum_size_mi_b': {'key': 'maximumSizeMiB', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + base_directory_path: str, + file_name_pattern: str, + maximum_size_mi_b: str, + **kwargs + ): + super(MediaGraphFileSink, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.Media.MediaGraphFileSink' # type: str + self.base_directory_path = base_directory_path + self.file_name_pattern = file_name_pattern + self.maximum_size_mi_b = maximum_size_mi_b + + +class MediaGraphGrpcExtension(MediaGraphExtensionProcessorBase): + """A processor that allows the media graph to send video frames to an external inference container over a gRPC connection. This can be done using shared memory (for high frame rates), or over the network. Inference results are relayed to downstream nodes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + :param data_transfer: Required. How media should be transferred to the inference engine. + :type data_transfer: ~azure.media.analyticsedge.models.MediaGraphGrpcExtensionDataTransfer + :param extension_configuration: Optional configuration to pass to the gRPC extension. + :type extension_configuration: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + 'data_transfer': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + 'data_transfer': {'key': 'dataTransfer', 'type': 'MediaGraphGrpcExtensionDataTransfer'}, + 'extension_configuration': {'key': 'extensionConfiguration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + endpoint: "MediaGraphEndpoint", + image: "MediaGraphImage", + data_transfer: "MediaGraphGrpcExtensionDataTransfer", + sampling_options: Optional["MediaGraphSamplingOptions"] = None, + extension_configuration: Optional[str] = None, + **kwargs + ): + super(MediaGraphGrpcExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) + self.type = '#Microsoft.Media.MediaGraphGrpcExtension' # type: str + self.data_transfer = data_transfer + self.extension_configuration = extension_configuration + + +class MediaGraphGrpcExtensionDataTransfer(msrest.serialization.Model): + """Describes how media should be transferred to the inference engine. + + All required parameters must be populated in order to send to Azure. + + :param shared_memory_size_mi_b: The size of the buffer for all in-flight frames in mebibytes if + mode is SharedMemory. Should not be specified otherwise. + :type shared_memory_size_mi_b: str + :param mode: Required. How frame data should be transmitted to the inference engine. Possible + values include: "Embedded", "SharedMemory". + :type mode: str or ~azure.media.analyticsedge.models.MediaGraphGrpcExtensionDataTransferMode + """ + + _validation = { + 'mode': {'required': True}, + } + + _attribute_map = { + 'shared_memory_size_mi_b': {'key': 'sharedMemorySizeMiB', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Union[str, "MediaGraphGrpcExtensionDataTransferMode"], + shared_memory_size_mi_b: Optional[str] = None, + **kwargs + ): + super(MediaGraphGrpcExtensionDataTransfer, self).__init__(**kwargs) + self.shared_memory_size_mi_b = shared_memory_size_mi_b + self.mode = mode + + +class MediaGraphHttpExtension(MediaGraphExtensionProcessorBase): + """A processor that allows the media graph to send video frames (mostly at low frame rates e.g. <5 fps) to an external inference container over an HTTP-based RESTful API. Inference results are relayed to downstream nodes. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param endpoint: Required. Endpoint to which this processor should connect. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + :param image: Required. Describes the parameters of the image that is sent as input to the + endpoint. + :type image: ~azure.media.analyticsedge.models.MediaGraphImage + :param sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :type sampling_options: ~azure.media.analyticsedge.models.MediaGraphSamplingOptions + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'endpoint': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + 'image': {'key': 'image', 'type': 'MediaGraphImage'}, + 'sampling_options': {'key': 'samplingOptions', 'type': 'MediaGraphSamplingOptions'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + endpoint: "MediaGraphEndpoint", + image: "MediaGraphImage", + sampling_options: Optional["MediaGraphSamplingOptions"] = None, + **kwargs + ): + super(MediaGraphHttpExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) + self.type = '#Microsoft.Media.MediaGraphHttpExtension' # type: str + + +class MediaGraphHttpHeaderCredentials(MediaGraphCredentials): + """Http header service credentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param header_name: Required. HTTP header name. + :type header_name: str + :param header_value: Required. HTTP header value. Please use a parameter so that the actual + value is not returned on PUT or GET requests. + :type header_value: str + """ + + _validation = { + 'type': {'required': True}, + 'header_name': {'required': True}, + 'header_value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'header_value': {'key': 'headerValue', 'type': 'str'}, + } + + def __init__( + self, + *, + header_name: str, + header_value: str, + **kwargs + ): + super(MediaGraphHttpHeaderCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphHttpHeaderCredentials' # type: str + self.header_name = header_name + self.header_value = header_value + + +class MediaGraphImage(msrest.serialization.Model): + """Describes the properties of an image frame. + + :param scale: The scaling mode for the image. + :type scale: ~azure.media.analyticsedge.models.MediaGraphImageScale + :param format: Encoding settings for an image. + :type format: ~azure.media.analyticsedge.models.MediaGraphImageFormat + """ + + _attribute_map = { + 'scale': {'key': 'scale', 'type': 'MediaGraphImageScale'}, + 'format': {'key': 'format', 'type': 'MediaGraphImageFormat'}, + } + + def __init__( + self, + *, + scale: Optional["MediaGraphImageScale"] = None, + format: Optional["MediaGraphImageFormat"] = None, + **kwargs + ): + super(MediaGraphImage, self).__init__(**kwargs) + self.scale = scale + self.format = format + + +class MediaGraphImageFormat(msrest.serialization.Model): + """Encoding settings for an image. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphImageFormatBmp, MediaGraphImageFormatJpeg, MediaGraphImageFormatPng, MediaGraphImageFormatRaw. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphImageFormatBmp': 'MediaGraphImageFormatBmp', '#Microsoft.Media.MediaGraphImageFormatJpeg': 'MediaGraphImageFormatJpeg', '#Microsoft.Media.MediaGraphImageFormatPng': 'MediaGraphImageFormatPng', '#Microsoft.Media.MediaGraphImageFormatRaw': 'MediaGraphImageFormatRaw'} + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormat, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class MediaGraphImageFormatBmp(MediaGraphImageFormat): + """Encoding settings for Bmp images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormatBmp, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatBmp' # type: str + + +class MediaGraphImageFormatJpeg(MediaGraphImageFormat): + """Encoding settings for Jpeg images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param quality: The image quality. Value must be between 0 to 100 (best quality). + :type quality: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'quality': {'key': 'quality', 'type': 'str'}, + } + + def __init__( + self, + *, + quality: Optional[str] = None, + **kwargs + ): + super(MediaGraphImageFormatJpeg, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatJpeg' # type: str + self.quality = quality + + +class MediaGraphImageFormatPng(MediaGraphImageFormat): + """Encoding settings for Png images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MediaGraphImageFormatPng, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatPng' # type: str + + +class MediaGraphImageFormatRaw(MediaGraphImageFormat): + """Encoding settings for raw images. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param pixel_format: Required. The pixel format that will be used to encode images. Possible + values include: "Yuv420p", "Rgb565be", "Rgb565le", "Rgb555be", "Rgb555le", "Rgb24", "Bgr24", + "Argb", "Rgba", "Abgr", "Bgra". + :type pixel_format: str or + ~azure.media.analyticsedge.models.MediaGraphImageFormatRawPixelFormat + """ + + _validation = { + 'type': {'required': True}, + 'pixel_format': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'pixel_format': {'key': 'pixelFormat', 'type': 'str'}, + } + + def __init__( + self, + *, + pixel_format: Union[str, "MediaGraphImageFormatRawPixelFormat"], + **kwargs + ): + super(MediaGraphImageFormatRaw, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphImageFormatRaw' # type: str + self.pixel_format = pixel_format + + +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". + :type mode: str or ~azure.media.analyticsedge.models.MediaGraphImageScaleMode + :param width: The desired output width of the image. + :type width: str + :param height: The desired output height of the image. + :type height: str + """ + + _validation = { + 'mode': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Union[str, "MediaGraphImageScaleMode"], + width: Optional[str] = None, + height: Optional[str] = None, + **kwargs + ): + super(MediaGraphImageScale, self).__init__(**kwargs) + self.mode = mode + self.width = width + self.height = height + + +class MediaGraphInstance(msrest.serialization.Model): + """Represents an instance of a media graph. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The identifier for the media graph instance. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: Properties of a media graph instance. + :type properties: ~azure.media.analyticsedge.models.MediaGraphInstanceProperties + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphInstanceProperties'}, + } + + def __init__( + self, + *, + name: str, + system_data: Optional["MediaGraphSystemData"] = None, + properties: Optional["MediaGraphInstanceProperties"] = None, + **kwargs + ): + super(MediaGraphInstance, self).__init__(**kwargs) + self.name = name + self.system_data = system_data + self.properties = properties + + +class MediaGraphInstanceActivateRequest(ItemNonSetRequestBase): + """MediaGraphInstanceActivateRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphInstanceActivateRequest, self).__init__(name=name, **kwargs) + self.method_name = 'GraphInstanceActivate' # type: str + + +class MediaGraphInstanceCollection(msrest.serialization.Model): + """A collection of media graph instances. + + :param value: A collection of media graph instances. + :type value: list[~azure.media.analyticsedge.models.MediaGraphInstance] + :param continuation_token: A continuation token to use in subsequent calls to enumerate through + the graph instance collection. This is used when the collection contains too many results to + return in one response. + :type continuation_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MediaGraphInstance]'}, + 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MediaGraphInstance"]] = None, + continuation_token: Optional[str] = None, + **kwargs + ): + super(MediaGraphInstanceCollection, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + + +class MediaGraphInstanceDeActivateRequest(ItemNonSetRequestBase): + """MediaGraphInstanceDeActivateRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphInstanceDeActivateRequest, self).__init__(name=name, **kwargs) + self.method_name = 'GraphInstanceDeactivate' # type: str + + +class MediaGraphInstanceDeleteRequest(ItemNonSetRequestBase): + """MediaGraphInstanceDeleteRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphInstanceDeleteRequest, self).__init__(name=name, **kwargs) + self.method_name = 'GraphInstanceDelete' # type: str + + +class MediaGraphInstanceGetRequest(ItemNonSetRequestBase): + """MediaGraphInstanceGetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphInstanceGetRequest, self).__init__(name=name, **kwargs) + self.method_name = 'GraphInstanceGet' # type: str + + +class MediaGraphInstanceListRequest(MethodRequest): + """MediaGraphInstanceListRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphInstanceListRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceList' # type: str + + +class MediaGraphInstanceProperties(msrest.serialization.Model): + """Properties of a media graph instance. + + :param description: An optional description for the instance. + :type description: str + :param topology_name: The name of the media graph topology that this instance will run. A + topology with this name should already have been set in the Edge module. + :type topology_name: str + :param parameters: List of one or more graph instance parameters. + :type parameters: list[~azure.media.analyticsedge.models.MediaGraphParameterDefinition] + :param state: Allowed states for a graph instance. Possible values include: "Inactive", + "Activating", "Active", "Deactivating". + :type state: str or ~azure.media.analyticsedge.models.MediaGraphInstanceState + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'topology_name': {'key': 'topologyName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[MediaGraphParameterDefinition]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + topology_name: Optional[str] = None, + parameters: Optional[List["MediaGraphParameterDefinition"]] = None, + state: Optional[Union[str, "MediaGraphInstanceState"]] = None, + **kwargs + ): + super(MediaGraphInstanceProperties, self).__init__(**kwargs) + self.description = description + self.topology_name = topology_name + self.parameters = parameters + self.state = state + + +class MediaGraphInstanceSetRequest(MethodRequest): + """MediaGraphInstanceSetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param instance: Required. Represents an instance of a media graph. + :type instance: ~azure.media.analyticsedge.models.MediaGraphInstance + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'instance': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'MediaGraphInstance'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + instance: "MediaGraphInstance", + **kwargs + ): + super(MediaGraphInstanceSetRequest, self).__init__(**kwargs) + self.method_name = 'GraphInstanceSet' # type: str + self.instance = instance + + +class MediaGraphInstanceSetRequestBody(MediaGraphInstance, MethodRequest): + """MediaGraphInstanceSetRequestBody. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. The identifier for the media graph instance. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: Properties of a media graph instance. + :type properties: ~azure.media.analyticsedge.models.MediaGraphInstanceProperties + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphInstanceProperties'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + system_data: Optional["MediaGraphSystemData"] = None, + properties: Optional["MediaGraphInstanceProperties"] = None, + **kwargs + ): + super(MediaGraphInstanceSetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, **kwargs) + self.method_name = 'MediaGraphInstanceSetRequestBody' # type: str + self.method_name = 'MediaGraphInstanceSetRequestBody' # type: str + self.name = name + self.system_data = system_data + self.properties = properties + + +class MediaGraphIoTHubMessageSink(MediaGraphSink): + """Enables a media graph to publish messages that can be delivered via routes declared in the IoT Edge deployment manifest. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for the media graph sink. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this sink node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param hub_output_name: Required. Name of the output path to which the media graph will publish + message. These messages can then be delivered to desired destinations by declaring routes + referencing the output path in the IoT Edge deployment manifest. + :type hub_output_name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'hub_output_name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'hub_output_name': {'key': 'hubOutputName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + hub_output_name: str, + **kwargs + ): + super(MediaGraphIoTHubMessageSink, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.Media.MediaGraphIoTHubMessageSink' # type: str + self.hub_output_name = hub_output_name + + +class MediaGraphSource(msrest.serialization.Model): + """A source node in a media graph. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaGraphIoTHubMessageSource, MediaGraphRtspSource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the source node. The discriminator for derived + types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for this source node. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.Media.MediaGraphIoTHubMessageSource': 'MediaGraphIoTHubMessageSource', '#Microsoft.Media.MediaGraphRtspSource': 'MediaGraphRtspSource'} + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphSource, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = name + + +class MediaGraphIoTHubMessageSource(MediaGraphSource): + """Enables a media graph to receive messages via routes declared in the IoT Edge deployment manifest. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the source node. The discriminator for derived + types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for this source node. + :type name: str + :param hub_input_name: Name of the input path where messages can be routed to (via routes + declared in the IoT Edge deployment manifest). + :type hub_input_name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'hub_input_name': {'key': 'hubInputName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + hub_input_name: Optional[str] = None, + **kwargs + ): + super(MediaGraphIoTHubMessageSource, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.Media.MediaGraphIoTHubMessageSource' # type: str + self.hub_input_name = hub_input_name + + +class MediaGraphMotionDetectionProcessor(MediaGraphProcessor): + """A node that accepts raw video as input, and detects if there are moving objects present. If so, then it emits an event, and allows frames where motion was detected to pass through. Other frames are blocked/dropped. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param sensitivity: Enumeration that specifies the sensitivity of the motion detection + processor. Possible values include: "Low", "Medium", "High". + :type sensitivity: str or + ~azure.media.analyticsedge.models.MediaGraphMotionDetectionSensitivity + :param output_motion_region: Indicates whether the processor should detect and output the + regions, within the video frame, where motion was detected. Default is true. + :type output_motion_region: bool + :param event_aggregation_window: Event aggregation window duration, or 0 for no aggregation. + :type event_aggregation_window: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, + 'output_motion_region': {'key': 'outputMotionRegion', 'type': 'bool'}, + 'event_aggregation_window': {'key': 'eventAggregationWindow', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + sensitivity: Optional[Union[str, "MediaGraphMotionDetectionSensitivity"]] = None, + output_motion_region: Optional[bool] = None, + event_aggregation_window: Optional[str] = None, + **kwargs + ): + super(MediaGraphMotionDetectionProcessor, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.Media.MediaGraphMotionDetectionProcessor' # type: str + self.sensitivity = sensitivity + self.output_motion_region = output_motion_region + self.event_aggregation_window = event_aggregation_window + + +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. + :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] + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'output_selectors': {'key': 'outputSelectors', 'type': '[MediaGraphOutputSelector]'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + output_selectors: Optional[List["MediaGraphOutputSelector"]] = None, + **kwargs + ): + super(MediaGraphNodeInput, self).__init__(**kwargs) + self.node_name = node_name + self.output_selectors = output_selectors + + +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 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, + *, + operator: Optional[Union[str, "MediaGraphOutputSelectorOperator"]] = None, + value: Optional[str] = None, + **kwargs + ): + super(MediaGraphOutputSelector, self).__init__(**kwargs) + self.operator = operator + self.value = value + + +class MediaGraphParameterDeclaration(msrest.serialization.Model): + """The declaration of a parameter in the media graph topology. A media graph topology can be authored with parameters. Then, during graph instance creation, the value for those parameters can be specified. This allows the same graph topology to be used as a blueprint for multiple graph instances with different values for the parameters. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the parameter. + :type name: str + :param type: Required. The type of the parameter. Possible values include: "String", + "SecretString", "Int", "Double", "Bool". + :type type: str or ~azure.media.analyticsedge.models.MediaGraphParameterType + :param description: Description of the parameter. + :type description: str + :param default: The default value for the parameter to be used if the media graph instance does + not specify a value. + :type default: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 64, 'min_length': 0}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + type: Union[str, "MediaGraphParameterType"], + description: Optional[str] = None, + default: Optional[str] = None, + **kwargs + ): + super(MediaGraphParameterDeclaration, self).__init__(**kwargs) + self.name = name + self.type = type + self.description = description + self.default = default + + +class MediaGraphParameterDefinition(msrest.serialization.Model): + """A key-value pair. A media graph topology allows certain values to be parameterized. When an instance is created, the parameters are supplied with arguments specific to that instance. This allows the same graph topology to be used as a blueprint for multiple graph instances with different values for the parameters. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the parameter defined in the media graph topology. + :type name: str + :param value: Required. The value to supply for the named parameter defined in the media graph + topology. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: str, + **kwargs + ): + super(MediaGraphParameterDefinition, self).__init__(**kwargs) + self.name = name + self.value = value + + +class MediaGraphPemCertificateList(MediaGraphCertificateSource): + """A list of PEM formatted certificates. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param certificates: Required. PEM formatted public certificates one per entry. + :type certificates: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'certificates': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + } + + def __init__( + self, + *, + certificates: List[str], + **kwargs + ): + super(MediaGraphPemCertificateList, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphPemCertificateList' # type: str + self.certificates = certificates + + +class MediaGraphRtspSource(MediaGraphSource): + """Enables a media graph to capture media from a RTSP server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The type of the source node. The discriminator for derived + types.Constant filled by server. + :type type: str + :param name: Required. The name to be used for this source node. + :type name: str + :param transport: Underlying RTSP transport. This is used to enable or disable HTTP tunneling. + Possible values include: "Http", "Tcp". + :type transport: str or ~azure.media.analyticsedge.models.MediaGraphRtspTransport + :param endpoint: Required. RTSP endpoint of the stream that is being connected to. + :type endpoint: ~azure.media.analyticsedge.models.MediaGraphEndpoint + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'transport': {'key': 'transport', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'MediaGraphEndpoint'}, + } + + def __init__( + self, + *, + name: str, + endpoint: "MediaGraphEndpoint", + transport: Optional[Union[str, "MediaGraphRtspTransport"]] = None, + **kwargs + ): + super(MediaGraphRtspSource, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.Media.MediaGraphRtspSource' # type: str + self.transport = transport + self.endpoint = endpoint + + +class MediaGraphSamplingOptions(msrest.serialization.Model): + """Describes the properties of a sample. + + :param skip_samples_without_annotation: If true, limits the samples submitted to the extension + to only samples which have associated inference(s). + :type skip_samples_without_annotation: str + :param maximum_samples_per_second: Maximum rate of samples submitted to the extension. + :type maximum_samples_per_second: str + """ + + _attribute_map = { + 'skip_samples_without_annotation': {'key': 'skipSamplesWithoutAnnotation', 'type': 'str'}, + 'maximum_samples_per_second': {'key': 'maximumSamplesPerSecond', 'type': 'str'}, + } + + def __init__( + self, + *, + skip_samples_without_annotation: Optional[str] = None, + maximum_samples_per_second: Optional[str] = None, + **kwargs + ): + super(MediaGraphSamplingOptions, self).__init__(**kwargs) + self.skip_samples_without_annotation = skip_samples_without_annotation + self.maximum_samples_per_second = maximum_samples_per_second + + +class MediaGraphSignalGateProcessor(MediaGraphProcessor): + """A signal gate determines when to block (gate) incoming media, and when to allow it through. It gathers input events over the activationEvaluationWindow, and determines whether to open or close the gate. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. The name for this processor node. + :type name: str + :param inputs: Required. An array of the names of the other nodes in the media graph, the + outputs of which are used as input for this processor node. + :type inputs: list[~azure.media.analyticsedge.models.MediaGraphNodeInput] + :param activation_evaluation_window: The period of time over which the gate gathers input + events before evaluating them. + :type activation_evaluation_window: str + :param activation_signal_offset: Required. Signal offset once the gate is activated (can be + negative). It is an offset between the time the event is received, and the timestamp of the + first media sample (eg. video frame) that is allowed through by the gate. + :type activation_signal_offset: str + :param minimum_activation_time: Required. The minimum period for which the gate remains open in + the absence of subsequent triggers (events). + :type minimum_activation_time: str + :param maximum_activation_time: Required. The maximum period for which the gate remains open in + the presence of subsequent events. + :type maximum_activation_time: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'activation_signal_offset': {'required': True}, + 'minimum_activation_time': {'required': True}, + 'maximum_activation_time': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[MediaGraphNodeInput]'}, + 'activation_evaluation_window': {'key': 'activationEvaluationWindow', 'type': 'str'}, + 'activation_signal_offset': {'key': 'activationSignalOffset', 'type': 'str'}, + 'minimum_activation_time': {'key': 'minimumActivationTime', 'type': 'str'}, + 'maximum_activation_time': {'key': 'maximumActivationTime', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + inputs: List["MediaGraphNodeInput"], + activation_signal_offset: str, + minimum_activation_time: str, + maximum_activation_time: str, + activation_evaluation_window: Optional[str] = None, + **kwargs + ): + super(MediaGraphSignalGateProcessor, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.Media.MediaGraphSignalGateProcessor' # type: str + self.activation_evaluation_window = activation_evaluation_window + self.activation_signal_offset = activation_signal_offset + self.minimum_activation_time = minimum_activation_time + self.maximum_activation_time = maximum_activation_time + + +class MediaGraphSystemData(msrest.serialization.Model): + """The system data for a resource. This is used by both topologies and instances. + + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_at: Optional[datetime.datetime] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(MediaGraphSystemData, self).__init__(**kwargs) + self.created_at = created_at + self.last_modified_at = last_modified_at + + +class MediaGraphTlsEndpoint(MediaGraphEndpoint): + """A TLS endpoint for media graph external connections. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Polymorphic credentials to be presented to the endpoint. + :type credentials: ~azure.media.analyticsedge.models.MediaGraphCredentials + :param url: Required. Url for the endpoint. + :type url: str + :param trusted_certificates: Trusted certificates when authenticating a TLS connection. Null + designates that Azure Media Service's source of trust should be used. + :type trusted_certificates: ~azure.media.analyticsedge.models.MediaGraphCertificateSource + :param validation_options: Validation options to use when authenticating a TLS connection. By + default, strict validation is used. + :type validation_options: ~azure.media.analyticsedge.models.MediaGraphTlsValidationOptions + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'MediaGraphCredentials'}, + 'url': {'key': 'url', 'type': 'str'}, + 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'MediaGraphCertificateSource'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MediaGraphTlsValidationOptions'}, + } + + def __init__( + self, + *, + url: str, + credentials: Optional["MediaGraphCredentials"] = None, + trusted_certificates: Optional["MediaGraphCertificateSource"] = None, + validation_options: Optional["MediaGraphTlsValidationOptions"] = None, + **kwargs + ): + super(MediaGraphTlsEndpoint, self).__init__(credentials=credentials, url=url, **kwargs) + self.type = '#Microsoft.Media.MediaGraphTlsEndpoint' # type: str + self.trusted_certificates = trusted_certificates + self.validation_options = validation_options + + +class MediaGraphTlsValidationOptions(msrest.serialization.Model): + """Options for controlling the authentication of TLS endpoints. + + :param ignore_hostname: Boolean value ignoring the host name (common name) during validation. + :type ignore_hostname: str + :param ignore_signature: Boolean value ignoring the integrity of the certificate chain at the + current time. + :type ignore_signature: str + """ + + _attribute_map = { + 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, + 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + } + + def __init__( + self, + *, + ignore_hostname: Optional[str] = None, + ignore_signature: Optional[str] = None, + **kwargs + ): + super(MediaGraphTlsValidationOptions, self).__init__(**kwargs) + self.ignore_hostname = ignore_hostname + self.ignore_signature = ignore_signature + + +class MediaGraphTopology(msrest.serialization.Model): + """The definition of a media graph topology. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The identifier for the media graph topology. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: A description of the properties of a media graph topology. + :type properties: ~azure.media.analyticsedge.models.MediaGraphTopologyProperties + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphTopologyProperties'}, + } + + def __init__( + self, + *, + name: str, + system_data: Optional["MediaGraphSystemData"] = None, + properties: Optional["MediaGraphTopologyProperties"] = None, + **kwargs + ): + super(MediaGraphTopology, self).__init__(**kwargs) + self.name = name + self.system_data = system_data + self.properties = properties + + +class MediaGraphTopologyCollection(msrest.serialization.Model): + """A collection of media graph topologies. + + :param value: A collection of media graph topologies. + :type value: list[~azure.media.analyticsedge.models.MediaGraphTopology] + :param continuation_token: A continuation token to use in subsequent calls to enumerate through + the graph topologies collection. This is used when the collection contains too many results to + return in one response. + :type continuation_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MediaGraphTopology]'}, + 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MediaGraphTopology"]] = None, + continuation_token: Optional[str] = None, + **kwargs + ): + super(MediaGraphTopologyCollection, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + + +class MediaGraphTopologyDeleteRequest(ItemNonSetRequestBase): + """MediaGraphTopologyDeleteRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphTopologyDeleteRequest, self).__init__(name=name, **kwargs) + self.method_name = 'GraphTopologyDelete' # type: str + + +class MediaGraphTopologyGetRequest(ItemNonSetRequestBase): + """MediaGraphTopologyGetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. method name. + :type name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(MediaGraphTopologyGetRequest, self).__init__(name=name, **kwargs) + self.method_name = 'GraphTopologyGet' # type: str + + +class MediaGraphTopologyListRequest(MethodRequest): + """MediaGraphTopologyListRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + api_version = "2.0" + + def __init__( + self, + **kwargs + ): + super(MediaGraphTopologyListRequest, self).__init__(**kwargs) + self.method_name = 'GraphTopologyList' # type: str + + +class MediaGraphTopologyProperties(msrest.serialization.Model): + """A description of the properties of a media graph topology. + + :param description: A description of a media graph topology. It is recommended to use this to + describe the expected use of the topology. + :type description: str + :param parameters: The list of parameters defined in the topology. The value for these + parameters are supplied by instances of this topology. + :type parameters: list[~azure.media.analyticsedge.models.MediaGraphParameterDeclaration] + :param sources: The list of source nodes in this topology. + :type sources: list[~azure.media.analyticsedge.models.MediaGraphSource] + :param processors: The list of processor nodes in this topology. + :type processors: list[~azure.media.analyticsedge.models.MediaGraphProcessor] + :param sinks: The list of sink nodes in this topology. + :type sinks: list[~azure.media.analyticsedge.models.MediaGraphSink] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[MediaGraphParameterDeclaration]'}, + 'sources': {'key': 'sources', 'type': '[MediaGraphSource]'}, + 'processors': {'key': 'processors', 'type': '[MediaGraphProcessor]'}, + 'sinks': {'key': 'sinks', 'type': '[MediaGraphSink]'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + parameters: Optional[List["MediaGraphParameterDeclaration"]] = None, + sources: Optional[List["MediaGraphSource"]] = None, + processors: Optional[List["MediaGraphProcessor"]] = None, + sinks: Optional[List["MediaGraphSink"]] = None, + **kwargs + ): + super(MediaGraphTopologyProperties, self).__init__(**kwargs) + self.description = description + self.parameters = parameters + self.sources = sources + self.processors = processors + self.sinks = sinks + + +class MediaGraphTopologySetRequest(MethodRequest): + """MediaGraphTopologySetRequest. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param graph: Required. The definition of a media graph topology. + :type graph: ~azure.media.analyticsedge.models.MediaGraphTopology + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'graph': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'graph': {'key': 'graph', 'type': 'MediaGraphTopology'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + graph: "MediaGraphTopology", + **kwargs + ): + super(MediaGraphTopologySetRequest, self).__init__(**kwargs) + self.method_name = 'GraphTopologySet' # type: str + self.graph = graph + + +class MediaGraphTopologySetRequestBody(MediaGraphTopology, MethodRequest): + """MediaGraphTopologySetRequestBody. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar method_name: Required. method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: api version. Default value: "2.0". + :vartype api_version: str + :param name: Required. The identifier for the media graph topology. + :type name: str + :param system_data: The system data for a resource. This is used by both topologies and + instances. + :type system_data: ~azure.media.analyticsedge.models.MediaGraphSystemData + :param properties: A description of the properties of a media graph topology. + :type properties: ~azure.media.analyticsedge.models.MediaGraphTopologyProperties + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'api_version': {'constant': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'MediaGraphSystemData'}, + 'properties': {'key': 'properties', 'type': 'MediaGraphTopologyProperties'}, + } + + api_version = "2.0" + + def __init__( + self, + *, + name: str, + system_data: Optional["MediaGraphSystemData"] = None, + properties: Optional["MediaGraphTopologyProperties"] = None, + **kwargs + ): + super(MediaGraphTopologySetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, **kwargs) + self.method_name = 'MediaGraphTopologySetRequestBody' # type: str + self.method_name = 'MediaGraphTopologySetRequestBody' # type: str + self.name = name + self.system_data = system_data + self.properties = properties + + +class MediaGraphUnsecuredEndpoint(MediaGraphEndpoint): + """An endpoint that the media graph can connect to, with no encryption in transit. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Polymorphic credentials to be presented to the endpoint. + :type credentials: ~azure.media.analyticsedge.models.MediaGraphCredentials + :param url: Required. Url for the endpoint. + :type url: str + """ + + _validation = { + 'type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'MediaGraphCredentials'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + url: str, + credentials: Optional["MediaGraphCredentials"] = None, + **kwargs + ): + super(MediaGraphUnsecuredEndpoint, self).__init__(credentials=credentials, url=url, **kwargs) + self.type = '#Microsoft.Media.MediaGraphUnsecuredEndpoint' # type: str + + +class MediaGraphUsernamePasswordCredentials(MediaGraphCredentials): + """Username/password credential pair. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :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. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + 'username': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + username: str, + password: Optional[str] = None, + **kwargs + ): + super(MediaGraphUsernamePasswordCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.Media.MediaGraphUsernamePasswordCredentials' # type: str + self.username = username + self.password = password diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/py.typed b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_version.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_version.py new file mode 100644 index 000000000000..6a6e5effdb40 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_version.py @@ -0,0 +1,7 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = '1.0.0b1' diff --git a/sdk/media/azure-media-analytics-edge/dev_requirements.txt b/sdk/media/azure-media-analytics-edge/dev_requirements.txt new file mode 100644 index 000000000000..97e51db43ae3 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/dev_requirements.txt @@ -0,0 +1,9 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +../../core/azure-core +-e ../../identity/azure-identity +aiohttp>=3.0; python_version >= '3.5' +aiodns>=2.0; python_version >= '3.5' +msrest>=0.6.10 +tox>=3.20.0 +tox-monorepo>=0.1.2 \ No newline at end of file diff --git a/sdk/media/azure-media-analytics-edge/docs/DevTips.md b/sdk/media/azure-media-analytics-edge/docs/DevTips.md new file mode 100644 index 000000000000..aee95a990e07 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/docs/DevTips.md @@ -0,0 +1,40 @@ +## How to update the lva sdk + +1. Clone the latest swagger onto your local machine +2. Replace the `require` field inside of `autorest.md` to point to your local swagger file +3. Generate the sdk using the autorest command which can be found inside the `autorest.md` file +4. Add any customization functions inside of `sdk\media\azure-media-lva-edge\azure\media\lva\edge\__init__.py`. Make sure the customization functions are outside of the `_generated` folder. +5. Update the README file and Changelog with the latest version number +6. Submit a PR + +## Running tox locally + +Tox is the testing and virtual environment management tool that is used to verify our sdk will be installed correctly with different Python versions and interpreters. To run tox follow these instructions + +``` +pip install tox tox-monorepo +cd path/to/target/folder +tox -c eng/tox/tox.ini +``` +To run a specific tox command from your directory use the following commands: +```bash +> tox -c ../../../eng/tox/tox.ini -e sphinx +> tox -c ../../../eng/tox/tox.ini -e lint +> tox -c ../../../eng/tox/tox.ini -e mypy +> tox -c ../../../eng/tox/tox.ini -e whl +> tox -c ../../../eng/tox/tox.ini -e sdist +``` +A quick description of the five commands above: +* sphinx: documentation generation using the inline comments written in our code +* lint: runs pylint to make sure our code adheres to the style guidance +* mypy: runs the mypy static type checker for Python to make sure that our types are valid +* whl: creates a whl package for installing our package +* sdist: creates a zipped distribution of our files that the end user could install with pip + + +### Troubleshooting tox errors + +- Tox will complain if there are no tests. Add a dummy test in case you need to bypass this +- Make sure there is an `__init__.py` file inside of every directory inside of `azure` (Example: `azure/media` should have an __init__.py file) +- Follow the ReadMe guidelines outlined here: https://review.docs.microsoft.com/help/contribute-ref/contribute-ref-how-to-document-sdk?branch=master#readme. ReadMe titles are case SENSITIVE and use sentence casing. +- Make sure MANIFEST.in includes all required folders. (Most likely the required folders will be tests, samples, and the generated folder) diff --git a/sdk/media/azure-media-analytics-edge/samples/sample_lva.py b/sdk/media/azure-media-analytics-edge/samples/sample_lva.py new file mode 100644 index 000000000000..b6cd17fe7eac --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/samples/sample_lva.py @@ -0,0 +1,85 @@ + +import json +import os +from azure.media.analyticsedge import * +from azure.iot.hub import IoTHubRegistryManager #run pip install azure-iot-hub to get this package +from azure.iot.hub.models import CloudToDeviceMethod, CloudToDeviceMethodResult +from datetime import time + +device_id = "device-name" +module_d = "module-name" +connection_string = "connection-string" +graph_instance_name = "graphInstance1" +graph_topology_name = "graphTopology1" +graph_url = "rtsp://sample-url-from-camera" + +def build_graph_topology(): + graph_properties = MediaGraphTopologyProperties() + graph_properties.description = "Continuous video recording to an Azure Media Services Asset" + user_name_param = MediaGraphParameterDeclaration(name="rtspUserName",type="String",default="dummyusername") + password_param = MediaGraphParameterDeclaration(name="rtspPassword",type="String",default="dummypassword") + url_param = MediaGraphParameterDeclaration(name="rtspUrl",type="String",default="rtsp://www.sample.com") + + source = MediaGraphRtspSource(name="rtspSource", endpoint=MediaGraphUnsecuredEndpoint(url="${rtspUrl}",credentials=MediaGraphUsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}"))) + node = MediaGraphNodeInput(node_name="rtspSource") + sink = MediaGraphAssetSink(name="assetsink", inputs=[node],asset_name_pattern='sampleAsset-${System.GraphTopologyName}-${System.GraphInstanceName}', segment_length="PT0H0M30S",local_media_cache_maximum_size_mi_b=2048,local_media_cache_path="/var/lib/azuremediaservices/tmp/") + graph_properties.parameters = [user_name_param, password_param, url_param] + graph_properties.sources = [source] + graph_properties.sinks = [sink] + graph = MediaGraphTopology(name=graph_topology_name,properties=graph_properties) + + return graph + +def build_graph_instance(): + url_param = MediaGraphParameterDefinition(name="rtspUrl", value=graph_url) + graph_instance_properties = MediaGraphInstanceProperties(description="Sample graph description", topology_name=graph_topology_name, parameters=[url_param]) + + graph_instance = MediaGraphInstance(name=graph_instance_name, properties=graph_instance_properties) + + return graph_instance + +def invoke_method_helper(method): + direct_method = CloudToDeviceMethod(method_name=method.method_name, payload=method.serialize()) + registry_manager = IoTHubRegistryManager(connection_string) + + payload = registry_manager.invoke_device_module_method(device_id, module_d, direct_method).payload + if payload is not None and 'error' in payload: + print(payload['error']) + return None + + return payload + +def main(): + graph_topology = build_graph_topology() + graph_instance = build_graph_instance() + + try: + set_graph_response = invoke_method_helper(MediaGraphTopologySetRequest(graph=graph_topology)) + + list_graph_response = invoke_method_helper(MediaGraphTopologyListRequest()) + if list_graph_response: + list_graph_result = MediaGraphTopologyCollection.deserialize(list_graph_response) + + get_graph_response = invoke_method_helper(MediaGraphTopologyGetRequest(name=graph_topology_name)) + if get_graph_response: + get_graph_result = MediaGraphTopology.deserialize(get_graph_response) + + set_graph_instance_response = invoke_method_helper(MediaGraphInstanceSetRequest(instance=graph_instance)) + + activate_graph_instance_response = invoke_method_helper(MediaGraphInstanceActivateRequest(name=graph_instance_name)) + + get_graph_instance_response = invoke_method_helper(MediaGraphInstanceGetRequest(name=graph_instance_name)) + if get_graph_instance_response: + get_graph_instance_result = MediaGraphInstance.deserialize(get_graph_instance_response) + + deactivate_graph_instance_response = invoke_method_helper(MediaGraphInstanceDeActivateRequest(name=graph_instance_name)) + + delete_graph_instance_response = invoke_method_helper(MediaGraphInstanceDeleteRequest(name=graph_instance_name)) + + delete_graph_response = invoke_method_helper(MediaGraphTopologyDeleteRequest(name=graph_topology_name)) + + except Exception as ex: + print(ex) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/sdk/media/azure-media-analytics-edge/sdk_packaging.toml b/sdk/media/azure-media-analytics-edge/sdk_packaging.toml new file mode 100644 index 000000000000..b366f78fb41b --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/sdk_packaging.toml @@ -0,0 +1,4 @@ +[packaging] +is_arm = false +need_msrestazure = false +auto_update = false diff --git a/sdk/media/azure-media-analytics-edge/setup.cfg b/sdk/media/azure-media-analytics-edge/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/media/azure-media-analytics-edge/setup.py b/sdk/media/azure-media-analytics-edge/setup.py new file mode 100644 index 000000000000..c03b0d627a5f --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/setup.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import sys +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-media-analytics-edge" +NAMESPACE_NAME = "azure.media.analyticsedge" +PACKAGE_PPRINT_NAME = "Azure Media Live Video Analytics Edge SDK" + +# a-b-c => a/b/c +package_folder_path = NAMESPACE_NAME.replace('.', '/') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft {} Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/media/azure-media-analytics-edge', + classifiers=[ + "Development Status :: 4 - Beta", + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "samples", + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.media", + ] + ), + install_requires=[ + "msrest>=0.5.0", + ], + extras_require={ + ":python_version<'3.0'": ['azure-media-nspkg'], + ":python_version<'3.4'": ['enum34>=1.0.4'], + ":python_version<'3.5'": ['typing'], + } +) \ No newline at end of file diff --git a/sdk/media/azure-media-analytics-edge/swagger/autorest.md b/sdk/media/azure-media-analytics-edge/swagger/autorest.md new file mode 100644 index 000000000000..919859203e35 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/swagger/autorest.md @@ -0,0 +1,25 @@ +# Generate SDK using Autorest + +see `https://aka.ms/autorest` + +## Getting started +```ps +cd +autorest --v3 --python +``` +## Settings + +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/7b34c62199a8d84f7252dcb8b08c1b593ae65124/specification/mediaservices/data-plane/readme.md +output-folder: ../azure/media/analyticsedge/_generated +namespace: azure.media.analyticsedge +no-namespace-folders: true +license-header: MICROSOFT_MIT_NO_VERSION +enable-xml: false +vanilla: true +clear-output-folder: true +add-credentials: false +python: true +package-version: "1.0" +public-clients: false +``` diff --git a/sdk/media/azure-media-analytics-edge/tests/conftest.py b/sdk/media/azure-media-analytics-edge/tests/conftest.py new file mode 100644 index 000000000000..c36aaed14908 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/tests/conftest.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- diff --git a/sdk/media/azure-media-analytics-edge/tests/test_build_graph_serialize.py b/sdk/media/azure-media-analytics-edge/tests/test_build_graph_serialize.py new file mode 100644 index 000000000000..fc8fe7185dc8 --- /dev/null +++ b/sdk/media/azure-media-analytics-edge/tests/test_build_graph_serialize.py @@ -0,0 +1,23 @@ +import pytest +from azure.media.analyticsedge import * + +class TestGraphBuildSerialize(): + def test_build_graph_serialize(self): + graph_topology_name = "graphTopology1" + graph_properties = MediaGraphTopologyProperties() + graph_properties.description = "Continuous video recording to an Azure Media Services Asset" + user_name_param = MediaGraphParameterDeclaration(name="rtspUserName",type="String",default="dummyusername") + password_param = MediaGraphParameterDeclaration(name="rtspPassword",type="String",default="dummypassword") + url_param = MediaGraphParameterDeclaration(name="rtspUrl",type="String",default="rtsp://www.sample.com") + + source = MediaGraphRtspSource(name="rtspSource", endpoint=MediaGraphUnsecuredEndpoint(url="${rtspUrl}",credentials=MediaGraphUsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}"))) + node = MediaGraphNodeInput(node_name="rtspSource") + sink = MediaGraphAssetSink(name="assetsink", inputs=[node],asset_name_pattern='sampleAsset-${System.GraphTopologyName}-${System.GraphInstanceName}', segment_length="PT0H0M30S",local_media_cache_maximum_size_mi_b=2048,local_media_cache_path="/var/lib/azuremediaservices/tmp/") + graph_properties.parameters = [user_name_param, password_param, url_param] + graph_properties.sources = [source] + graph_properties.sinks = [sink] + graph = MediaGraphTopology(name=graph_topology_name,properties=graph_properties) + + set_graph_method = MediaGraphTopologySetRequest(graph=graph) + set_graph_method_serialize = set_graph_method.serialize() + assert set_graph_method_serialize['name'] == graph_topology_name \ No newline at end of file diff --git a/sdk/media/ci.yml b/sdk/media/ci.yml index c52044500767..0c7d86d0ada9 100644 --- a/sdk/media/ci.yml +++ b/sdk/media/ci.yml @@ -32,4 +32,6 @@ extends: safeName: azuremgmtmedia - name: azure_media_nspkg safeName: azuremedianspkg + - name: azure_media_analytics_edge + safeName: azuremediaanalyticsedge diff --git a/shared_requirements.txt b/shared_requirements.txt index 9ba3fb1f7d99..f4c3494909ce 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -86,6 +86,7 @@ azure-mgmt-trafficmanager~=0.50.0 azure-mgmt-web~=0.35.0 azure-nspkg azure-keyvault-nspkg +azure-media-nspkg azure-schemaregistry==1.0.0b1 azure-search-nspkg azure-security-nspkg