diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py index 2f843bcfc0ea..e4db6c6a7eea 100644 --- a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models.py @@ -1626,15 +1626,15 @@ class MediaGraphSignalGateProcessor(MediaGraphProcessor): :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. + :param activation_signal_offset: 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). + :param minimum_activation_time: 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. + :param maximum_activation_time: The maximum period for which the gate remains open in the + presence of subsequent events. :type maximum_activation_time: str """ @@ -1642,9 +1642,6 @@ class MediaGraphSignalGateProcessor(MediaGraphProcessor): '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 = { @@ -1664,9 +1661,9 @@ def __init__( 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'] + self.activation_signal_offset = kwargs.get('activation_signal_offset', None) + self.minimum_activation_time = kwargs.get('minimum_activation_time', None) + self.maximum_activation_time = kwargs.get('maximum_activation_time', None) class MediaGraphSystemData(msrest.serialization.Model): diff --git a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py index ec1193da89e3..f8a2447ee836 100644 --- a/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py +++ b/sdk/media/azure-media-analytics-edge/azure/media/analyticsedge/_generated/models/_models_py3.py @@ -1763,15 +1763,15 @@ class MediaGraphSignalGateProcessor(MediaGraphProcessor): :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. + :param activation_signal_offset: 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). + :param minimum_activation_time: 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. + :param maximum_activation_time: The maximum period for which the gate remains open in the + presence of subsequent events. :type maximum_activation_time: str """ @@ -1779,9 +1779,6 @@ class MediaGraphSignalGateProcessor(MediaGraphProcessor): '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 = { @@ -1799,10 +1796,10 @@ def __init__( *, name: str, inputs: List["MediaGraphNodeInput"], - activation_signal_offset: str, - minimum_activation_time: str, - maximum_activation_time: str, activation_evaluation_window: Optional[str] = None, + activation_signal_offset: Optional[str] = None, + minimum_activation_time: Optional[str] = None, + maximum_activation_time: Optional[str] = None, **kwargs ): super(MediaGraphSignalGateProcessor, self).__init__(name=name, inputs=inputs, **kwargs) diff --git a/sdk/media/azure-media-analytics-edge/samples/sample_lva.py b/sdk/media/azure-media-analytics-edge/samples/sample_lva.py index b6cd17fe7eac..2701d5dd6f39 100644 --- a/sdk/media/azure-media-analytics-edge/samples/sample_lva.py +++ b/sdk/media/azure-media-analytics-edge/samples/sample_lva.py @@ -6,9 +6,9 @@ from azure.iot.hub.models import CloudToDeviceMethod, CloudToDeviceMethodResult from datetime import time -device_id = "device-name" -module_d = "module-name" -connection_string = "connection-string" +device_id = "lva-sample-device" +module_d = "mediaedge" +connection_string = "HostName=lvasamplehubcx5a4jgbixyvg.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=/53Qw6ifN0ka4so72a1gVEhmyiz5fLb9iw+oWoyoQxk=" graph_instance_name = "graphInstance1" graph_topology_name = "graphTopology1" graph_url = "rtsp://sample-url-from-camera" @@ -17,7 +17,7 @@ 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") + password_param = MediaGraphParameterDeclaration(name="rtspPassword",type="SecretString",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}"))) @@ -32,6 +32,7 @@ def build_graph_topology(): def build_graph_instance(): url_param = MediaGraphParameterDefinition(name="rtspUrl", value=graph_url) + pass_param = MediaGraphParameterDefinition(name="rtspPassword", value='testpass') 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) diff --git a/sdk/media/azure-media-analytics-edge/swagger/autorest.md b/sdk/media/azure-media-analytics-edge/swagger/autorest.md index 54492c50c561..4d2d9d91eb04 100644 --- a/sdk/media/azure-media-analytics-edge/swagger/autorest.md +++ b/sdk/media/azure-media-analytics-edge/swagger/autorest.md @@ -10,7 +10,7 @@ autorest --v3 --python ## Settings ```yaml -require: https://github.com/Azure/azure-rest-api-specs/blob/297b7526f051e08f3a430b50daadd356ba74c6e2/specification/mediaservices/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/14732a2d9802c98cb8fea52800853874529c5f8e/specification/mediaservices/data-plane/readme.md output-folder: ../azure/media/analyticsedge/_generated namespace: azure.media.analyticsedge no-namespace-folders: true