/// <summary>
 /// Initializes a new instance of the WeatherServiceHW04 class.
 /// </summary>
 public WeatherServiceHW04()
     : base()
 {
     this._humidities   = new Humidities(this);
     this._pressures    = new Pressures(this);
     this._temperatures = new Temperatures(this);
     this._baseUri      = new Uri("https://weatherservicehw04.azurewebsites.net:443");
 }
 /// <summary>
 /// Initializes a new instance of the WeatherServiceHW04 class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public WeatherServiceHW04(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._humidities   = new Humidities(this);
     this._pressures    = new Pressures(this);
     this._temperatures = new Temperatures(this);
     this._baseUri      = new Uri("https://weatherservicehw04.azurewebsites.net:443");
 }
 /// <param name='operations'>
 /// Reference to the WeatherServiceClientHW04.ITemperatures.
 /// </param>
 public static IList <Temperature> GetAllTemperatures(this ITemperatures operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ITemperatures)s).GetAllTemperaturesAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the WeatherServiceClientHW04.ITemperatures.
 /// </param>
 /// <param name='type'>
 /// Required.
 /// </param>
 /// <param name='period'>
 /// Required.
 /// </param>
 public static string GetAverageTemperatureByTypeAndPeriod(this ITemperatures operations, string type, int period)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ITemperatures)s).GetAverageTemperatureByTypeAndPeriodAsync(type, period);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the WeatherServiceClientHW04.ITemperatures.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='temperature'>
 /// Required.
 /// </param>
 public static object PutTemperatureByIdAndTemperature(this ITemperatures operations, string id, Temperature temperature)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ITemperatures)s).PutTemperatureByIdAndTemperatureAsync(id, temperature);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
        /// <param name='operations'>
        /// Reference to the WeatherServiceClientHW04.ITemperatures.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <Temperature> > GetAllTemperaturesAsync(this ITemperatures operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <WeatherServiceClientHW04.Models.Temperature> > result = await operations.GetAllTemperaturesWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the WeatherServiceClientHW04.ITemperatures.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Temperature> DeleteTemperatureByIdAsync(this ITemperatures operations, string id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <WeatherServiceClientHW04.Models.Temperature> result = await operations.DeleteTemperatureByIdWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the WeatherServiceClientHW04.ITemperatures.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='temperature'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutTemperatureByIdAndTemperatureAsync(this ITemperatures operations, string id, Temperature temperature, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutTemperatureByIdAndTemperatureWithOperationResponseAsync(id, temperature, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the WeatherServiceClientHW04.ITemperatures.
        /// </param>
        /// <param name='type'>
        /// Required.
        /// </param>
        /// <param name='period'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <string> GetLowTemperatureByTypeAndPeriodAsync(this ITemperatures operations, string type, int period, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <string> result = await operations.GetLowTemperatureByTypeAndPeriodWithOperationResponseAsync(type, period, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }