/// <summary>
        /// Download sensor activation file
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='scope'>
        /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
        /// </param>
        /// <param name='iotSensorName'>
        /// Name of the IoT sensor
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Stream> DownloadActivationAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
        {
            var _result = await operations.DownloadActivationWithHttpMessagesAsync(scope, iotSensorName, null, cancellationToken).ConfigureAwait(false);

            _result.Request.Dispose();
            return(_result.Body);
        }
 /// <summary>
 /// Get IoT sensor
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
 /// </param>
 /// <param name='iotSensorName'>
 /// Name of the IoT sensor
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IotSensor> GetAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(scope, iotSensorName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get IoT sensor
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
 /// </param>
 /// <param name='iotSensorName'>
 /// Name of the IoT sensor
 /// </param>
 public static IotSensor Get(this IIotSensorsOperations operations, string scope, string iotSensorName)
 {
     return(operations.GetAsync(scope, iotSensorName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List IoT sensors
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
 /// </param>
 public static IotSensorsList List(this IIotSensorsOperations operations, string scope)
 {
     return(operations.ListAsync(scope).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Download sensor activation file
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
 /// </param>
 /// <param name='iotSensorName'>
 /// Name of the IoT sensor
 /// </param>
 public static Stream DownloadActivation(this IIotSensorsOperations operations, string scope, string iotSensorName)
 {
     return(operations.DownloadActivationAsync(scope, iotSensorName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete IoT sensor
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
 /// </param>
 /// <param name='iotSensorName'>
 /// Name of the IoT sensor
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IIotSensorsOperations operations, string scope, string iotSensorName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(scope, iotSensorName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete IoT sensor
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// Scope of the query (IoT Hub, /providers/Microsoft.Devices/iotHubs/myHub)
 /// </param>
 /// <param name='iotSensorName'>
 /// Name of the IoT sensor
 /// </param>
 public static void Delete(this IIotSensorsOperations operations, string scope, string iotSensorName)
 {
     operations.DeleteAsync(scope, iotSensorName).GetAwaiter().GetResult();
 }