From 296194bdcfc859211d566bd86a6e36ef8a369b1b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 11 Nov 2021 07:53:00 +0000 Subject: [PATCH] CodeGen from PR 16742 in Azure/azure-rest-api-specs Merge 16c28f3f7984d340f8fe0f493433d1eb044278e5 into 34018925632ef75ef5416e3add65324e0a12489f --- .../src/Generated/IWeatherClient.cs | 64 + .../src/Generated/IWeatherOperations.cs | 553 +++++ .../src/Generated/Models/AirAndPollen.cs | 96 + .../src/Generated/Models/AlertArea.cs | 137 ++ .../src/Generated/Models/ColorValue.cs | 72 + .../src/Generated/Models/CurrentConditions.cs | 295 +++ .../Models/CurrentConditionsResponse.cs | 50 + .../src/Generated/Models/DailyForecast.cs | 131 ++ .../Generated/Models/DailyForecastResponse.cs | 57 + .../Generated/Models/DailyForecastSummary.cs | 93 + .../src/Generated/Models/DailyIndex.cs | 151 ++ .../Generated/Models/DailyIndicesResponse.cs | 54 + .../src/Generated/Models/DayOrNight.cs | 265 +++ .../src/Generated/Models/DegreeDaySummary.cs | 60 + .../Generated/Models/ErrorAdditionalInfo.cs | 59 + .../src/Generated/Models/ErrorDetail.cs | 85 + .../src/Generated/Models/ErrorResponse.cs | 56 + .../Models/ErrorResponseException.cs | 62 + .../src/Generated/Models/ForecastInterval.cs | 138 ++ .../src/Generated/Models/HazardDetail.cs | 77 + .../src/Generated/Models/HourlyForecast.cs | 281 +++ .../Models/HourlyForecastResponse.cs | 51 + .../src/Generated/Models/IntervalSummary.cs | 102 + .../src/Generated/Models/LatestStatus.cs | 67 + .../Generated/Models/LatestStatusKeyword.cs | 58 + .../src/Generated/Models/LocalSource.cs | 79 + .../Models/MinuteForecastResponse.cs | 69 + .../Generated/Models/MinuteForecastSummary.cs | 89 + .../Generated/Models/PastHoursTemperature.cs | 59 + .../Generated/Models/PrecipitationSummary.cs | 112 + .../src/Generated/Models/PrecipitationType.cs | 36 + .../src/Generated/Models/PressureTendency.cs | 60 + .../Generated/Models/QuarterDayForecast.cs | 259 +++ .../Models/QuarterDayForecastResponse.cs | 51 + .../Generated/Models/SevereWeatherAlert.cs | 168 ++ .../Models/SevereWeatherAlertDescription.cs | 66 + .../Models/SevereWeatherAlertsResponse.cs | 57 + .../src/Generated/Models/SunGlare.cs | 73 + .../Generated/Models/TemperatureSummary.cs | 70 + .../Models/WeatherAlongRoutePrecipitation.cs | 66 + .../Models/WeatherAlongRouteResponse.cs | 61 + .../Models/WeatherAlongRouteSummary.cs | 55 + .../src/Generated/Models/WeatherDataUnit.cs | 30 + .../src/Generated/Models/WeatherHazards.cs | 60 + .../Generated/Models/WeatherNotification.cs | 88 + .../src/Generated/Models/WeatherUnit.cs | 66 + .../src/Generated/Models/WeatherUnitRange.cs | 61 + .../src/Generated/Models/WeatherWaypoint.cs | 139 ++ .../src/Generated/Models/WindDetails.cs | 59 + .../src/Generated/Models/WindDirection.cs | 66 + .../src/Generated/Models/WindSpeed.cs | 65 + .../src/Generated/SdkInfo_WeatherClient.cs | 27 + .../src/Generated/WeatherClient.cs | 335 +++ .../src/Generated/WeatherOperations.cs | 1958 +++++++++++++++++ .../Generated/WeatherOperationsExtensions.cs | 502 +++++ 55 files changed, 8000 insertions(+) create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherClient.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherOperations.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/AirAndPollen.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/AlertArea.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/ColorValue.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditions.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditionsResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecast.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastSummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndex.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndicesResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayOrNight.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/DegreeDaySummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorAdditionalInfo.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorDetail.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponseException.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/ForecastInterval.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardDetail.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecast.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecastResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/IntervalSummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatus.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/LocalSource.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastSummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/PastHoursTemperature.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationSummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/PressureTendency.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecast.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecastResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlert.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertDescription.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertsResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/SunGlare.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/TemperatureSummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRoutePrecipitation.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteResponse.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteSummary.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherHazards.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherNotification.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnit.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnitRange.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherWaypoint.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDetails.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDirection.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindSpeed.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/SdkInfo_WeatherClient.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/WeatherClient.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperations.cs create mode 100644 sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperationsExtensions.cs diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherClient.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherClient.cs new file mode 100644 index 000000000000..71be4f332ac7 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherClient.cs @@ -0,0 +1,64 @@ +// +// 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. +// + +namespace Azure.Maps.Weather +{ + using Microsoft.Rest; + using Models; + using Newtonsoft.Json; + + /// + /// + public partial interface IWeatherClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Version number of Azure Maps API. + /// + string ApiVersion { get; set; } + + /// + /// Specifies which account is intended for usage in conjunction with + /// the Azure AD security model. It represents a unique ID for the + /// Azure Maps account and can be retrieved from the Azure Maps + /// management plane Account API. To use Azure AD security in Azure + /// Maps see the following [articles](https://aka.ms/amauthdetails) for + /// guidance. + /// + string ClientId { get; set; } + + /// + /// Subscription credentials which uniquely identify client + /// subscription. + /// + ServiceClientCredentials Credentials { get; } + + + /// + /// Gets the IWeatherOperations. + /// + IWeatherOperations Weather { get; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherOperations.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherOperations.cs new file mode 100644 index 000000000000..ff8f8dca5edc --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/IWeatherOperations.cs @@ -0,0 +1,553 @@ +// +// 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. +// + +namespace Azure.Maps.Weather +{ + using Microsoft.Rest; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// WeatherOperations operations. + /// + public partial interface IWeatherOperations + { + /// + /// **Get Hourly Forecast** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Request detailed weather forecast by the hour for the next 1, 12, + /// 24 (1 day), 72 (3 days), 120 (5 days), and 240 hours (10 days) for + /// the given the given coordinate location. The API returns details + /// such as temperature, humidity, wind, precipitation, and ultraviolet + /// (UV) index. + /// + /// In S0 you can request hourly forecast for the next 1, 12, 24 hours + /// (1 day), and 72 hours (3 days). In S1 you can also request hourly + /// forecast for the next 120 (5 days) and 240 hours (10 days). + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial + /// units. Default value is metric. Possible values include: 'metric', + /// 'imperial' + /// + /// + /// Time frame of the returned weather forecast. By default, the + /// forecast data for next hour will be returned. Available values are + /// * `1` - Return forecast data for the next hour. Default value. + /// * `12` - Return hourly forecast for next 12 hours. + /// * `24` - Return hourly forecast for next 24 hours. + /// * `72` - Return hourly forecast for next 72 hours (3 days). + /// * `120` - Return hourly forecast for next 120 hours (5 days). Only + /// available in S1 SKU. + /// * `240` - Return hourly forecast for next 240 hours (10 days). Only + /// available in S1 SKU. + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetHourlyForecastWithHttpMessagesAsync(IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Minute Forecast** + /// + /// + /// **Applies to**: S1 pricing tier. + /// + /// + /// Get Minute Forecast service returns minute-by-minute forecasts for + /// a given location for the next 120 minutes. Users can request + /// weather forecasts in the interval of 1, 5 and 15 minutes. The + /// response will include details such as the type of precipitation + /// (including rain, snow, or a mixture of both), start time, and + /// precipitation intensity value (dBZ). + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies time interval in minutes for the returned weather + /// forecast. Supported values are + /// * `1` - Retrieve forecast for 1-minute intervals. Returned by + /// default. + /// * `5` - Retrieve forecasts for 5-minute intervals. + /// * `15` - Retrieve forecasts for 15-minute intervals. + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetMinuteForecastWithHttpMessagesAsync(IList coordinates, int? interval = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Quarter-Day Forecast** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Service returns detailed weather forecast by quarter-day for the + /// next 1, 5, 10, or 15 days for a given location. Response data is + /// presented by quarters of the day - morning, afternoon, evening, and + /// overnight. Details such as temperature, humidity, wind, + /// precipitation, and UV index are returned. + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial + /// units. Default value is metric. Possible values include: 'metric', + /// 'imperial' + /// + /// + /// Specifies for how many days the quester-day forecast responses are + /// returned. Supported values are: + /// * `1` - Return forecast data for the next day. Returned by default. + /// * `5` - Return forecast data for the next 5 days. + /// * `10` - Return forecast data for next 10 days. + /// * `15` - Return forecast data for the next 15 days. + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetQuarterDayForecastWithHttpMessagesAsync(IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Current Conditions** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Get Current Conditions service returns detailed current weather + /// conditions such as precipitation, temperature and wind for a given + /// coordinate location. Also, observations from the past 6 or 24 hours + /// for a particular location can be retrieved. The basic information + /// returned with the response include details such as observation date + /// and time, brief description of the weather conditions, weather + /// icon, precipitation indicator flags, and temperature. Additional + /// details such as RealFeel™ Temperature and UV index are also + /// returned. + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial + /// units. Default value is metric. Possible values include: 'metric', + /// 'imperial' + /// + /// + /// Return full details for the current conditions. Available values + /// are + /// * `true` - Returns full details. By default all details are + /// returned. + /// * `false` - Returns a truncated version of the current condition + /// data, which includes observation date time, weather phrase, icon + /// code, precipitation indicator flag, and temperature. + /// + /// + /// Time frame of the returned weather conditions. By default, the most + /// current weather conditions will be returned. Default value is 0. + /// Supported values are: + /// * `0` - Return the most current weather conditions. + /// * `6` - Return weather conditions from past 6 hours. + /// * `24` - Return weather conditions from past 24 hours. + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetCurrentConditionsWithHttpMessagesAsync(IList coordinates, string unit = default(string), string details = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Daily Forecast** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// The service returns detailed weather forecast such as temperature + /// and wind by day for the next 1, 5, 10, 15, 25, or 45 days for a + /// given coordinate location. The response include details such as + /// temperature, wind, precipitation, air quality, and UV index. + /// + /// In S0 you can request daily forecast for the next 1, 5, 10, and 15 + /// days. In S1 you can also request daily forecast for the next 25 + /// days, and 45 days. + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial + /// units. Default value is metric. Possible values include: 'metric', + /// 'imperial' + /// + /// + /// Specifies for how many days the daily forecast responses are + /// returned. Available values are + /// * `1` - Return forecast data for the next day. Returned by default. + /// * `5` - Return forecast data for the next 5 days. + /// * `10` - Return forecast data for the next 10 days. + /// * `25` - Return forecast data for the next 25 days. Only available + /// in S1 SKU. + /// * `45` - Return forecast data for the next 45 days. Only available + /// in S1 SKU. + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetDailyForecastWithHttpMessagesAsync(IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Weather along route** + /// + /// + /// **Applies to**: S1 pricing tier. + /// + /// Weather along a route API returns hyper local (one kilometer or + /// less), up-to-the-minute weather nowcasts, weather hazard + /// assessments, and notifications along a route described as a + /// sequence of waypoints. + /// This includes a list of weather hazards affecting the waypoint or + /// route, and the aggregated hazard index for each waypoint might be + /// used to paint each portion of a route according to how safe it is + /// for the driver. When submitting the waypoints, it is recommended to + /// stay within, or close to, the distance that can be traveled within + /// 120-mins or shortly after. Data is updated every five minutes. + /// + /// The service supplements Azure Maps [Route + /// Service](https://docs.microsoft.com/rest/api/maps/route) that + /// allows you to first request a route between an origin and a + /// destination and use that as an input for Weather Along Route + /// endpoint. + /// + /// In addition, the service supports scenarios to generate weather + /// notifications for waypoints that experience an increase in + /// intensity of a weather hazard. For example, if the vehicle is + /// expected to begin experiencing heavy rain as it reaches a waypoint, + /// a weather notification for heavy rain will be generated for that + /// waypoint allowing the end product to display a heavy rain + /// notification before the driver reaches that waypoint. + /// The trigger for when to display the notification for a waypoint + /// could be based, for example, on a + /// [geofence](https://docs.microsoft.com/azure/azure-maps/tutorial-iot-hub-maps), + /// or selectable distance to the waypoint. + /// + /// The API covers all regions of the planet except latitudes above + /// Greenland and Antarctica. + /// + /// + /// Coordinates through which the route is calculated, separated by + /// colon (:) and entered in chronological order. A minimum of two + /// waypoints is required. A single API call may contain up to 60 + /// waypoints. + /// A waypoint indicates location, ETA, and optional heading: + /// latitude,longitude,ETA,heading, where + /// * `Latitude` - Latitude coordinate in decimal degrees. + /// * `Longitude` - Longitude coordinate in decimal degrees. + /// * `ETA (estimated time of arrival)` - The number of minutes from + /// the present time that it will take for the vehicle to reach the + /// waypoint. Allowed range is from 0.0 to 120.0 minutes. + /// * `Heading` - An optional value indicating the vehicle heading as + /// it passes the waypoint. Expressed in clockwise degrees relative to + /// true north. This is issued to calculate sun glare as a driving + /// hazard. Allowed range is from 0.0 to 360.0 degrees. If not + /// provided, a heading will automatically be derived based on the + /// position of neighboring waypoints. + /// + /// It is recommended to stay within, or close to, the distance that + /// can be traveled within 120-mins or shortly after. This way a more + /// accurate assessment can be provided for the trip and prevent + /// isolated events not being captured between waypoints. Information + /// can and should be updated along the route (especially for trips + /// greater than 2 hours) to continuously pull new waypoints moving + /// forward, but also to ensure that forecast information for content + /// such as precipitation type and intensity is accurate as storms + /// develop and dissipate over time. + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWeatherAlongRouteWithHttpMessagesAsync(string query, string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Severe Weather Alerts** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// Severe weather phenomenon can significantly impact our everyday + /// life and business operations. For example, severe weather + /// conditions such as tropical storms, high winds or flooding can + /// close roads and force logistics companies to reroute their fleet + /// causing delays in reaching destinations and breaking the cold chain + /// of refrigerated food products.  Azure Maps Severe Weather Alerts + /// API returns the severe weather alerts that are available worldwide + /// from both official Government Meteorological Agencies and leading + /// global to regional weather alert providers. The service can return + /// details such as alert type, category, level and detailed + /// description about the active severe alerts for the requested + /// location, like hurricanes, thunderstorms, lightning, heat waves or + /// forest fires. + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Return full details for the severe weather alerts. Available values + /// are + /// * `true` - Returns full details. By default all details are + /// returned. + /// * `false` - Returns a truncated version of the alerts data, which + /// excludes the area-specific full description of alert details + /// (`alertDetails`). + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetSevereWeatherAlertsWithHttpMessagesAsync(IList coordinates, string language = default(string), string details = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// **Get Daily Indices** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// There may be times when you want to know if the weather conditions + /// are optimal for a specific activity, for example, for outdoor + /// construction, indoor activities, running or farming including soil + /// moisture information. Azure Maps Indices API returns index values + /// that will guide end users to plan future activities. For example, a + /// health mobile application can notify users that today is good + /// weather for running or for other outdoors activities like for + /// playing golf, and retail stores can optimize their digital + /// marketing campaigns based on predicted index values. The service + /// returns in daily indices values for current and next 5, 10 and 15 + /// days starting from current day. + /// + /// + /// The applicable query specified as a comma separated string composed + /// by latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Language in which search results should be returned. Should be one + /// of supported IETF language tags, case insensitive. When data in + /// specified language is not available for a specific field, default + /// language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Specifies for how many days the daily indices are returned. By + /// default, the indices data for the current day will be returned. + /// When requesting future indices data, the current day is included in + /// the response as day 1. Available values are + /// * `1` - Return daily index data for the current day. Default value. + /// * `5` - Return 5 days of daily index data starting from the current + /// day. + /// * `10` - Return 10 days of daily index data starting from the + /// current day. + /// * `15` - Return 15 days of daily index data starting from the + /// current day. + /// + /// + /// Numeric index identifier that can be used for restricting returned + /// results to the corresponding index type. Cannot be paired with + /// `indexGroupId`. Please refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and + /// to see the supported indices. + /// + /// + /// Numeric index group identifier that can be used for restricting + /// returned results to the corresponding subset of indices (index + /// group). Cannot be paired with `indexId`. Please refer to [Weather + /// Service Concepts](https://aka.ms/AzureMapsWeatherConcepts) for + /// details and to see the supported index groups. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetDailyIndicesWithHttpMessagesAsync(IList coordinates, string language = default(string), int? duration = default(int?), int? indexId = default(int?), int? indexGroupId = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/AirAndPollen.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/AirAndPollen.cs new file mode 100644 index 000000000000..c94911c4bbe1 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/AirAndPollen.cs @@ -0,0 +1,96 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class AirAndPollen + { + /// + /// Initializes a new instance of the AirAndPollen class. + /// + public AirAndPollen() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AirAndPollen class. + /// + /// Name of the pollen or pollutant. For + /// example, grass, mold, weed, air quality, tree and UV index. + /// Value of the given type above. Values + /// associated with mold, grass, weed and tree are in units of parts + /// per cubic meter. Both air quality and UV are indices, so they are + /// unitless. + /// Category of the air quality or pollution + /// type. For example, low, high, good, moderate, unhealthy, + /// hazardous. + /// Value associated with the air quality + /// or pollution category. These values range from 1 to 6. 1 implying + /// good conditions, 6 implying hazardous conditions. + /// Only exists for air quality. Examples + /// include ozone and particle pollution. + public AirAndPollen(string description = default(string), int? value = default(int?), string category = default(string), int? categoryValue = default(int?), string airQualityType = default(string)) + { + Description = description; + Value = value; + Category = category; + CategoryValue = categoryValue; + AirQualityType = airQualityType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the pollen or pollutant. For example, grass, + /// mold, weed, air quality, tree and UV index. + /// + [JsonProperty(PropertyName = "name")] + public string Description { get; set; } + + /// + /// Gets or sets value of the given type above. Values associated with + /// mold, grass, weed and tree are in units of parts per cubic meter. + /// Both air quality and UV are indices, so they are unitless. + /// + [JsonProperty(PropertyName = "value")] + public int? Value { get; set; } + + /// + /// Gets or sets category of the air quality or pollution type. For + /// example, low, high, good, moderate, unhealthy, hazardous. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + /// + /// Gets or sets value associated with the air quality or pollution + /// category. These values range from 1 to 6. 1 implying good + /// conditions, 6 implying hazardous conditions. + /// + [JsonProperty(PropertyName = "categoryValue")] + public int? CategoryValue { get; set; } + + /// + /// Gets or sets only exists for air quality. Examples include ozone + /// and particle pollution. + /// + [JsonProperty(PropertyName = "type")] + public string AirQualityType { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/AlertArea.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/AlertArea.cs new file mode 100644 index 000000000000..544c36c9cf1e --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/AlertArea.cs @@ -0,0 +1,137 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Information about a severe weather alert issued within an affected + /// area(s). If multiple alerts are active for the same location, the + /// alerts will be returned in order of `priority` within the API response, + /// with the highest priority alert being returned at the top of the + /// response. + /// + public partial class AlertArea + { + /// + /// Initializes a new instance of the AlertArea class. + /// + public AlertArea() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AlertArea class. + /// + /// The name of an area which is affected by the + /// alert. The location that was requested falls under the alert + /// area. + /// Text summarizing the alert in the + /// returned area. + /// The start date and time of the alert in ISO + /// 8601 format, for example, 2019-10-27T19:39:57-08:00. If the alert + /// crosses multiple time zones the returned time in the response is + /// the local time to the requested coordinate location. + /// The end date and time of the alert in ISO + /// 8601 format, for example, 2019-10-27T19:39:57-08:00. If the alert + /// crosses multiple time zones the returned time in the response is + /// the local time to the requested coordinate location. + /// The latest status of the alert in the + /// current area. + /// Full details associated with the alert. + /// Returned if `details`=True. This field is always returned in the + /// language(s) of choice by the issuing provider and Azure Maps only + /// returns what is created by the provider. Please note, some + /// countries/regions may offer their native language and English. + /// Language parameter won’t apply to this field. + /// Language of the `alertDetails`. This field + /// helps to point out that the language of the `alertDetails` may + /// differ from the requested language parameter. Returned if + /// `details`=True. Language code has been derived from the ISO 639-1 + /// Alpha-2 codes. + public AlertArea(string name = default(string), string description = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), LatestStatus latestStatus = default(LatestStatus), string details = default(string), string language = default(string)) + { + Name = name; + Description = description; + StartTime = startTime; + EndTime = endTime; + LatestStatus = latestStatus; + Details = details; + Language = language; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of an area which is affected by the alert. + /// The location that was requested falls under the alert area. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets text summarizing the alert in the returned area. + /// + [JsonProperty(PropertyName = "summary")] + public string Description { get; set; } + + /// + /// Gets or sets the start date and time of the alert in ISO 8601 + /// format, for example, 2019-10-27T19:39:57-08:00. If the alert + /// crosses multiple time zones the returned time in the response is + /// the local time to the requested coordinate location. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end date and time of the alert in ISO 8601 format, + /// for example, 2019-10-27T19:39:57-08:00. If the alert crosses + /// multiple time zones the returned time in the response is the local + /// time to the requested coordinate location. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets the latest status of the alert in the current area. + /// + [JsonProperty(PropertyName = "latestStatus")] + public LatestStatus LatestStatus { get; set; } + + /// + /// Gets or sets full details associated with the alert. Returned if + /// `details`=True. This field is always returned in the language(s) of + /// choice by the issuing provider and Azure Maps only returns what is + /// created by the provider. Please note, some countries/regions may + /// offer their native language and English. Language parameter won’t + /// apply to this field. + /// + [JsonProperty(PropertyName = "alertDetails")] + public string Details { get; set; } + + /// + /// Gets or sets language of the `alertDetails`. This field helps to + /// point out that the language of the `alertDetails` may differ from + /// the requested language parameter. Returned if `details`=True. + /// Language code has been derived from the ISO 639-1 Alpha-2 codes. + /// + [JsonProperty(PropertyName = "alertDetailsLanguageCode")] + public string Language { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ColorValue.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ColorValue.cs new file mode 100644 index 000000000000..f535fc412111 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ColorValue.cs @@ -0,0 +1,72 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ColorValue + { + /// + /// Initializes a new instance of the ColorValue class. + /// + public ColorValue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ColorValue class. + /// + /// Red component of the RGB value. + /// Green component of the RGB value. + /// Blue component of the RGB value + /// Hexadecimal color value. + public ColorValue(int? red = default(int?), int? green = default(int?), int? blue = default(int?), string hex = default(string)) + { + Red = red; + Green = green; + Blue = blue; + Hex = hex; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets red component of the RGB value. + /// + [JsonProperty(PropertyName = "red")] + public int? Red { get; set; } + + /// + /// Gets or sets green component of the RGB value. + /// + [JsonProperty(PropertyName = "green")] + public int? Green { get; set; } + + /// + /// Gets or sets blue component of the RGB value + /// + [JsonProperty(PropertyName = "blue")] + public int? Blue { get; set; } + + /// + /// Gets or sets hexadecimal color value. + /// + [JsonProperty(PropertyName = "hex")] + public string Hex { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditions.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditions.cs new file mode 100644 index 000000000000..11d77de3b13e --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditions.cs @@ -0,0 +1,295 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class CurrentConditions + { + /// + /// Initializes a new instance of the CurrentConditions class. + /// + public CurrentConditions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CurrentConditions class. + /// + /// Date and time of the current observation + /// displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// Phrase description of the current weather + /// condition. Displayed in specified language. + /// Indicates the presence or absence of + /// precipitation. True indicates the presence of precipitation, false + /// indicates the absence of precipitation. + /// Indicates the time of the day. True + /// indicates 'day',', false indicates 'night. + /// Temperature being returned. + /// RealFeel™ Temperature being + /// returned. + /// RealFeel™ Temperature being + /// returned. Describes what the temperature really feels like in the + /// shade. + /// Relative humidity is the amount of + /// water vapor present in air expressed as a percentage of the amount + /// needed for saturation at the same temperature. + /// The dewpoint temperature in specified unit. + /// The dewpoint temperature is the temperature that the air must be + /// cooled to in order to reach saturation. + /// Wind details being returned including speed and + /// direction. + /// Wind gust. Wind gust is a sudden, brief + /// increase in speed of the wind. + /// Phrase associated with the + /// `uvIndex`. + /// Visibility in specified unit. A measure of + /// the distance at which an object or light can be clearly + /// discerned. + /// Cause of limited + /// visibility. + /// Percent representing cloud cover. + /// Cloud ceiling in specified unit. The + /// ceiling is a measurement of the height of the base of the lowest + /// clouds. + /// Atmospheric pressure in specified + /// unit. + /// Atmospheric pressure change. + /// Departure from + /// the temperature observed 24 hours ago in specified unit. + /// Perceived outdoor temperature + /// caused by the combination of air temperature, relative humidity, + /// and wind speed in specified unit. + /// Perceived air temperature on + /// exposed skin due to wind. + /// The temperature to which air may + /// be cooled by evaporating water into it at constant pressure until + /// it reaches saturation. + /// Summary of precipitation amounts + /// over the past 24 hours. + /// Summary of temperature + /// fluctuations over the past 6, 12, and 24 hours. + public CurrentConditions(System.DateTime? dateTime = default(System.DateTime?), string description = default(string), int? iconCode = default(int?), bool? hasPrecipitation = default(bool?), bool? isDaytime = default(bool?), WeatherUnit temperature = default(WeatherUnit), WeatherUnit realFeelTemperature = default(WeatherUnit), WeatherUnit realFeelTemperatureShade = default(WeatherUnit), int? relativeHumidity = default(int?), WeatherUnit dewPoint = default(WeatherUnit), WindDetails wind = default(WindDetails), WindDetails windGust = default(WindDetails), int? uvIndex = default(int?), string uvIndexDescription = default(string), WeatherUnit visibility = default(WeatherUnit), string obstructionsToVisibility = default(string), int? cloudCover = default(int?), WeatherUnit cloudCeiling = default(WeatherUnit), WeatherUnit pressure = default(WeatherUnit), PressureTendency pressureTendency = default(PressureTendency), WeatherUnit pastTwentyFourHourTemperatureDeparture = default(WeatherUnit), WeatherUnit apparentTemperature = default(WeatherUnit), WeatherUnit windChillTemperature = default(WeatherUnit), WeatherUnit wetBulbTemperature = default(WeatherUnit), PrecipitationSummary precipitationSummary = default(PrecipitationSummary), TemperatureSummary temperatureSummary = default(TemperatureSummary)) + { + DateTime = dateTime; + Description = description; + IconCode = iconCode; + HasPrecipitation = hasPrecipitation; + IsDaytime = isDaytime; + Temperature = temperature; + RealFeelTemperature = realFeelTemperature; + RealFeelTemperatureShade = realFeelTemperatureShade; + RelativeHumidity = relativeHumidity; + DewPoint = dewPoint; + Wind = wind; + WindGust = windGust; + UvIndex = uvIndex; + UvIndexDescription = uvIndexDescription; + Visibility = visibility; + ObstructionsToVisibility = obstructionsToVisibility; + CloudCover = cloudCover; + CloudCeiling = cloudCeiling; + Pressure = pressure; + PressureTendency = pressureTendency; + PastTwentyFourHourTemperatureDeparture = pastTwentyFourHourTemperatureDeparture; + ApparentTemperature = apparentTemperature; + WindChillTemperature = windChillTemperature; + WetBulbTemperature = wetBulbTemperature; + PrecipitationSummary = precipitationSummary; + TemperatureSummary = temperatureSummary; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets date and time of the current observation displayed in + /// ISO 8601 format, for example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "dateTime")] + public System.DateTime? DateTime { get; set; } + + /// + /// Gets or sets phrase description of the current weather condition. + /// Displayed in specified language. + /// + [JsonProperty(PropertyName = "phrase")] + public string Description { get; set; } + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// Gets or sets indicates the presence or absence of precipitation. + /// True indicates the presence of precipitation, false indicates the + /// absence of precipitation. + /// + [JsonProperty(PropertyName = "hasPrecipitation")] + public bool? HasPrecipitation { get; set; } + + /// + /// Gets or sets indicates the time of the day. True indicates 'day',', + /// false indicates 'night. + /// + [JsonProperty(PropertyName = "isDayTime")] + public bool? IsDaytime { get; set; } + + /// + /// Gets or sets temperature being returned. + /// + [JsonProperty(PropertyName = "temperature")] + public WeatherUnit Temperature { get; set; } + + /// + /// Gets or sets realFeel™ Temperature being returned. + /// + [JsonProperty(PropertyName = "realFeelTemperature")] + public WeatherUnit RealFeelTemperature { get; set; } + + /// + /// Gets or sets realFeel™ Temperature being returned. Describes what + /// the temperature really feels like in the shade. + /// + [JsonProperty(PropertyName = "realFeelTemperatureShade")] + public WeatherUnit RealFeelTemperatureShade { get; set; } + + /// + /// Gets or sets relative humidity is the amount of water vapor present + /// in air expressed as a percentage of the amount needed for + /// saturation at the same temperature. + /// + [JsonProperty(PropertyName = "relativeHumidity")] + public int? RelativeHumidity { get; set; } + + /// + /// Gets or sets the dewpoint temperature in specified unit. The + /// dewpoint temperature is the temperature that the air must be cooled + /// to in order to reach saturation. + /// + [JsonProperty(PropertyName = "dewPoint")] + public WeatherUnit DewPoint { get; set; } + + /// + /// Gets or sets wind details being returned including speed and + /// direction. + /// + [JsonProperty(PropertyName = "wind")] + public WindDetails Wind { get; set; } + + /// + /// Gets or sets wind gust. Wind gust is a sudden, brief increase in + /// speed of the wind. + /// + [JsonProperty(PropertyName = "windGust")] + public WindDetails WindGust { get; set; } + + /// + /// + [JsonProperty(PropertyName = "uvIndex")] + public int? UvIndex { get; set; } + + /// + /// Gets or sets phrase associated with the `uvIndex`. + /// + [JsonProperty(PropertyName = "uvIndexPhrase")] + public string UvIndexDescription { get; set; } + + /// + /// Gets or sets visibility in specified unit. A measure of the + /// distance at which an object or light can be clearly discerned. + /// + [JsonProperty(PropertyName = "visibility")] + public WeatherUnit Visibility { get; set; } + + /// + /// Gets or sets cause of limited visibility. + /// + [JsonProperty(PropertyName = "obstructionsToVisibility")] + public string ObstructionsToVisibility { get; set; } + + /// + /// Gets or sets percent representing cloud cover. + /// + [JsonProperty(PropertyName = "cloudCover")] + public int? CloudCover { get; set; } + + /// + /// Gets or sets cloud ceiling in specified unit. The ceiling is a + /// measurement of the height of the base of the lowest clouds. + /// + [JsonProperty(PropertyName = "ceiling")] + public WeatherUnit CloudCeiling { get; set; } + + /// + /// Gets or sets atmospheric pressure in specified unit. + /// + [JsonProperty(PropertyName = "pressure")] + public WeatherUnit Pressure { get; set; } + + /// + /// Gets or sets atmospheric pressure change. + /// + [JsonProperty(PropertyName = "pressureTendency")] + public PressureTendency PressureTendency { get; set; } + + /// + /// Gets or sets departure from the temperature observed 24 hours ago + /// in specified unit. + /// + [JsonProperty(PropertyName = "pastTwentyFourHourTemperatureDeparture")] + public WeatherUnit PastTwentyFourHourTemperatureDeparture { get; set; } + + /// + /// Gets or sets perceived outdoor temperature caused by the + /// combination of air temperature, relative humidity, and wind speed + /// in specified unit. + /// + [JsonProperty(PropertyName = "apparentTemperature")] + public WeatherUnit ApparentTemperature { get; set; } + + /// + /// Gets or sets perceived air temperature on exposed skin due to wind. + /// + [JsonProperty(PropertyName = "windChillTemperature")] + public WeatherUnit WindChillTemperature { get; set; } + + /// + /// Gets or sets the temperature to which air may be cooled by + /// evaporating water into it at constant pressure until it reaches + /// saturation. + /// + [JsonProperty(PropertyName = "wetBulbTemperature")] + public WeatherUnit WetBulbTemperature { get; set; } + + /// + /// Gets or sets summary of precipitation amounts over the past 24 + /// hours. + /// + [JsonProperty(PropertyName = "precipitationSummary")] + public PrecipitationSummary PrecipitationSummary { get; set; } + + /// + /// Gets or sets summary of temperature fluctuations over the past 6, + /// 12, and 24 hours. + /// + [JsonProperty(PropertyName = "temperatureSummary")] + public TemperatureSummary TemperatureSummary { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditionsResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditionsResponse.cs new file mode 100644 index 000000000000..23ad88e4b9be --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/CurrentConditionsResponse.cs @@ -0,0 +1,50 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class CurrentConditionsResponse + { + /// + /// Initializes a new instance of the CurrentConditionsResponse class. + /// + public CurrentConditionsResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CurrentConditionsResponse class. + /// + /// Detailed current weather conditions. + public CurrentConditionsResponse(IList results = default(IList)) + { + Results = results; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets detailed current weather conditions. + /// + [JsonProperty(PropertyName = "results")] + public IList Results { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecast.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecast.cs new file mode 100644 index 000000000000..8af460bdb49f --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecast.cs @@ -0,0 +1,131 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class DailyForecast + { + /// + /// Initializes a new instance of the DailyForecast class. + /// + public DailyForecast() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DailyForecast class. + /// + /// Date and time of the current observation + /// displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// Temperature values for the day. + /// RealFeel™ Temperature being + /// returned. + /// RealFeel™ Temperature being + /// returned. Describes what the temperature really feels like in the + /// shade. + /// Hours of sun. + /// Summary for mean temperature + /// of Heating Degree Day or Cooling Degree Day information + /// Air quality + /// Day forecast detail + /// Night forecast detail + /// Source(s) of the forecast data. + public DailyForecast(System.DateTime? dateTime = default(System.DateTime?), WeatherUnitRange temperature = default(WeatherUnitRange), WeatherUnitRange realFeelTemperature = default(WeatherUnitRange), WeatherUnitRange realFeelTemperatureShade = default(WeatherUnitRange), double? hoursOfSun = default(double?), DegreeDaySummary meanTemperatureDeviation = default(DegreeDaySummary), IList airQuality = default(IList), DayOrNight daytimeForecast = default(DayOrNight), DayOrNight nighttimeForecast = default(DayOrNight), IList sources = default(IList)) + { + DateTime = dateTime; + Temperature = temperature; + RealFeelTemperature = realFeelTemperature; + RealFeelTemperatureShade = realFeelTemperatureShade; + HoursOfSun = hoursOfSun; + MeanTemperatureDeviation = meanTemperatureDeviation; + AirQuality = airQuality; + DaytimeForecast = daytimeForecast; + NighttimeForecast = nighttimeForecast; + Sources = sources; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets date and time of the current observation displayed in + /// ISO 8601 format, for example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "date")] + public System.DateTime? DateTime { get; set; } + + /// + /// Gets or sets temperature values for the day. + /// + [JsonProperty(PropertyName = "temperature")] + public WeatherUnitRange Temperature { get; set; } + + /// + /// Gets or sets realFeel™ Temperature being returned. + /// + [JsonProperty(PropertyName = "realFeelTemperature")] + public WeatherUnitRange RealFeelTemperature { get; set; } + + /// + /// Gets or sets realFeel™ Temperature being returned. Describes what + /// the temperature really feels like in the shade. + /// + [JsonProperty(PropertyName = "realFeelTemperatureShade")] + public WeatherUnitRange RealFeelTemperatureShade { get; set; } + + /// + /// Gets or sets hours of sun. + /// + [JsonProperty(PropertyName = "hoursOfSun")] + public double? HoursOfSun { get; set; } + + /// + /// Gets or sets summary for mean temperature of Heating Degree Day or + /// Cooling Degree Day information + /// + [JsonProperty(PropertyName = "degreeDaySummary")] + public DegreeDaySummary MeanTemperatureDeviation { get; set; } + + /// + /// Gets or sets air quality + /// + [JsonProperty(PropertyName = "airAndPollen")] + public IList AirQuality { get; set; } + + /// + /// Gets or sets day forecast detail + /// + [JsonProperty(PropertyName = "day")] + public DayOrNight DaytimeForecast { get; set; } + + /// + /// Gets or sets night forecast detail + /// + [JsonProperty(PropertyName = "night")] + public DayOrNight NighttimeForecast { get; set; } + + /// + /// Gets or sets source(s) of the forecast data. + /// + [JsonProperty(PropertyName = "sources")] + public IList Sources { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastResponse.cs new file mode 100644 index 000000000000..a42e247483d1 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastResponse.cs @@ -0,0 +1,57 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class DailyForecastResponse + { + /// + /// Initializes a new instance of the DailyForecastResponse class. + /// + public DailyForecastResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DailyForecastResponse class. + /// + /// Forecast data for each requested + /// day. + public DailyForecastResponse(DailyForecastSummary summary = default(DailyForecastSummary), IList forecasts = default(IList)) + { + Summary = summary; + Forecasts = forecasts; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "summary")] + public DailyForecastSummary Summary { get; private set; } + + /// + /// Gets forecast data for each requested day. + /// + [JsonProperty(PropertyName = "forecasts")] + public IList Forecasts { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastSummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastSummary.cs new file mode 100644 index 000000000000..980aaef4e567 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyForecastSummary.cs @@ -0,0 +1,93 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Summary for the main conditions for the requested time period. Notice + /// that summary can cover only part of the time period. + /// + public partial class DailyForecastSummary + { + /// + /// Initializes a new instance of the DailyForecastSummary class. + /// + public DailyForecastSummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DailyForecastSummary class. + /// + /// Date and time that the summary is in + /// effect, displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// Date and time that the summary period ends, + /// displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// severity + /// Summary phrase of the daily forecast. + /// Displayed in specified language. + /// one or 2 word(s) to summarize the + /// phrase. + public DailyForecastSummary(System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), int? severity = default(int?), string phrase = default(string), string category = default(string)) + { + StartDate = startDate; + EndDate = endDate; + Severity = severity; + Phrase = phrase; + Category = category; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets date and time that the summary is in effect, displayed + /// in ISO 8601 format, for example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "startDate")] + public System.DateTime? StartDate { get; set; } + + /// + /// Gets or sets date and time that the summary period ends, displayed + /// in ISO 8601 format, for example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "endDate")] + public System.DateTime? EndDate { get; set; } + + /// + /// Gets or sets severity + /// + [JsonProperty(PropertyName = "severity")] + public int? Severity { get; set; } + + /// + /// Gets or sets summary phrase of the daily forecast. Displayed in + /// specified language. + /// + [JsonProperty(PropertyName = "phrase")] + public string Phrase { get; set; } + + /// + /// Gets or sets one or 2 word(s) to summarize the phrase. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndex.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndex.cs new file mode 100644 index 000000000000..bf8917a61fcd --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndex.cs @@ -0,0 +1,151 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Information about a daily index. + /// + public partial class DailyIndex + { + /// + /// Initializes a new instance of the DailyIndex class. + /// + public DailyIndex() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DailyIndex class. + /// + /// Name of the index, for example, + /// "Construction", "Outdoor Activity", "Flight Delays". + /// Numeric ID used to identify the specific + /// index. Please refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and + /// to see the supported index IDs. For example, the index ID can + /// support UI visualization scenarios. + /// Date and time of the current observation + /// displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// Index value. Ranges from 0.0 to 10.0. Please + /// refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and + /// to see the supported ranges. + /// Textual description for + /// `categoryValue` corresponding to the level that the index value + /// falls under, for example "Very Good". + /// Level that the index value falls under, + /// represented by an integer. This value can be 1 through 5 and should + /// be used in combination with the `ascending` flag because it can + /// differ among indices. For example, the following values apply for + /// Mosquito Activity: Low=1, Moderate=2, High=3, Very High=4, and + /// Extreme=5. + /// Describes the direction of the `value` + /// and `categoryValue`. For example, when set to `true`, the poorest + /// index value is 0 and the best index value is 10. When set to + /// `true`, the poorest index value is 10 and the best index value is + /// 0. + /// A textual explanation that can be used + /// for display purposes to summarize the index value and category. For + /// example, when the index value for Flight Delays is very good, the + /// description will be "Conditions are excellent for flying!". + public DailyIndex(string indexName = default(string), int? indexId = default(int?), System.DateTime? dateTime = default(System.DateTime?), double? value = default(double?), string categoryDescription = default(string), int? categoryValue = default(int?), bool? isAscending = default(bool?), string description = default(string)) + { + IndexName = indexName; + IndexId = indexId; + DateTime = dateTime; + Value = value; + CategoryDescription = categoryDescription; + CategoryValue = categoryValue; + IsAscending = isAscending; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the index, for example, "Construction", + /// "Outdoor Activity", "Flight Delays". + /// + [JsonProperty(PropertyName = "indexName")] + public string IndexName { get; set; } + + /// + /// Gets or sets numeric ID used to identify the specific index. Please + /// refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and + /// to see the supported index IDs. For example, the index ID can + /// support UI visualization scenarios. + /// + [JsonProperty(PropertyName = "indexId")] + public int? IndexId { get; set; } + + /// + /// Gets or sets date and time of the current observation displayed in + /// ISO 8601 format, for example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "dateTime")] + public System.DateTime? DateTime { get; set; } + + /// + /// Gets or sets index value. Ranges from 0.0 to 10.0. Please refer to + /// [Weather Service Concepts](https://aka.ms/AzureMapsWeatherConcepts) + /// for details and to see the supported ranges. + /// + [JsonProperty(PropertyName = "value")] + public double? Value { get; set; } + + /// + /// Gets or sets textual description for `categoryValue` corresponding + /// to the level that the index value falls under, for example "Very + /// Good". + /// + [JsonProperty(PropertyName = "category")] + public string CategoryDescription { get; set; } + + /// + /// Gets or sets level that the index value falls under, represented by + /// an integer. This value can be 1 through 5 and should be used in + /// combination with the `ascending` flag because it can differ among + /// indices. For example, the following values apply for Mosquito + /// Activity: Low=1, Moderate=2, High=3, Very High=4, and Extreme=5. + /// + [JsonProperty(PropertyName = "categoryValue")] + public int? CategoryValue { get; set; } + + /// + /// Gets or sets describes the direction of the `value` and + /// `categoryValue`. For example, when set to `true`, the poorest index + /// value is 0 and the best index value is 10. When set to `true`, the + /// poorest index value is 10 and the best index value is 0. + /// + [JsonProperty(PropertyName = "ascending")] + public bool? IsAscending { get; set; } + + /// + /// Gets or sets a textual explanation that can be used for display + /// purposes to summarize the index value and category. For example, + /// when the index value for Flight Delays is very good, the + /// description will be "Conditions are excellent for flying!". + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndicesResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndicesResponse.cs new file mode 100644 index 000000000000..56f0a0c1c5c5 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DailyIndicesResponse.cs @@ -0,0 +1,54 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This object is returned from a successful Get Daily Indices call. + /// + public partial class DailyIndicesResponse + { + /// + /// Initializes a new instance of the DailyIndicesResponse class. + /// + public DailyIndicesResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DailyIndicesResponse class. + /// + /// A list of all daily indices for the queried + /// location. + public DailyIndicesResponse(IList results = default(IList)) + { + Results = results; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets a list of all daily indices for the queried location. + /// + [JsonProperty(PropertyName = "results")] + public IList Results { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayOrNight.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayOrNight.cs new file mode 100644 index 000000000000..b4e4af8ae7fd --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DayOrNight.cs @@ -0,0 +1,265 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class DayOrNight + { + /// + /// Initializes a new instance of the DayOrNight class. + /// + public DayOrNight() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DayOrNight class. + /// + /// Phrase description of the icon. Displayed + /// in specified language. For example, 'Sunny'. + /// Indicates the presence or absence of + /// precipitation. True indicates the presence of precipitation, false + /// indicates the absence of precipitation. + /// Possible values include: 'Rain', + /// 'Snow', 'Ice', 'Mix' + /// Description of the + /// intensity. + /// Phrase description of the forecast + /// in specified language. Azure Maps attempts to keep this phrase + /// under 30 characters in length, but some languages/weather events + /// may result in a longer phrase length, exceeding 30 + /// characters. + /// Phrase description of the forecast in + /// specified language. Azure Maps attempts to keep this phrase under + /// 100 characters in length, but some languages/weather events may + /// result in a longer phrase length, exceeding 100 characters. + /// Percent representing the + /// probability of precipitation. For example, '20'. + /// Percent representing the + /// probability of a thunderstorm. For example, '80'. + /// Percent representing the probability + /// of rain. For example, '40'. + /// Percent representing the probability + /// of snow. For example, '30'. + /// Percent representing the probability + /// of ice. For example, '30'. + /// Wind details being returned including speed and + /// direction. + /// Wind gust. Wind gust is a sudden, brief + /// increase in speed of the wind. + /// Total liquid equivalent of precipitation + /// during the forecast period. + /// Rain + /// Snow + /// Ice + /// Hours of precipitation + /// Hours of rain. + /// Hours of snow. + /// Hours of ice. + /// Percent representing cloud cover. + public DayOrNight(int? iconCode = default(int?), string iconPhrase = default(string), LocalSource localSource = default(LocalSource), bool? hasPrecipitation = default(bool?), string precipitationType = default(string), string precipitationIntensity = default(string), string shortDescription = default(string), string longPhrase = default(string), int? precipitationProbability = default(int?), int? thunderstormProbability = default(int?), int? rainProbability = default(int?), int? snowProbability = default(int?), int? iceProbability = default(int?), WindDetails wind = default(WindDetails), WindDetails windGust = default(WindDetails), WeatherUnit totalLiquid = default(WeatherUnit), WeatherUnit rain = default(WeatherUnit), WeatherUnit snow = default(WeatherUnit), WeatherUnit ice = default(WeatherUnit), double? hoursOfPrecipitation = default(double?), double? hoursOfRain = default(double?), double? hoursOfSnow = default(double?), double? hoursOfIce = default(double?), int? cloudCover = default(int?)) + { + IconCode = iconCode; + IconPhrase = iconPhrase; + LocalSource = localSource; + HasPrecipitation = hasPrecipitation; + PrecipitationType = precipitationType; + PrecipitationIntensity = precipitationIntensity; + ShortDescription = shortDescription; + LongPhrase = longPhrase; + PrecipitationProbability = precipitationProbability; + ThunderstormProbability = thunderstormProbability; + RainProbability = rainProbability; + SnowProbability = snowProbability; + IceProbability = iceProbability; + Wind = wind; + WindGust = windGust; + TotalLiquid = totalLiquid; + Rain = rain; + Snow = snow; + Ice = ice; + HoursOfPrecipitation = hoursOfPrecipitation; + HoursOfRain = hoursOfRain; + HoursOfSnow = hoursOfSnow; + HoursOfIce = hoursOfIce; + CloudCover = cloudCover; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// Gets or sets phrase description of the icon. Displayed in specified + /// language. For example, 'Sunny'. + /// + [JsonProperty(PropertyName = "iconPhrase")] + public string IconPhrase { get; set; } + + /// + /// + [JsonProperty(PropertyName = "localSource")] + public LocalSource LocalSource { get; set; } + + /// + /// Gets or sets indicates the presence or absence of precipitation. + /// True indicates the presence of precipitation, false indicates the + /// absence of precipitation. + /// + [JsonProperty(PropertyName = "hasPrecipitation")] + public bool? HasPrecipitation { get; set; } + + /// + /// Gets or sets possible values include: 'Rain', 'Snow', 'Ice', 'Mix' + /// + [JsonProperty(PropertyName = "precipitationType")] + public string PrecipitationType { get; set; } + + /// + /// Gets or sets description of the intensity. + /// + [JsonProperty(PropertyName = "precipitationIntensity")] + public string PrecipitationIntensity { get; set; } + + /// + /// Gets or sets phrase description of the forecast in specified + /// language. Azure Maps attempts to keep this phrase under 30 + /// characters in length, but some languages/weather events may result + /// in a longer phrase length, exceeding 30 characters. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + /// + /// Gets or sets phrase description of the forecast in specified + /// language. Azure Maps attempts to keep this phrase under 100 + /// characters in length, but some languages/weather events may result + /// in a longer phrase length, exceeding 100 characters. + /// + [JsonProperty(PropertyName = "longPhrase")] + public string LongPhrase { get; set; } + + /// + /// Gets or sets percent representing the probability of precipitation. + /// For example, '20'. + /// + [JsonProperty(PropertyName = "precipitationProbability")] + public int? PrecipitationProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of a + /// thunderstorm. For example, '80'. + /// + [JsonProperty(PropertyName = "thunderstormProbability")] + public int? ThunderstormProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of rain. For + /// example, '40'. + /// + [JsonProperty(PropertyName = "rainProbability")] + public int? RainProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of snow. For + /// example, '30'. + /// + [JsonProperty(PropertyName = "snowProbability")] + public int? SnowProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of ice. For + /// example, '30'. + /// + [JsonProperty(PropertyName = "iceProbability")] + public int? IceProbability { get; set; } + + /// + /// Gets or sets wind details being returned including speed and + /// direction. + /// + [JsonProperty(PropertyName = "wind")] + public WindDetails Wind { get; set; } + + /// + /// Gets or sets wind gust. Wind gust is a sudden, brief increase in + /// speed of the wind. + /// + [JsonProperty(PropertyName = "windGust")] + public WindDetails WindGust { get; set; } + + /// + /// Gets or sets total liquid equivalent of precipitation during the + /// forecast period. + /// + [JsonProperty(PropertyName = "totalLiquid")] + public WeatherUnit TotalLiquid { get; set; } + + /// + /// Gets or sets rain + /// + [JsonProperty(PropertyName = "rain")] + public WeatherUnit Rain { get; set; } + + /// + /// Gets or sets snow + /// + [JsonProperty(PropertyName = "snow")] + public WeatherUnit Snow { get; set; } + + /// + /// Gets or sets ice + /// + [JsonProperty(PropertyName = "ice")] + public WeatherUnit Ice { get; set; } + + /// + /// Gets or sets hours of precipitation + /// + [JsonProperty(PropertyName = "hoursOfPrecipitation")] + public double? HoursOfPrecipitation { get; set; } + + /// + /// Gets or sets hours of rain. + /// + [JsonProperty(PropertyName = "hoursOfRain")] + public double? HoursOfRain { get; set; } + + /// + /// Gets or sets hours of snow. + /// + [JsonProperty(PropertyName = "hoursOfSnow")] + public double? HoursOfSnow { get; set; } + + /// + /// Gets or sets hours of ice. + /// + [JsonProperty(PropertyName = "hoursOfIce")] + public double? HoursOfIce { get; set; } + + /// + /// Gets or sets percent representing cloud cover. + /// + [JsonProperty(PropertyName = "cloudCover")] + public int? CloudCover { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DegreeDaySummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DegreeDaySummary.cs new file mode 100644 index 000000000000..c667571f6c19 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/DegreeDaySummary.cs @@ -0,0 +1,60 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class DegreeDaySummary + { + /// + /// Initializes a new instance of the DegreeDaySummary class. + /// + public DegreeDaySummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DegreeDaySummary class. + /// + /// Number of degrees that the mean temperature + /// is below 65 degrees F/ 18 degree C. + /// Number of degrees that the mean temperature + /// is above 65 degrees F/ 18 degree C. + public DegreeDaySummary(WeatherUnit heating = default(WeatherUnit), WeatherUnit cooling = default(WeatherUnit)) + { + Heating = heating; + Cooling = cooling; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets number of degrees that the mean temperature is below + /// 65 degrees F/ 18 degree C. + /// + [JsonProperty(PropertyName = "heating")] + public WeatherUnit Heating { get; set; } + + /// + /// Gets or sets number of degrees that the mean temperature is above + /// 65 degrees F/ 18 degree C. + /// + [JsonProperty(PropertyName = "cooling")] + public WeatherUnit Cooling { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..68872685862d --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,59 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource management error additional info. + /// + public partial class ErrorAdditionalInfo + { + /// + /// Initializes a new instance of the ErrorAdditionalInfo class. + /// + public ErrorAdditionalInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorAdditionalInfo class. + /// + /// The additional info type. + /// The additional info. + public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + { + Type = type; + Info = info; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the additional info type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the additional info. + /// + [JsonProperty(PropertyName = "info")] + public object Info { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorDetail.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorDetail.cs new file mode 100644 index 000000000000..78c3ab5a0852 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorDetail.cs @@ -0,0 +1,85 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The error detail. + /// + public partial class ErrorDetail + { + /// + /// Initializes a new instance of the ErrorDetail class. + /// + public ErrorDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorDetail class. + /// + /// The error code. + /// The error message. + /// The error target. + /// The error details. + /// The error additional info. + public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) + { + Code = code; + Message = message; + Target = target; + Details = details; + AdditionalInfo = additionalInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets the error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets the error target. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; private set; } + + /// + /// Gets the error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; private set; } + + /// + /// Gets the error additional info. + /// + [JsonProperty(PropertyName = "additionalInfo")] + public IList AdditionalInfo { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..f97fdb0bf397 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponse.cs @@ -0,0 +1,56 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Error response + /// + /// + /// Common error response for all Azure Resource Manager APIs to return + /// error details for failed operations. (This also follows the OData error + /// response format.). + /// + public partial class ErrorResponse + { + /// + /// Initializes a new instance of the ErrorResponse class. + /// + public ErrorResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + /// The error object. + public ErrorResponse(ErrorDetail error = default(ErrorDetail)) + { + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the error object. + /// + [JsonProperty(PropertyName = "error")] + public ErrorDetail Error { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponseException.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponseException.cs new file mode 100644 index 000000000000..c1ae702848d1 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ErrorResponseException.cs @@ -0,0 +1,62 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Microsoft.Rest; + + /// + /// Exception thrown for an invalid response with ErrorResponse + /// information. + /// + public partial class ErrorResponseException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ErrorResponse Body { get; set; } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + public ErrorResponseException() + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + public ErrorResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + /// The exception message. + /// Inner exception. + public ErrorResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ForecastInterval.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ForecastInterval.cs new file mode 100644 index 000000000000..da843c834f86 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/ForecastInterval.cs @@ -0,0 +1,138 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ForecastInterval + { + /// + /// Initializes a new instance of the ForecastInterval class. + /// + public ForecastInterval() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ForecastInterval class. + /// + /// The date and time for the start of the + /// interval in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// The first minute for the interval. + /// A unit that represents forecasted + /// precipitation intensity. + /// A short phrase describing + /// precipitation condition for the interval. + /// Key that specifies the threshold value. + /// Along with precipitationType, can be used to determine the + /// simplifiedColor. If dbz is zero, not present in the + /// response. + /// The full spectrum color that maps to the dBZ + /// (decibel relative to Z). If dbz is zero, color is not present in + /// the response. + /// The band color that maps to the + /// precipitation type and threshold. If dbz is zero, not present in + /// the response. + /// Possible values include: 'Rain', + /// 'Snow', 'Ice', 'Mix' + /// Percent representing cloud cover. + public ForecastInterval(System.DateTime? startTime = default(System.DateTime?), int? minute = default(int?), double? decibelRelativeToZ = default(double?), string shortDescription = default(string), string threshold = default(string), ColorValue color = default(ColorValue), ColorValue simplifiedColor = default(ColorValue), string precipitationType = default(string), int? iconCode = default(int?), int? cloudCover = default(int?)) + { + StartTime = startTime; + Minute = minute; + DecibelRelativeToZ = decibelRelativeToZ; + ShortDescription = shortDescription; + Threshold = threshold; + Color = color; + SimplifiedColor = simplifiedColor; + PrecipitationType = precipitationType; + IconCode = iconCode; + CloudCover = cloudCover; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the date and time for the start of the interval in ISO + /// 8601 format, for example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets the first minute for the interval. + /// + [JsonProperty(PropertyName = "minute")] + public int? Minute { get; set; } + + /// + /// Gets or sets a unit that represents forecasted precipitation + /// intensity. + /// + [JsonProperty(PropertyName = "dbz")] + public double? DecibelRelativeToZ { get; set; } + + /// + /// Gets or sets a short phrase describing precipitation condition for + /// the interval. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + /// + /// Gets or sets key that specifies the threshold value. Along with + /// precipitationType, can be used to determine the simplifiedColor. If + /// dbz is zero, not present in the response. + /// + [JsonProperty(PropertyName = "threshold")] + public string Threshold { get; set; } + + /// + /// Gets or sets the full spectrum color that maps to the dBZ (decibel + /// relative to Z). If dbz is zero, color is not present in the + /// response. + /// + [JsonProperty(PropertyName = "color")] + public ColorValue Color { get; set; } + + /// + /// Gets or sets the band color that maps to the precipitation type and + /// threshold. If dbz is zero, not present in the response. + /// + [JsonProperty(PropertyName = "simplifiedColor")] + public ColorValue SimplifiedColor { get; set; } + + /// + /// Gets or sets possible values include: 'Rain', 'Snow', 'Ice', 'Mix' + /// + [JsonProperty(PropertyName = "precipitationType")] + public string PrecipitationType { get; set; } + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// Gets or sets percent representing cloud cover. + /// + [JsonProperty(PropertyName = "cloudCover")] + public int? CloudCover { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardDetail.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardDetail.cs new file mode 100644 index 000000000000..8f131690bf32 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HazardDetail.cs @@ -0,0 +1,77 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class HazardDetail + { + /// + /// Initializes a new instance of the HazardDetail class. + /// + public HazardDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HazardDetail class. + /// + /// A unique identifier (non-displayable) for + /// each type of hazard: LightRain, ModerateRain, HeavyRain, LightMix, + /// ModerateMix, HeavyMix, LightSnow, ModerateSnow, HeavySnow, + /// LightIce, ModerateIce, HeavyIce, Hail, LargeHail, SunGlare, + /// SunGlareHigh, Lightning, SevereLightning, WindModerate, WindHigh, + /// WindExtreme, FloodWarning, FlashFloodWarning, TornadoWarning, + /// TsunamiWarning, SevereThunderstormWarning. + /// A displayable short phrase + /// describing the forecasted conditions and precipitation + /// intensity/type. + public HazardDetail(int? hazardIndex = default(int?), string hazardCode = default(string), string shortDescription = default(string)) + { + HazardIndex = hazardIndex; + HazardCode = hazardCode; + ShortDescription = shortDescription; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "hazardIndex")] + public int? HazardIndex { get; set; } + + /// + /// Gets or sets a unique identifier (non-displayable) for each type of + /// hazard: LightRain, ModerateRain, HeavyRain, LightMix, ModerateMix, + /// HeavyMix, LightSnow, ModerateSnow, HeavySnow, LightIce, + /// ModerateIce, HeavyIce, Hail, LargeHail, SunGlare, SunGlareHigh, + /// Lightning, SevereLightning, WindModerate, WindHigh, WindExtreme, + /// FloodWarning, FlashFloodWarning, TornadoWarning, TsunamiWarning, + /// SevereThunderstormWarning. + /// + [JsonProperty(PropertyName = "hazardCode")] + public string HazardCode { get; set; } + + /// + /// Gets or sets a displayable short phrase describing the forecasted + /// conditions and precipitation intensity/type. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecast.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecast.cs new file mode 100644 index 000000000000..f7620c8a8cec --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecast.cs @@ -0,0 +1,281 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class HourlyForecast + { + /// + /// Initializes a new instance of the HourlyForecast class. + /// + public HourlyForecast() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HourlyForecast class. + /// + /// Date and time of the forecast in ISO 8601 + /// format, for example, 2019-10-27T19:39:57-08:00. + /// Phrase description of the weather + /// icon. + /// Indicates the presence or absence of + /// precipitation. True indicates the presence of precipitation, false + /// indicates the absence of precipitation. + /// Specifies whether or not it is daylight. + /// True indicates day light. + /// Temperature being returned. + /// RealFeel™ Temperature being + /// returned. Describes what the temperature really feels like in the + /// shade. + /// The temperature to which air may + /// be cooled by evaporating water into it at constant pressure until + /// it reaches saturation. + /// The dewpoint temperature in specified unit. + /// The dewpoint temperature is the temperature that the air must be + /// cooled to in order to reach saturation. + /// Wind details being returned including speed and + /// direction. + /// Wind gust. Wind gust is a sudden, brief + /// increase in speed of the wind. + /// Relative humidity is the amount of + /// water vapor present in air expressed as a percentage of the amount + /// needed for saturation at the same temperature. + /// Visibility in specified unit. A measure of + /// the distance at which an object or light can be clearly + /// discerned. + /// Cloud ceiling in specified unit. The + /// ceiling is a measurement of the height of the base of the lowest + /// clouds. + /// Phrase associated with the + /// `uvIndex`. + /// Percent representing the + /// probability of precipitation. For example, '20'. + /// Percent representing the probability + /// of rain. For example, '50'. + /// Percent representing the probability + /// of snow. For example, '50'. + /// Percent representing the probability + /// of snow. For example, '5'. + /// Total liquid equivalent of precipitation + /// during the forecast period. + /// Rain + /// Snow + /// Ice + /// Percent representing cloud cover. + public HourlyForecast(System.DateTime? dateTime = default(System.DateTime?), int? iconCode = default(int?), string iconPhrase = default(string), bool? hasPrecipitation = default(bool?), bool? isDaylight = default(bool?), WeatherUnit temperature = default(WeatherUnit), WeatherUnit realFeelTemperature = default(WeatherUnit), WeatherUnit wetBulbTemperature = default(WeatherUnit), WeatherUnit dewPoint = default(WeatherUnit), WindDetails wind = default(WindDetails), WindDetails windGust = default(WindDetails), int? relativeHumidity = default(int?), WeatherUnit visibility = default(WeatherUnit), WeatherUnit cloudCeiling = default(WeatherUnit), int? uvIndex = default(int?), string uvIndexDescription = default(string), int? precipitationProbability = default(int?), int? rainProbability = default(int?), int? snowProbability = default(int?), int? iceProbability = default(int?), WeatherUnit totalLiquid = default(WeatherUnit), WeatherUnit rain = default(WeatherUnit), WeatherUnit snow = default(WeatherUnit), WeatherUnit ice = default(WeatherUnit), int? cloudCover = default(int?)) + { + DateTime = dateTime; + IconCode = iconCode; + IconPhrase = iconPhrase; + HasPrecipitation = hasPrecipitation; + IsDaylight = isDaylight; + Temperature = temperature; + RealFeelTemperature = realFeelTemperature; + WetBulbTemperature = wetBulbTemperature; + DewPoint = dewPoint; + Wind = wind; + WindGust = windGust; + RelativeHumidity = relativeHumidity; + Visibility = visibility; + CloudCeiling = cloudCeiling; + UvIndex = uvIndex; + UvIndexDescription = uvIndexDescription; + PrecipitationProbability = precipitationProbability; + RainProbability = rainProbability; + SnowProbability = snowProbability; + IceProbability = iceProbability; + TotalLiquid = totalLiquid; + Rain = rain; + Snow = snow; + Ice = ice; + CloudCover = cloudCover; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets date and time of the forecast in ISO 8601 format, for + /// example, 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "date")] + public System.DateTime? DateTime { get; set; } + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// Gets or sets phrase description of the weather icon. + /// + [JsonProperty(PropertyName = "iconPhrase")] + public string IconPhrase { get; set; } + + /// + /// Gets or sets indicates the presence or absence of precipitation. + /// True indicates the presence of precipitation, false indicates the + /// absence of precipitation. + /// + [JsonProperty(PropertyName = "hasPrecipitation")] + public bool? HasPrecipitation { get; set; } + + /// + /// Gets or sets specifies whether or not it is daylight. True + /// indicates day light. + /// + [JsonProperty(PropertyName = "isDaylight")] + public bool? IsDaylight { get; set; } + + /// + /// Gets or sets temperature being returned. + /// + [JsonProperty(PropertyName = "temperature")] + public WeatherUnit Temperature { get; set; } + + /// + /// Gets or sets realFeel™ Temperature being returned. Describes what + /// the temperature really feels like in the shade. + /// + [JsonProperty(PropertyName = "realFeelTemperature")] + public WeatherUnit RealFeelTemperature { get; set; } + + /// + /// Gets or sets the temperature to which air may be cooled by + /// evaporating water into it at constant pressure until it reaches + /// saturation. + /// + [JsonProperty(PropertyName = "wetBulbTemperature")] + public WeatherUnit WetBulbTemperature { get; set; } + + /// + /// Gets or sets the dewpoint temperature in specified unit. The + /// dewpoint temperature is the temperature that the air must be cooled + /// to in order to reach saturation. + /// + [JsonProperty(PropertyName = "dewPoint")] + public WeatherUnit DewPoint { get; set; } + + /// + /// Gets or sets wind details being returned including speed and + /// direction. + /// + [JsonProperty(PropertyName = "wind")] + public WindDetails Wind { get; set; } + + /// + /// Gets or sets wind gust. Wind gust is a sudden, brief increase in + /// speed of the wind. + /// + [JsonProperty(PropertyName = "windGust")] + public WindDetails WindGust { get; set; } + + /// + /// Gets or sets relative humidity is the amount of water vapor present + /// in air expressed as a percentage of the amount needed for + /// saturation at the same temperature. + /// + [JsonProperty(PropertyName = "relativeHumidity")] + public int? RelativeHumidity { get; set; } + + /// + /// Gets or sets visibility in specified unit. A measure of the + /// distance at which an object or light can be clearly discerned. + /// + [JsonProperty(PropertyName = "visibility")] + public WeatherUnit Visibility { get; set; } + + /// + /// Gets or sets cloud ceiling in specified unit. The ceiling is a + /// measurement of the height of the base of the lowest clouds. + /// + [JsonProperty(PropertyName = "ceiling")] + public WeatherUnit CloudCeiling { get; set; } + + /// + /// + [JsonProperty(PropertyName = "uvIndex")] + public int? UvIndex { get; set; } + + /// + /// Gets or sets phrase associated with the `uvIndex`. + /// + [JsonProperty(PropertyName = "uvIndexPhrase")] + public string UvIndexDescription { get; set; } + + /// + /// Gets or sets percent representing the probability of precipitation. + /// For example, '20'. + /// + [JsonProperty(PropertyName = "precipitationProbability")] + public int? PrecipitationProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of rain. For + /// example, '50'. + /// + [JsonProperty(PropertyName = "rainProbability")] + public int? RainProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of snow. For + /// example, '50'. + /// + [JsonProperty(PropertyName = "snowProbability")] + public int? SnowProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of snow. For + /// example, '5'. + /// + [JsonProperty(PropertyName = "iceProbability")] + public int? IceProbability { get; set; } + + /// + /// Gets or sets total liquid equivalent of precipitation during the + /// forecast period. + /// + [JsonProperty(PropertyName = "totalLiquid")] + public WeatherUnit TotalLiquid { get; set; } + + /// + /// Gets or sets rain + /// + [JsonProperty(PropertyName = "rain")] + public WeatherUnit Rain { get; set; } + + /// + /// Gets or sets snow + /// + [JsonProperty(PropertyName = "snow")] + public WeatherUnit Snow { get; set; } + + /// + /// Gets or sets ice + /// + [JsonProperty(PropertyName = "ice")] + public WeatherUnit Ice { get; set; } + + /// + /// Gets or sets percent representing cloud cover. + /// + [JsonProperty(PropertyName = "cloudCover")] + public int? CloudCover { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecastResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecastResponse.cs new file mode 100644 index 000000000000..1d5970b41b34 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/HourlyForecastResponse.cs @@ -0,0 +1,51 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class HourlyForecastResponse + { + /// + /// Initializes a new instance of the HourlyForecastResponse class. + /// + public HourlyForecastResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HourlyForecastResponse class. + /// + /// Forecast data for each returned + /// hour. + public HourlyForecastResponse(IList forecasts = default(IList)) + { + Forecasts = forecasts; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets forecast data for each returned hour. + /// + [JsonProperty(PropertyName = "forecasts")] + public IList Forecasts { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IntervalSummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IntervalSummary.cs new file mode 100644 index 000000000000..6dea5cb616e1 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/IntervalSummary.cs @@ -0,0 +1,102 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class IntervalSummary + { + /// + /// Initializes a new instance of the IntervalSummary class. + /// + public IntervalSummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntervalSummary class. + /// + /// The first minute to which the summary + /// applies. + /// The last minute to which the summary + /// applies. + /// The number of minutes for which the + /// summary applies. + /// Short summary phrase. Phrase length + /// is approximately 25 characters. + /// Brief summary phrase. Phrase length + /// is approximately 60 characters. + /// Long summary phrase. Phrase length is 60+ + /// characters. + public IntervalSummary(int? startMinute = default(int?), int? endMinute = default(int?), int? totalMinutes = default(int?), string shortDescription = default(string), string briefDescription = default(string), string longPhrase = default(string), int? iconCode = default(int?)) + { + StartMinute = startMinute; + EndMinute = endMinute; + TotalMinutes = totalMinutes; + ShortDescription = shortDescription; + BriefDescription = briefDescription; + LongPhrase = longPhrase; + IconCode = iconCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the first minute to which the summary applies. + /// + [JsonProperty(PropertyName = "startMinute")] + public int? StartMinute { get; set; } + + /// + /// Gets or sets the last minute to which the summary applies. + /// + [JsonProperty(PropertyName = "endMinute")] + public int? EndMinute { get; set; } + + /// + /// Gets or sets the number of minutes for which the summary applies. + /// + [JsonProperty(PropertyName = "totalMinutes")] + public int? TotalMinutes { get; set; } + + /// + /// Gets or sets short summary phrase. Phrase length is approximately + /// 25 characters. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + /// + /// Gets or sets brief summary phrase. Phrase length is approximately + /// 60 characters. + /// + [JsonProperty(PropertyName = "briefPhrase")] + public string BriefDescription { get; set; } + + /// + /// Gets or sets long summary phrase. Phrase length is 60+ characters. + /// + [JsonProperty(PropertyName = "longPhrase")] + public string LongPhrase { get; set; } + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatus.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatus.cs new file mode 100644 index 000000000000..ff4c9a365525 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatus.cs @@ -0,0 +1,67 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The latest status on the alert in the current area. + /// + public partial class LatestStatus + { + /// + /// Initializes a new instance of the LatestStatus class. + /// + public LatestStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LatestStatus class. + /// + /// The latest status keyword for the alert, in + /// the specified language. By default, returned in English + /// (en-US). + /// Latest status keyword for the alert, in + /// English (en-US). Possible values include: 'New', 'Extend', + /// 'Cancel', 'Correct', 'Expire', 'Upgrade', 'Continue', + /// 'Update' + public LatestStatus(string localized = default(string), string english = default(string)) + { + Localized = localized; + English = english; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the latest status keyword for the alert, in the + /// specified language. By default, returned in English (en-US). + /// + [JsonProperty(PropertyName = "localized")] + public string Localized { get; set; } + + /// + /// Gets or sets latest status keyword for the alert, in English + /// (en-US). Possible values include: 'New', 'Extend', 'Cancel', + /// 'Correct', 'Expire', 'Upgrade', 'Continue', 'Update' + /// + [JsonProperty(PropertyName = "english")] + public string English { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs new file mode 100644 index 000000000000..cc61a51134e2 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LatestStatusKeyword.cs @@ -0,0 +1,58 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + + /// + /// Defines values for LatestStatusKeyword. + /// + public static class LatestStatusKeyword + { + /// + /// "New" - the status of an alert upon initial issuance. + /// + public const string New = "New"; + /// + /// "Extend" - the alert has been extended in time, in area, or both + /// since its initial issuance. + /// + public const string Extend = "Extend"; + /// + /// "Cancel" - the alert has been canceled prior to its original + /// expiration time. + /// + public const string Cancel = "Cancel"; + /// + /// "Correct" - the alert has been modified to correct a previous + /// error. + /// + public const string Correct = "Correct"; + /// + /// "Expire" - the alert has expired and is no longer active. + /// + public const string Expire = "Expire"; + /// + /// "Upgrade" - the alert has been upgraded to a higher class or + /// category since its initial issuance. + /// + public const string Upgrade = "Upgrade"; + /// + /// "Continue" - the alert has been updated since its initial issuance, + /// but no changes were made to `alertDetails`, `startTime`, `endTime`, + /// or `class`. + /// + public const string Continue = "Continue"; + /// + /// "Update" - the alert has been updated since its initial issuance. + /// + public const string Update = "Update"; + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LocalSource.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LocalSource.cs new file mode 100644 index 000000000000..9ee5e671ef14 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/LocalSource.cs @@ -0,0 +1,79 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Local weather data provider information. + /// + public partial class LocalSource + { + /// + /// Initializes a new instance of the LocalSource class. + /// + public LocalSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LocalSource class. + /// + /// Numeric identifier, unique to the local data + /// provider. + /// Name of the local data provider. Name is + /// displayed in the language specified by language code in URL, if + /// available. Otherwise, Name is displayed in English or the language + /// in which the name was provided. + /// Weather code provided by the local data + /// provider. This weather code allows the forecast to be matched to + /// icons provided by the local data provider instead of Azure Maps + /// icons. + public LocalSource(int? id = default(int?), string name = default(string), string weatherCode = default(string)) + { + Id = id; + Name = name; + WeatherCode = weatherCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets numeric identifier, unique to the local data provider. + /// + [JsonProperty(PropertyName = "id")] + public int? Id { get; set; } + + /// + /// Gets or sets name of the local data provider. Name is displayed in + /// the language specified by language code in URL, if available. + /// Otherwise, Name is displayed in English or the language in which + /// the name was provided. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets weather code provided by the local data provider. This + /// weather code allows the forecast to be matched to icons provided by + /// the local data provider instead of Azure Maps icons. + /// + [JsonProperty(PropertyName = "weatherCode")] + public string WeatherCode { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastResponse.cs new file mode 100644 index 000000000000..d29314c479ae --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastResponse.cs @@ -0,0 +1,69 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class MinuteForecastResponse + { + /// + /// Initializes a new instance of the MinuteForecastResponse class. + /// + public MinuteForecastResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MinuteForecastResponse class. + /// + /// Summary information for each + /// interval in the forecast. The Summaries breaks down each potential + /// interval where precipitation starts and stops. + /// Forecast data for each interval in the + /// forecast. + public MinuteForecastResponse(MinuteForecastSummary summary = default(MinuteForecastSummary), IList intervalSummaries = default(IList), IList intervals = default(IList)) + { + Summary = summary; + IntervalSummaries = intervalSummaries; + Intervals = intervals; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "summary")] + public MinuteForecastSummary Summary { get; private set; } + + /// + /// Gets summary information for each interval in the forecast. The + /// Summaries breaks down each potential interval where precipitation + /// starts and stops. + /// + [JsonProperty(PropertyName = "intervalSummaries")] + public IList IntervalSummaries { get; private set; } + + /// + /// Gets forecast data for each interval in the forecast. + /// + [JsonProperty(PropertyName = "intervals")] + public IList Intervals { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastSummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastSummary.cs new file mode 100644 index 000000000000..dbd579e26e50 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/MinuteForecastSummary.cs @@ -0,0 +1,89 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Phrase summaries for the entire forecast period. + /// + public partial class MinuteForecastSummary + { + /// + /// Initializes a new instance of the MinuteForecastSummary class. + /// + public MinuteForecastSummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MinuteForecastSummary class. + /// + /// Summary phrase for the next 60 minutes. + /// Phrase length is approximately 60 characters. + /// Short summary phrase for the next + /// 120 minutes. Phrase length is approximately 25 characters. + /// Summary phrase for the next 120 + /// minutes. Phrase length is approximately 60 characters. + /// Long summary phrase for the next 120 + /// minutes. Phrase length is 60+ characters. + public MinuteForecastSummary(string briefPhrase60 = default(string), string shortDescription = default(string), string briefDescription = default(string), string longPhrase = default(string), int? iconCode = default(int?)) + { + BriefPhrase60 = briefPhrase60; + ShortDescription = shortDescription; + BriefDescription = briefDescription; + LongPhrase = longPhrase; + IconCode = iconCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets summary phrase for the next 60 minutes. Phrase length + /// is approximately 60 characters. + /// + [JsonProperty(PropertyName = "briefPhrase60")] + public string BriefPhrase60 { get; set; } + + /// + /// Gets or sets short summary phrase for the next 120 minutes. Phrase + /// length is approximately 25 characters. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + /// + /// Gets or sets summary phrase for the next 120 minutes. Phrase length + /// is approximately 60 characters. + /// + [JsonProperty(PropertyName = "briefPhrase")] + public string BriefDescription { get; set; } + + /// + /// Gets or sets long summary phrase for the next 120 minutes. Phrase + /// length is 60+ characters. + /// + [JsonProperty(PropertyName = "longPhrase")] + public string LongPhrase { get; set; } + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PastHoursTemperature.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PastHoursTemperature.cs new file mode 100644 index 000000000000..edc9996f5068 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PastHoursTemperature.cs @@ -0,0 +1,59 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Summary of temperature fluctuations over the number of past hours. + /// + public partial class PastHoursTemperature + { + /// + /// Initializes a new instance of the PastHoursTemperature class. + /// + public PastHoursTemperature() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PastHoursTemperature class. + /// + /// minimum + /// maximum + public PastHoursTemperature(WeatherUnit minimum = default(WeatherUnit), WeatherUnit maximum = default(WeatherUnit)) + { + Minimum = minimum; + Maximum = maximum; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets minimum + /// + [JsonProperty(PropertyName = "minimum")] + public WeatherUnit Minimum { get; set; } + + /// + /// Gets or sets maximum + /// + [JsonProperty(PropertyName = "maximum")] + public WeatherUnit Maximum { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationSummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationSummary.cs new file mode 100644 index 000000000000..3daf63f3a5bf --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationSummary.cs @@ -0,0 +1,112 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class PrecipitationSummary + { + /// + /// Initializes a new instance of the PrecipitationSummary class. + /// + public PrecipitationSummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrecipitationSummary class. + /// + /// The amount of precipitation (liquid + /// equivalent) that has fallen in the past hour. + /// The amount of precipitation (liquid + /// equivalent) that has fallen in the past three hours. + /// The amount of precipitation (liquid + /// equivalent) that has fallen in the past six hours. Contains Metric + /// and Imperial Values. + /// The amount of precipitation (liquid + /// equivalent) that has fallen in the past nine hours. + /// The amount of precipitation (liquid + /// equivalent) that has fallen in the past 12 hours. + /// The amount of precipitation (liquid + /// equivalent) that has fallen in the past 18 hours. + /// The amount of precipitation + /// (liquid equivalent) that has fallen in the past 24 hours. + public PrecipitationSummary(WeatherUnit pastHour = default(WeatherUnit), WeatherUnit pastThreeHours = default(WeatherUnit), WeatherUnit pastSixHours = default(WeatherUnit), WeatherUnit pastNineHours = default(WeatherUnit), WeatherUnit pastTwelveHours = default(WeatherUnit), WeatherUnit pastEighteenHours = default(WeatherUnit), WeatherUnit pastTwentyFourHours = default(WeatherUnit)) + { + PastHour = pastHour; + PastThreeHours = pastThreeHours; + PastSixHours = pastSixHours; + PastNineHours = pastNineHours; + PastTwelveHours = pastTwelveHours; + PastEighteenHours = pastEighteenHours; + PastTwentyFourHours = pastTwentyFourHours; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past hour. + /// + [JsonProperty(PropertyName = "pastHour")] + public WeatherUnit PastHour { get; set; } + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past three hours. + /// + [JsonProperty(PropertyName = "pastThreeHours")] + public WeatherUnit PastThreeHours { get; set; } + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past six hours. Contains Metric and Imperial + /// Values. + /// + [JsonProperty(PropertyName = "pastSixHours")] + public WeatherUnit PastSixHours { get; set; } + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past nine hours. + /// + [JsonProperty(PropertyName = "pastNineHours")] + public WeatherUnit PastNineHours { get; set; } + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past 12 hours. + /// + [JsonProperty(PropertyName = "pastTwelveHours")] + public WeatherUnit PastTwelveHours { get; set; } + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past 18 hours. + /// + [JsonProperty(PropertyName = "pastEighteenHours")] + public WeatherUnit PastEighteenHours { get; set; } + + /// + /// Gets or sets the amount of precipitation (liquid equivalent) that + /// has fallen in the past 24 hours. + /// + [JsonProperty(PropertyName = "pastTwentyFourHours")] + public WeatherUnit PastTwentyFourHours { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs new file mode 100644 index 000000000000..f396c4e23b29 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PrecipitationType.cs @@ -0,0 +1,36 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + + /// + /// Defines values for PrecipitationType. + /// + public static class PrecipitationType + { + /// + /// Rain + /// + public const string Rain = "Rain"; + /// + /// Snow + /// + public const string Snow = "Snow"; + /// + /// Ice + /// + public const string Ice = "Ice"; + /// + /// Mix + /// + public const string Mix = "Mix"; + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PressureTendency.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PressureTendency.cs new file mode 100644 index 000000000000..f3e8dd283530 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/PressureTendency.cs @@ -0,0 +1,60 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class PressureTendency + { + /// + /// Initializes a new instance of the PressureTendency class. + /// + public PressureTendency() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PressureTendency class. + /// + /// Description of the pressure tendency in + /// specified language + /// Pressure tendency code regardless of language. + /// One of F=Falling, S=Steady, R=Rising. + public PressureTendency(string description = default(string), string code = default(string)) + { + Description = description; + Code = code; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the pressure tendency in specified + /// language + /// + [JsonProperty(PropertyName = "localizedDescription")] + public string Description { get; set; } + + /// + /// Gets or sets pressure tendency code regardless of language. One of + /// F=Falling, S=Steady, R=Rising. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecast.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecast.cs new file mode 100644 index 000000000000..23f121d1deb5 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecast.cs @@ -0,0 +1,259 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class QuarterDayForecast + { + /// + /// Initializes a new instance of the QuarterDayForecast class. + /// + public QuarterDayForecast() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuarterDayForecast class. + /// + /// Date of the forecast as example, + /// 2019-10-27T00:00:00 + /// Date and time of the beginning of the + /// forecast quarter displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// Quarter of the day. + /// Phrase description of the icon. Displayed + /// in specified language. For example, 'Sunny'. + /// Short summary phrase summary for + /// quarter. + /// Temperature values for the + /// quarter. + /// RealFeel™ Temperature values for + /// the quarter. + /// The dewpoint temperature in specified unit. + /// The dewpoint temperature is the temperature that the air must be + /// cooled to in order to reach saturation. + /// Relative humidity is the amount of + /// water vapor present in air expressed as a percentage of the amount + /// needed for saturation at the same temperature. + /// Wind details being returned including speed and + /// direction. + /// Wind gust. Wind gust is a sudden, brief + /// increase in speed of the wind. + /// Visibility in specified unit. A measure of + /// the distance at which an object or light can be clearly + /// discerned. + /// Percent representing cloud cover. + /// Indicates the presence or absence of + /// precipitation. True indicates the presence of precipitation, false + /// indicates the absence of precipitation. + /// Possible values include: 'Rain', + /// 'Snow', 'Ice', 'Mix' + /// Description of the + /// intensity. + /// Percent representing the + /// probability of precipitation. For example, '20'. + /// Percent representing the + /// probability of a thunderstorm. For example, '10'. + /// Total liquid equivalent of precipitation + /// during the forecast period. + /// Rain + /// Snow + /// Ice + public QuarterDayForecast(System.DateTime? dateTime = default(System.DateTime?), System.DateTime? effectiveDate = default(System.DateTime?), int? quarter = default(int?), int? iconCode = default(int?), string iconPhrase = default(string), string phrase = default(string), WeatherUnitRange temperature = default(WeatherUnitRange), WeatherUnitRange realFeelTemperature = default(WeatherUnitRange), WeatherUnit dewPoint = default(WeatherUnit), int? relativeHumidity = default(int?), WindDetails wind = default(WindDetails), WindDetails windGust = default(WindDetails), WeatherUnit visibility = default(WeatherUnit), int? cloudCover = default(int?), bool? hasPrecipitation = default(bool?), string precipitationType = default(string), string precipitationIntensity = default(string), int? precipitationProbability = default(int?), int? thunderstormProbability = default(int?), WeatherUnit totalLiquid = default(WeatherUnit), WeatherUnit rain = default(WeatherUnit), WeatherUnit snow = default(WeatherUnit), WeatherUnit ice = default(WeatherUnit)) + { + DateTime = dateTime; + EffectiveDate = effectiveDate; + Quarter = quarter; + IconCode = iconCode; + IconPhrase = iconPhrase; + Phrase = phrase; + Temperature = temperature; + RealFeelTemperature = realFeelTemperature; + DewPoint = dewPoint; + RelativeHumidity = relativeHumidity; + Wind = wind; + WindGust = windGust; + Visibility = visibility; + CloudCover = cloudCover; + HasPrecipitation = hasPrecipitation; + PrecipitationType = precipitationType; + PrecipitationIntensity = precipitationIntensity; + PrecipitationProbability = precipitationProbability; + ThunderstormProbability = thunderstormProbability; + TotalLiquid = totalLiquid; + Rain = rain; + Snow = snow; + Ice = ice; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets date of the forecast as example, 2019-10-27T00:00:00 + /// + [JsonProperty(PropertyName = "date")] + public System.DateTime? DateTime { get; set; } + + /// + /// Gets or sets date and time of the beginning of the forecast quarter + /// displayed in ISO 8601 format, for example, + /// 2019-10-27T19:39:57-08:00. + /// + [JsonProperty(PropertyName = "effectiveDate")] + public System.DateTime? EffectiveDate { get; set; } + + /// + /// Gets or sets quarter of the day. + /// + [JsonProperty(PropertyName = "quarter")] + public int? Quarter { get; set; } + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// Gets or sets phrase description of the icon. Displayed in specified + /// language. For example, 'Sunny'. + /// + [JsonProperty(PropertyName = "iconPhrase")] + public string IconPhrase { get; set; } + + /// + /// Gets or sets short summary phrase summary for quarter. + /// + [JsonProperty(PropertyName = "phrase")] + public string Phrase { get; set; } + + /// + /// Gets or sets temperature values for the quarter. + /// + [JsonProperty(PropertyName = "temperature")] + public WeatherUnitRange Temperature { get; set; } + + /// + /// Gets or sets realFeel™ Temperature values for the quarter. + /// + [JsonProperty(PropertyName = "realFeelTemperature")] + public WeatherUnitRange RealFeelTemperature { get; set; } + + /// + /// Gets or sets the dewpoint temperature in specified unit. The + /// dewpoint temperature is the temperature that the air must be cooled + /// to in order to reach saturation. + /// + [JsonProperty(PropertyName = "dewPoint")] + public WeatherUnit DewPoint { get; set; } + + /// + /// Gets or sets relative humidity is the amount of water vapor present + /// in air expressed as a percentage of the amount needed for + /// saturation at the same temperature. + /// + [JsonProperty(PropertyName = "relativeHumidity")] + public int? RelativeHumidity { get; set; } + + /// + /// Gets or sets wind details being returned including speed and + /// direction. + /// + [JsonProperty(PropertyName = "wind")] + public WindDetails Wind { get; set; } + + /// + /// Gets or sets wind gust. Wind gust is a sudden, brief increase in + /// speed of the wind. + /// + [JsonProperty(PropertyName = "windGust")] + public WindDetails WindGust { get; set; } + + /// + /// Gets or sets visibility in specified unit. A measure of the + /// distance at which an object or light can be clearly discerned. + /// + [JsonProperty(PropertyName = "visibility")] + public WeatherUnit Visibility { get; set; } + + /// + /// Gets or sets percent representing cloud cover. + /// + [JsonProperty(PropertyName = "cloudCover")] + public int? CloudCover { get; set; } + + /// + /// Gets or sets indicates the presence or absence of precipitation. + /// True indicates the presence of precipitation, false indicates the + /// absence of precipitation. + /// + [JsonProperty(PropertyName = "hasPrecipitation")] + public bool? HasPrecipitation { get; set; } + + /// + /// Gets or sets possible values include: 'Rain', 'Snow', 'Ice', 'Mix' + /// + [JsonProperty(PropertyName = "precipitationType")] + public string PrecipitationType { get; set; } + + /// + /// Gets or sets description of the intensity. + /// + [JsonProperty(PropertyName = "precipitationIntensity")] + public string PrecipitationIntensity { get; set; } + + /// + /// Gets or sets percent representing the probability of precipitation. + /// For example, '20'. + /// + [JsonProperty(PropertyName = "precipitationProbability")] + public int? PrecipitationProbability { get; set; } + + /// + /// Gets or sets percent representing the probability of a + /// thunderstorm. For example, '10'. + /// + [JsonProperty(PropertyName = "thunderstormProbability")] + public int? ThunderstormProbability { get; set; } + + /// + /// Gets or sets total liquid equivalent of precipitation during the + /// forecast period. + /// + [JsonProperty(PropertyName = "totalLiquid")] + public WeatherUnit TotalLiquid { get; set; } + + /// + /// Gets or sets rain + /// + [JsonProperty(PropertyName = "rain")] + public WeatherUnit Rain { get; set; } + + /// + /// Gets or sets snow + /// + [JsonProperty(PropertyName = "snow")] + public WeatherUnit Snow { get; set; } + + /// + /// Gets or sets ice + /// + [JsonProperty(PropertyName = "ice")] + public WeatherUnit Ice { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecastResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecastResponse.cs new file mode 100644 index 000000000000..e7ba30cf8111 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/QuarterDayForecastResponse.cs @@ -0,0 +1,51 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class QuarterDayForecastResponse + { + /// + /// Initializes a new instance of the QuarterDayForecastResponse class. + /// + public QuarterDayForecastResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuarterDayForecastResponse class. + /// + /// Forecast data for each quarter in the + /// response. + public QuarterDayForecastResponse(IList forecasts = default(IList)) + { + Forecasts = forecasts; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets forecast data for each quarter in the response. + /// + [JsonProperty(PropertyName = "forecasts")] + public IList Forecasts { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlert.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlert.cs new file mode 100644 index 000000000000..99f32c6a6f7a --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlert.cs @@ -0,0 +1,168 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information about a severe weather alert. + /// + public partial class SevereWeatherAlert + { + /// + /// Initializes a new instance of the SevereWeatherAlert class. + /// + public SevereWeatherAlert() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SevereWeatherAlert class. + /// + /// 2-character ISO 3166-1 Alpha-2 country + /// code, for example, "US". + /// A unique numerical identifier for a weather + /// alert. + /// Description of the alert. + /// Category of the alert. + /// Number signifying the importance or ranking + /// order of the given alert within the country/region it has + /// originated. A lower number signifies a higher priority. For + /// example, 1 is the highest priority. The number varies by + /// country/region and can change over time as each country/region + /// evolves their alert systems. + /// Classification of the alert. This + /// field is not available for all countries and therefore not always + /// returned. + /// Severity level of the alert. This field is not + /// available for all countries and therefore not always + /// returned. + /// The provider of the alert information. By + /// default the source is returned in English (en-US). The alerts are + /// from official Government Meteorological Agencies and leading global + /// weather alert providers. + /// A numerical identifier associated with the + /// source provider name of the alert data. + /// A disclaimer regarding the source of the + /// alert information. This field is not always available. For example, + /// disclaimer may include details about the delays or potential issues + /// related to the alarm. + /// Information about the alert specific to + /// the affected area(s). + public SevereWeatherAlert(string countryCode = default(string), int? alertId = default(int?), SevereWeatherAlertDescription description = default(SevereWeatherAlertDescription), string category = default(string), int? priority = default(int?), string classification = default(string), string level = default(string), string source = default(string), int? sourceId = default(int?), string disclaimer = default(string), IList alertDetails = default(IList)) + { + CountryCode = countryCode; + AlertId = alertId; + Description = description; + Category = category; + Priority = priority; + Classification = classification; + Level = level; + Source = source; + SourceId = sourceId; + Disclaimer = disclaimer; + AlertDetails = alertDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets 2-character ISO 3166-1 Alpha-2 country code, for + /// example, "US". + /// + [JsonProperty(PropertyName = "countryCode")] + public string CountryCode { get; set; } + + /// + /// Gets or sets a unique numerical identifier for a weather alert. + /// + [JsonProperty(PropertyName = "alertId")] + public int? AlertId { get; set; } + + /// + /// Gets or sets description of the alert. + /// + [JsonProperty(PropertyName = "description")] + public SevereWeatherAlertDescription Description { get; set; } + + /// + /// Gets or sets category of the alert. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + /// + /// Gets or sets number signifying the importance or ranking order of + /// the given alert within the country/region it has originated. A + /// lower number signifies a higher priority. For example, 1 is the + /// highest priority. The number varies by country/region and can + /// change over time as each country/region evolves their alert + /// systems. + /// + [JsonProperty(PropertyName = "priority")] + public int? Priority { get; set; } + + /// + /// Gets or sets classification of the alert. This field is not + /// available for all countries and therefore not always returned. + /// + [JsonProperty(PropertyName = "class")] + public string Classification { get; set; } + + /// + /// Gets or sets severity level of the alert. This field is not + /// available for all countries and therefore not always returned. + /// + [JsonProperty(PropertyName = "level")] + public string Level { get; set; } + + /// + /// Gets or sets the provider of the alert information. By default the + /// source is returned in English (en-US). The alerts are from official + /// Government Meteorological Agencies and leading global weather alert + /// providers. + /// + [JsonProperty(PropertyName = "source")] + public string Source { get; set; } + + /// + /// Gets or sets a numerical identifier associated with the source + /// provider name of the alert data. + /// + [JsonProperty(PropertyName = "sourceId")] + public int? SourceId { get; set; } + + /// + /// Gets or sets a disclaimer regarding the source of the alert + /// information. This field is not always available. For example, + /// disclaimer may include details about the delays or potential issues + /// related to the alarm. + /// + [JsonProperty(PropertyName = "disclaimer")] + public string Disclaimer { get; set; } + + /// + /// Gets or sets information about the alert specific to the affected + /// area(s). + /// + [JsonProperty(PropertyName = "alertAreas")] + public IList AlertDetails { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertDescription.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertDescription.cs new file mode 100644 index 000000000000..4d4e7f0a4b22 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertDescription.cs @@ -0,0 +1,66 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Description of a severe weather alert. + /// + public partial class SevereWeatherAlertDescription + { + /// + /// Initializes a new instance of the SevereWeatherAlertDescription + /// class. + /// + public SevereWeatherAlertDescription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SevereWeatherAlertDescription + /// class. + /// + /// Description of the alert in the specified + /// language. By default English (en-US) is returned if the language + /// parameter is not specified in the request. + /// Description of the alert in English + /// (en-US). + public SevereWeatherAlertDescription(string description = default(string), string status = default(string)) + { + Description = description; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets description of the alert in the specified language. By + /// default English (en-US) is returned if the language parameter is + /// not specified in the request. + /// + [JsonProperty(PropertyName = "localized")] + public string Description { get; set; } + + /// + /// Gets or sets description of the alert in English (en-US). + /// + [JsonProperty(PropertyName = "english")] + public string Status { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertsResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertsResponse.cs new file mode 100644 index 000000000000..ed3ecac7ede7 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SevereWeatherAlertsResponse.cs @@ -0,0 +1,57 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This object is returned from a successful Get Severe Weather Alerts + /// call. + /// + public partial class SevereWeatherAlertsResponse + { + /// + /// Initializes a new instance of the SevereWeatherAlertsResponse + /// class. + /// + public SevereWeatherAlertsResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SevereWeatherAlertsResponse + /// class. + /// + /// A list of all severe weather alerts for the + /// queried location. + public SevereWeatherAlertsResponse(IList results = default(IList)) + { + Results = results; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets a list of all severe weather alerts for the queried location. + /// + [JsonProperty(PropertyName = "results")] + public IList Results { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SunGlare.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SunGlare.cs new file mode 100644 index 000000000000..1b73ddb94daa --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/SunGlare.cs @@ -0,0 +1,73 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A rating that indicates how blinding the sun is for the driver. + /// + public partial class SunGlare + { + /// + /// Initializes a new instance of the SunGlare class. + /// + public SunGlare() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SunGlare class. + /// + /// If the vehicle heading value + /// is not provided for a waypoint, then the service will calculate a + /// heading based upon the location of neighboring waypoints if + /// provided. + /// An index from 0 to 100 indicating sun + /// glare intensity for a driver. A value of 50 and above can be + /// considered a hazard for some drivers and a value of 100 signifies + /// the driver is driving straight into the sun and atmospheric + /// conditions are clear allowing for the full intensity of the sun to + /// blind the driver. + public SunGlare(int? calculatedVehicleHeading = default(int?), int? glareIndex = default(int?)) + { + CalculatedVehicleHeading = calculatedVehicleHeading; + GlareIndex = glareIndex; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if the vehicle heading value is not provided for a + /// waypoint, then the service will calculate a heading based upon the + /// location of neighboring waypoints if provided. + /// + [JsonProperty(PropertyName = "calculatedVehicleHeading")] + public int? CalculatedVehicleHeading { get; set; } + + /// + /// Gets or sets an index from 0 to 100 indicating sun glare intensity + /// for a driver. A value of 50 and above can be considered a hazard + /// for some drivers and a value of 100 signifies the driver is driving + /// straight into the sun and atmospheric conditions are clear allowing + /// for the full intensity of the sun to blind the driver. + /// + [JsonProperty(PropertyName = "glareIndex")] + public int? GlareIndex { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/TemperatureSummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/TemperatureSummary.cs new file mode 100644 index 000000000000..293f4c3f8196 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/TemperatureSummary.cs @@ -0,0 +1,70 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class TemperatureSummary + { + /// + /// Initializes a new instance of the TemperatureSummary class. + /// + public TemperatureSummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TemperatureSummary class. + /// + /// Summary of temperature fluctuations over + /// the past 6 hours. + /// Summary of temperature fluctuations + /// over the past 12 hours. + /// Summary of temperature + /// fluctuations over the past 24 hours. + public TemperatureSummary(PastHoursTemperature pastSixHours = default(PastHoursTemperature), PastHoursTemperature pastTwelveHours = default(PastHoursTemperature), PastHoursTemperature pastTwentyFourHours = default(PastHoursTemperature)) + { + PastSixHours = pastSixHours; + PastTwelveHours = pastTwelveHours; + PastTwentyFourHours = pastTwentyFourHours; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets summary of temperature fluctuations over the past 6 + /// hours. + /// + [JsonProperty(PropertyName = "pastSixHours")] + public PastHoursTemperature PastSixHours { get; set; } + + /// + /// Gets or sets summary of temperature fluctuations over the past 12 + /// hours. + /// + [JsonProperty(PropertyName = "pastTwelveHours")] + public PastHoursTemperature PastTwelveHours { get; set; } + + /// + /// Gets or sets summary of temperature fluctuations over the past 24 + /// hours. + /// + [JsonProperty(PropertyName = "pastTwentyFourHours")] + public PastHoursTemperature PastTwentyFourHours { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRoutePrecipitation.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRoutePrecipitation.cs new file mode 100644 index 000000000000..c95d8cec55b4 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRoutePrecipitation.cs @@ -0,0 +1,66 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Precipitation forecast of the weather along the route. + /// + public partial class WeatherAlongRoutePrecipitation + { + /// + /// Initializes a new instance of the WeatherAlongRoutePrecipitation + /// class. + /// + public WeatherAlongRoutePrecipitation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherAlongRoutePrecipitation + /// class. + /// + /// The forecasted precipitation intensity in dBZ + /// (decibels relative to Z) from 0.0 to 100.0. + /// Precipitation type. If precipitation should + /// occur, the type that it will be: "RAIN," "HAIL," "SNOW," "ICE," or + /// "MIX." + public WeatherAlongRoutePrecipitation(double? dbz = default(double?), string type = default(string)) + { + Dbz = dbz; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the forecasted precipitation intensity in dBZ + /// (decibels relative to Z) from 0.0 to 100.0. + /// + [JsonProperty(PropertyName = "dbz")] + public double? Dbz { get; set; } + + /// + /// Gets or sets precipitation type. If precipitation should occur, the + /// type that it will be: "RAIN," "HAIL," "SNOW," "ICE," or "MIX." + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteResponse.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteResponse.cs new file mode 100644 index 000000000000..57d0fb60c145 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteResponse.cs @@ -0,0 +1,61 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This object is returned from a successful Weather Along Route. + /// + public partial class WeatherAlongRouteResponse + { + /// + /// Initializes a new instance of the WeatherAlongRouteResponse class. + /// + public WeatherAlongRouteResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherAlongRouteResponse class. + /// + /// Data for each waypoint returned in the same + /// order as specified in the request. + public WeatherAlongRouteResponse(WeatherAlongRouteSummary summary = default(WeatherAlongRouteSummary), IList waypoints = default(IList)) + { + Summary = summary; + Waypoints = waypoints; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "summary")] + public WeatherAlongRouteSummary Summary { get; private set; } + + /// + /// Gets data for each waypoint returned in the same order as specified + /// in the request. + /// + [JsonProperty(PropertyName = "waypoints")] + public IList Waypoints { get; private set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteSummary.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteSummary.cs new file mode 100644 index 000000000000..83b6731a5c6e --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherAlongRouteSummary.cs @@ -0,0 +1,55 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Short summary of the weather along the route. + /// + public partial class WeatherAlongRouteSummary + { + /// + /// Initializes a new instance of the WeatherAlongRouteSummary class. + /// + public WeatherAlongRouteSummary() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherAlongRouteSummary class. + /// + public WeatherAlongRouteSummary(int? iconCode = default(int?), WeatherHazards hazards = default(WeatherHazards)) + { + IconCode = iconCode; + Hazards = hazards; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// + [JsonProperty(PropertyName = "hazards")] + public WeatherHazards Hazards { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs new file mode 100644 index 000000000000..2896d81476e0 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherDataUnit.cs @@ -0,0 +1,30 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + + /// + /// Defines values for WeatherDataUnit. + /// + public static class WeatherDataUnit + { + /// + /// Return data in metric units. Some example units of metric system + /// are Celsius and kilometer. + /// + public const string Metric = "metric"; + /// + /// Return data in imperial units. Some example units of imperial + /// system are Fahrenheit and mile. + /// + public const string Imperial = "imperial"; + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherHazards.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherHazards.cs new file mode 100644 index 000000000000..47c9b3b58533 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherHazards.cs @@ -0,0 +1,60 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Description of the weather hazard affecting the trip. + /// + public partial class WeatherHazards + { + /// + /// Initializes a new instance of the WeatherHazards class. + /// + public WeatherHazards() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherHazards class. + /// + /// Details of the weather hazards affecting the + /// trip. + public WeatherHazards(int? maxHazardIndex = default(int?), IList details = default(IList)) + { + MaxHazardIndex = maxHazardIndex; + Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "maxHazardIndex")] + public int? MaxHazardIndex { get; set; } + + /// + /// Gets or sets details of the weather hazards affecting the trip. + /// + [JsonProperty(PropertyName = "hazardDetails")] + public IList Details { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherNotification.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherNotification.cs new file mode 100644 index 000000000000..50b650076c92 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherNotification.cs @@ -0,0 +1,88 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class WeatherNotification + { + /// + /// Initializes a new instance of the WeatherNotification class. + /// + public WeatherNotification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherNotification class. + /// + /// A type of notification generated to warn drivers + /// of the onset of a hazard, or increase in intensity of a + /// hazard. + /// A unique identifier (non-displayable) for + /// each type of hazard: LightRain, ModerateRain, HeavyRain, LightMix, + /// ModerateMix, HeavyMix, LightSnow, ModerateSnow, HeavySnow, + /// LightIce, ModerateIce, HeavyIce, Hail, LargeHail, SunGlare, + /// SunGlareHigh, Lightning, SevereLightning, WindModerate, WindHigh, + /// WindExtreme, FloodWarning, FlashFloodWarning, TornadoWarning, + /// TsunamiWarning, SevereThunderstormWarning. + /// A displayable short phrase + /// describing the forecasted conditions and precipitation + /// intensity/type. + public WeatherNotification(string type = default(string), int? hazardIndex = default(int?), string hazardCode = default(string), string shortDescription = default(string)) + { + Type = type; + HazardIndex = hazardIndex; + HazardCode = hazardCode; + ShortDescription = shortDescription; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a type of notification generated to warn drivers of + /// the onset of a hazard, or increase in intensity of a hazard. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// + [JsonProperty(PropertyName = "hazardIndex")] + public int? HazardIndex { get; set; } + + /// + /// Gets or sets a unique identifier (non-displayable) for each type of + /// hazard: LightRain, ModerateRain, HeavyRain, LightMix, ModerateMix, + /// HeavyMix, LightSnow, ModerateSnow, HeavySnow, LightIce, + /// ModerateIce, HeavyIce, Hail, LargeHail, SunGlare, SunGlareHigh, + /// Lightning, SevereLightning, WindModerate, WindHigh, WindExtreme, + /// FloodWarning, FlashFloodWarning, TornadoWarning, TsunamiWarning, + /// SevereThunderstormWarning. + /// + [JsonProperty(PropertyName = "hazardCode")] + public string HazardCode { get; set; } + + /// + /// Gets or sets a displayable short phrase describing the forecasted + /// conditions and precipitation intensity/type. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnit.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnit.cs new file mode 100644 index 000000000000..d920e895807b --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnit.cs @@ -0,0 +1,66 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Specific value of a given unit related to weather. + /// + public partial class WeatherUnit + { + /// + /// Initializes a new instance of the WeatherUnit class. + /// + public WeatherUnit() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherUnit class. + /// + /// Rounded value. + /// Type of unit for the returned + /// value. + public WeatherUnit(double? value = default(double?), string unitLabel = default(string), int? unitType = default(int?)) + { + Value = value; + UnitLabel = unitLabel; + UnitType = unitType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rounded value. + /// + [JsonProperty(PropertyName = "value")] + public double? Value { get; set; } + + /// + /// Gets or sets type of unit for the returned value. + /// + [JsonProperty(PropertyName = "unit")] + public string UnitLabel { get; set; } + + /// + /// + [JsonProperty(PropertyName = "unitType")] + public int? UnitType { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnitRange.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnitRange.cs new file mode 100644 index 000000000000..561cfd75fae3 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherUnitRange.cs @@ -0,0 +1,61 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Returned temperature values. + /// + public partial class WeatherUnitRange + { + /// + /// Initializes a new instance of the WeatherUnitRange class. + /// + public WeatherUnitRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherUnitRange class. + /// + /// Minimum temperature for the time + /// period. + /// Maximum temperature for the time + /// period + public WeatherUnitRange(WeatherUnit minimum = default(WeatherUnit), WeatherUnit maximum = default(WeatherUnit)) + { + Minimum = minimum; + Maximum = maximum; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets minimum temperature for the time period. + /// + [JsonProperty(PropertyName = "minimum")] + public WeatherUnit Minimum { get; set; } + + /// + /// Gets or sets maximum temperature for the time period + /// + [JsonProperty(PropertyName = "maximum")] + public WeatherUnit Maximum { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherWaypoint.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherWaypoint.cs new file mode 100644 index 000000000000..ba2219ed9da6 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WeatherWaypoint.cs @@ -0,0 +1,139 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class WeatherWaypoint + { + /// + /// Initializes a new instance of the WeatherWaypoint class. + /// + public WeatherWaypoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WeatherWaypoint class. + /// + /// A displayable short phrase + /// describing the forecasted conditions and precipitation + /// intensity/type. + /// Indicates the time of the day. True + /// indicates 'day',', false indicates 'night. + /// Percent representing cloud cover. + /// Estimation of thunderstorm intensity + /// on an open scale. A value of 0 means there is no thunderstorm; + /// values of 1 and higher mean there is a thunderstorm in increasing + /// intensity. + /// A rating that indicates how blinding the sun + /// is for the driver. + /// List of weather hazard + /// notifications. + public WeatherWaypoint(int? iconCode = default(int?), string shortDescription = default(string), bool? isDaytime = default(bool?), int? cloudCover = default(int?), WeatherUnit temperature = default(WeatherUnit), WindDetails wind = default(WindDetails), WindDetails windGust = default(WindDetails), WeatherAlongRoutePrecipitation precipitation = default(WeatherAlongRoutePrecipitation), int? lightningCount = default(int?), SunGlare sunGlare = default(SunGlare), WeatherHazards hazards = default(WeatherHazards), IList notifications = default(IList)) + { + IconCode = iconCode; + ShortDescription = shortDescription; + IsDaytime = isDaytime; + CloudCover = cloudCover; + Temperature = temperature; + Wind = wind; + WindGust = windGust; + Precipitation = precipitation; + LightningCount = lightningCount; + SunGlare = sunGlare; + Hazards = hazards; + Notifications = notifications; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "iconCode")] + public int? IconCode { get; set; } + + /// + /// Gets or sets a displayable short phrase describing the forecasted + /// conditions and precipitation intensity/type. + /// + [JsonProperty(PropertyName = "shortPhrase")] + public string ShortDescription { get; set; } + + /// + /// Gets or sets indicates the time of the day. True indicates 'day',', + /// false indicates 'night. + /// + [JsonProperty(PropertyName = "isDayTime")] + public bool? IsDaytime { get; set; } + + /// + /// Gets or sets percent representing cloud cover. + /// + [JsonProperty(PropertyName = "cloudCover")] + public int? CloudCover { get; set; } + + /// + /// + [JsonProperty(PropertyName = "temperature")] + public WeatherUnit Temperature { get; set; } + + /// + /// + [JsonProperty(PropertyName = "wind")] + public WindDetails Wind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "windGust")] + public WindDetails WindGust { get; set; } + + /// + /// + [JsonProperty(PropertyName = "precipitation")] + public WeatherAlongRoutePrecipitation Precipitation { get; set; } + + /// + /// Gets or sets estimation of thunderstorm intensity on an open scale. + /// A value of 0 means there is no thunderstorm; values of 1 and higher + /// mean there is a thunderstorm in increasing intensity. + /// + [JsonProperty(PropertyName = "lightningCount")] + public int? LightningCount { get; set; } + + /// + /// Gets or sets a rating that indicates how blinding the sun is for + /// the driver. + /// + [JsonProperty(PropertyName = "sunGlare")] + public SunGlare SunGlare { get; set; } + + /// + /// + [JsonProperty(PropertyName = "hazards")] + public WeatherHazards Hazards { get; set; } + + /// + /// Gets or sets list of weather hazard notifications. + /// + [JsonProperty(PropertyName = "notifications")] + public IList Notifications { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDetails.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDetails.cs new file mode 100644 index 000000000000..71720688a03b --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDetails.cs @@ -0,0 +1,59 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Wind details being returned including speed and direction. + /// + public partial class WindDetails + { + /// + /// Initializes a new instance of the WindDetails class. + /// + public WindDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindDetails class. + /// + /// Wind direction + /// Speed of the wind in specified unit. + public WindDetails(WindDirection direction = default(WindDirection), WindSpeed speed = default(WindSpeed)) + { + Direction = direction; + Speed = speed; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets wind direction + /// + [JsonProperty(PropertyName = "direction")] + public WindDirection Direction { get; set; } + + /// + /// Gets or sets speed of the wind in specified unit. + /// + [JsonProperty(PropertyName = "speed")] + public WindSpeed Speed { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDirection.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDirection.cs new file mode 100644 index 000000000000..ad40b086c337 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindDirection.cs @@ -0,0 +1,66 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Wind direction + /// + public partial class WindDirection + { + /// + /// Initializes a new instance of the WindDirection class. + /// + public WindDirection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindDirection class. + /// + /// Wind direction in Azimuth degrees, starting + /// at true North and continuing in clockwise direction. North is 0 + /// degrees, east is 90 degrees, south is 180 degrees, west is 270 + /// degrees. Possible values 0-359. + /// Direction abbreviation in the specified + /// language. + public WindDirection(int? degrees = default(int?), string description = default(string)) + { + Degrees = degrees; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets wind direction in Azimuth degrees, starting at true + /// North and continuing in clockwise direction. North is 0 degrees, + /// east is 90 degrees, south is 180 degrees, west is 270 degrees. + /// Possible values 0-359. + /// + [JsonProperty(PropertyName = "degrees")] + public int? Degrees { get; set; } + + /// + /// Gets or sets direction abbreviation in the specified language. + /// + [JsonProperty(PropertyName = "localizedDescription")] + public string Description { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindSpeed.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindSpeed.cs new file mode 100644 index 000000000000..2b400a660f42 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/Models/WindSpeed.cs @@ -0,0 +1,65 @@ +// +// 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. +// + +namespace Azure.Maps.Weather.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Speed of wind in specified unit. + /// + public partial class WindSpeed + { + /// + /// Initializes a new instance of the WindSpeed class. + /// + public WindSpeed() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindSpeed class. + /// + /// Rounded value of the speed. + /// Type of unit for the speed value. + public WindSpeed(double? value = default(double?), string unit = default(string), int? unitType = default(int?)) + { + Value = value; + Unit = unit; + UnitType = unitType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rounded value of the speed. + /// + [JsonProperty(PropertyName = "value")] + public double? Value { get; set; } + + /// + /// Gets or sets type of unit for the speed value. + /// + [JsonProperty(PropertyName = "unit")] + public string Unit { get; set; } + + /// + /// + [JsonProperty(PropertyName = "unitType")] + public int? UnitType { get; set; } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/SdkInfo_WeatherClient.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/SdkInfo_WeatherClient.cs new file mode 100644 index 000000000000..84939acc8e86 --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/SdkInfo_WeatherClient.cs @@ -0,0 +1,27 @@ + +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Azure.Maps.Weather +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_WeatherClient + { + get + { + return new Tuple[] + { + new Tuple("WeatherClient", "Weather", "1.0"), + }.AsEnumerable(); + } + } + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherClient.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherClient.cs new file mode 100644 index 000000000000..ad183cb4b4aa --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherClient.cs @@ -0,0 +1,335 @@ +// +// 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. +// + +namespace Azure.Maps.Weather +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + + public partial class WeatherClient : ServiceClient, IWeatherClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Version number of Azure Maps API. + /// + public string ApiVersion { get; set; } + + /// + /// Specifies which account is intended for usage in conjunction with the Azure + /// AD security model. It represents a unique ID for the Azure Maps account + /// and can be retrieved from the Azure Maps management plane Account API. To + /// use Azure AD security in Azure Maps see the following + /// [articles](https://aka.ms/amauthdetails) for guidance. + /// + public string ClientId { get; set; } + + /// + /// Subscription credentials which uniquely identify client subscription. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// Gets the IWeatherOperations. + /// + public virtual IWeatherOperations Weather { get; private set; } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling WeatherClient.Dispose(). False: will not dispose provided httpClient + protected WeatherClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected WeatherClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected WeatherClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected WeatherClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected WeatherClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public WeatherClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling WeatherClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public WeatherClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public WeatherClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public WeatherClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the WeatherClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public WeatherClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + Weather = new WeatherOperations(this); + BaseUri = new System.Uri("https://atlas.microsoft.com"); + ApiVersion = "1.0"; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + } + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperations.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperations.cs new file mode 100644 index 000000000000..d94bacdebe6b --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperations.cs @@ -0,0 +1,1958 @@ +// +// 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. +// + +namespace Azure.Maps.Weather +{ + using Microsoft.Rest; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// WeatherOperations operations. + /// + public partial class WeatherOperations : IServiceOperations, IWeatherOperations + { + /// + /// Initializes a new instance of the WeatherOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + public WeatherOperations(WeatherClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the WeatherClient + /// + public WeatherClient Client { get; private set; } + + /// + /// **Get Hourly Forecast** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Request detailed weather forecast by the hour for the next 1, 12, 24 (1 + /// day), 72 (3 days), 120 (5 days), and 240 hours (10 days) for the given the + /// given coordinate location. The API returns details such as temperature, + /// humidity, wind, precipitation, and ultraviolet (UV) index. + /// + /// In S0 you can request hourly forecast for the next 1, 12, 24 hours (1 day), + /// and 72 hours (3 days). In S1 you can also request hourly forecast for the + /// next 120 (5 days) and 240 hours (10 days). + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Time frame of the returned weather forecast. By default, the forecast data + /// for next hour will be returned. Available values are + /// * `1` - Return forecast data for the next hour. Default value. + /// * `12` - Return hourly forecast for next 12 hours. + /// * `24` - Return hourly forecast for next 24 hours. + /// * `72` - Return hourly forecast for next 72 hours (3 days). + /// * `120` - Return hourly forecast for next 120 hours (5 days). Only + /// available in S1 SKU. + /// * `240` - Return hourly forecast for next 240 hours (10 days). Only + /// available in S1 SKU. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetHourlyForecastWithHttpMessagesAsync(IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("unit", unit); + tracingParameters.Add("duration", duration); + tracingParameters.Add("language", language); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetHourlyForecast", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/forecast/hourly/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (unit != null) + { + _queryParameters.Add(string.Format("unit={0}", System.Uri.EscapeDataString(unit))); + } + if (duration != null) + { + _queryParameters.Add(string.Format("duration={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(duration, Client.SerializationSettings).Trim('"')))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Minute Forecast** + /// + /// + /// **Applies to**: S1 pricing tier. + /// + /// + /// Get Minute Forecast service returns minute-by-minute forecasts for a given + /// location for the next 120 minutes. Users can request weather forecasts in + /// the interval of 1, 5 and 15 minutes. The response will include details + /// such as the type of precipitation (including rain, snow, or a mixture of + /// both), start time, and precipitation intensity value (dBZ). + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies time interval in minutes for the returned weather forecast. + /// Supported values are + /// * `1` - Retrieve forecast for 1-minute intervals. Returned by default. + /// * `5` - Retrieve forecasts for 5-minute intervals. + /// * `15` - Retrieve forecasts for 15-minute intervals. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetMinuteForecastWithHttpMessagesAsync(IList coordinates, int? interval = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("interval", interval); + tracingParameters.Add("language", language); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetMinuteForecast", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/forecast/minute/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (interval != null) + { + _queryParameters.Add(string.Format("interval={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(interval, Client.SerializationSettings).Trim('"')))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Quarter-Day Forecast** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Service returns detailed weather forecast by quarter-day for the next 1, 5, + /// 10, or 15 days for a given location. Response data is presented by quarters + /// of the day - morning, afternoon, evening, and overnight. Details such as + /// temperature, humidity, wind, precipitation, and UV index are returned. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Specifies for how many days the quester-day forecast responses are + /// returned. Supported values are: + /// * `1` - Return forecast data for the next day. Returned by default. + /// * `5` - Return forecast data for the next 5 days. + /// * `10` - Return forecast data for next 10 days. + /// * `15` - Return forecast data for the next 15 days. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetQuarterDayForecastWithHttpMessagesAsync(IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("unit", unit); + tracingParameters.Add("duration", duration); + tracingParameters.Add("language", language); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetQuarterDayForecast", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/forecast/quarterDay/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (unit != null) + { + _queryParameters.Add(string.Format("unit={0}", System.Uri.EscapeDataString(unit))); + } + if (duration != null) + { + _queryParameters.Add(string.Format("duration={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(duration, Client.SerializationSettings).Trim('"')))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Current Conditions** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Get Current Conditions service returns detailed current weather conditions + /// such as precipitation, temperature and wind for a given coordinate + /// location. Also, observations from the past 6 or 24 hours for a particular + /// location can be retrieved. The basic information returned with the response + /// include details such as observation date and time, brief description of the + /// weather conditions, weather icon, precipitation indicator flags, and + /// temperature. Additional details such as RealFeel™ Temperature and UV index + /// are also returned. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Return full details for the current conditions. Available values are + /// * `true` - Returns full details. By default all details are returned. + /// * `false` - Returns a truncated version of the current condition data, + /// which includes observation date time, weather phrase, icon code, + /// precipitation indicator flag, and temperature. + /// + /// + /// Time frame of the returned weather conditions. By default, the most current + /// weather conditions will be returned. Default value is 0. Supported values + /// are: + /// * `0` - Return the most current weather conditions. + /// * `6` - Return weather conditions from past 6 hours. + /// * `24` - Return weather conditions from past 24 hours. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetCurrentConditionsWithHttpMessagesAsync(IList coordinates, string unit = default(string), string details = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("unit", unit); + tracingParameters.Add("details", details); + tracingParameters.Add("duration", duration); + tracingParameters.Add("language", language); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetCurrentConditions", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/currentConditions/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (unit != null) + { + _queryParameters.Add(string.Format("unit={0}", System.Uri.EscapeDataString(unit))); + } + if (details != null) + { + _queryParameters.Add(string.Format("details={0}", System.Uri.EscapeDataString(details))); + } + if (duration != null) + { + _queryParameters.Add(string.Format("duration={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(duration, Client.SerializationSettings).Trim('"')))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Daily Forecast** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// The service returns detailed weather forecast such as temperature and wind + /// by day for the next 1, 5, 10, 15, 25, or 45 days for a given coordinate + /// location. The response include details such as temperature, wind, + /// precipitation, air quality, and UV index. + /// + /// In S0 you can request daily forecast for the next 1, 5, 10, and 15 days. In + /// S1 you can also request daily forecast for the next 25 days, and 45 days. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Specifies for how many days the daily forecast responses are returned. + /// Available values are + /// * `1` - Return forecast data for the next day. Returned by default. + /// * `5` - Return forecast data for the next 5 days. + /// * `10` - Return forecast data for the next 10 days. + /// * `25` - Return forecast data for the next 25 days. Only available in S1 + /// SKU. + /// * `45` - Return forecast data for the next 45 days. Only available in S1 + /// SKU. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetDailyForecastWithHttpMessagesAsync(IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("unit", unit); + tracingParameters.Add("duration", duration); + tracingParameters.Add("language", language); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDailyForecast", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/forecast/daily/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (unit != null) + { + _queryParameters.Add(string.Format("unit={0}", System.Uri.EscapeDataString(unit))); + } + if (duration != null) + { + _queryParameters.Add(string.Format("duration={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(duration, Client.SerializationSettings).Trim('"')))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Weather along route** + /// + /// + /// **Applies to**: S1 pricing tier. + /// + /// Weather along a route API returns hyper local (one kilometer or less), + /// up-to-the-minute weather nowcasts, weather hazard assessments, and + /// notifications along a route described as a sequence of waypoints. + /// This includes a list of weather hazards affecting the waypoint or route, + /// and the aggregated hazard index for each waypoint might be used to paint + /// each portion of a route according to how safe it is for the driver. When + /// submitting the waypoints, it is recommended to stay within, or close to, + /// the distance that can be traveled within 120-mins or shortly after. Data is + /// updated every five minutes. + /// + /// The service supplements Azure Maps [Route + /// Service](https://docs.microsoft.com/rest/api/maps/route) that allows you to + /// first request a route between an origin and a destination and use that as + /// an input for Weather Along Route endpoint. + /// + /// In addition, the service supports scenarios to generate weather + /// notifications for waypoints that experience an increase in intensity of a + /// weather hazard. For example, if the vehicle is expected to begin + /// experiencing heavy rain as it reaches a waypoint, a weather notification + /// for heavy rain will be generated for that waypoint allowing the end product + /// to display a heavy rain notification before the driver reaches that + /// waypoint. + /// The trigger for when to display the notification for a waypoint could be + /// based, for example, on a + /// [geofence](https://docs.microsoft.com/azure/azure-maps/tutorial-iot-hub-maps), + /// or selectable distance to the waypoint. + /// + /// The API covers all regions of the planet except latitudes above Greenland + /// and Antarctica. + /// + /// + /// Coordinates through which the route is calculated, separated by colon (:) + /// and entered in chronological order. A minimum of two waypoints is required. + /// A single API call may contain up to 60 waypoints. + /// A waypoint indicates location, ETA, and optional heading: + /// latitude,longitude,ETA,heading, where + /// * `Latitude` - Latitude coordinate in decimal degrees. + /// * `Longitude` - Longitude coordinate in decimal degrees. + /// * `ETA (estimated time of arrival)` - The number of minutes from the + /// present time that it will take for the vehicle to reach the waypoint. + /// Allowed range is from 0.0 to 120.0 minutes. + /// * `Heading` - An optional value indicating the vehicle heading as it passes + /// the waypoint. Expressed in clockwise degrees relative to true north. This + /// is issued to calculate sun glare as a driving hazard. Allowed range is from + /// 0.0 to 360.0 degrees. If not provided, a heading will automatically be + /// derived based on the position of neighboring waypoints. + /// + /// It is recommended to stay within, or close to, the distance that can be + /// traveled within 120-mins or shortly after. This way a more accurate + /// assessment can be provided for the trip and prevent isolated events not + /// being captured between waypoints. Information can and should be updated + /// along the route (especially for trips greater than 2 hours) to continuously + /// pull new waypoints moving forward, but also to ensure that forecast + /// information for content such as precipitation type and intensity is + /// accurate as storms develop and dissipate over time. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWeatherAlongRouteWithHttpMessagesAsync(string query, string language = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (query == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "query"); + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("query", query); + tracingParameters.Add("language", language); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetWeatherAlongRoute", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/route/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (query != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(query))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Severe Weather Alerts** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// Severe weather phenomenon can significantly impact our everyday life and + /// business operations. For example, severe weather conditions such as + /// tropical storms, high winds or flooding can close roads and force logistics + /// companies to reroute their fleet causing delays in reaching destinations + /// and breaking the cold chain of refrigerated food products.  Azure Maps + /// Severe Weather Alerts API returns the severe weather alerts that are + /// available worldwide from both official Government Meteorological Agencies + /// and leading global to regional weather alert providers. The service can + /// return details such as alert type, category, level and detailed description + /// about the active severe alerts for the requested location, like hurricanes, + /// thunderstorms, lightning, heat waves or forest fires. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Return full details for the severe weather alerts. Available values are + /// * `true` - Returns full details. By default all details are returned. + /// * `false` - Returns a truncated version of the alerts data, which excludes + /// the area-specific full description of alert details (`alertDetails`). + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetSevereWeatherAlertsWithHttpMessagesAsync(IList coordinates, string language = default(string), string details = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("language", language); + tracingParameters.Add("details", details); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetSevereWeatherAlerts", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/severe/alerts/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (details != null) + { + _queryParameters.Add(string.Format("details={0}", System.Uri.EscapeDataString(details))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// **Get Daily Indices** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// There may be times when you want to know if the weather conditions are + /// optimal for a specific activity, for example, for outdoor construction, + /// indoor activities, running or farming including soil moisture information. + /// Azure Maps Indices API returns index values that will guide end users to + /// plan future activities. For example, a health mobile application can notify + /// users that today is good weather for running or for other outdoors + /// activities like for playing golf, and retail stores can optimize their + /// digital marketing campaigns based on predicted index values. The service + /// returns in daily indices values for current and next 5, 10 and 15 days + /// starting from current day. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Specifies for how many days the daily indices are returned. By default, the + /// indices data for the current day will be returned. When requesting future + /// indices data, the current day is included in the response as day 1. + /// Available values are + /// * `1` - Return daily index data for the current day. Default value. + /// * `5` - Return 5 days of daily index data starting from the current day. + /// * `10` - Return 10 days of daily index data starting from the current day. + /// * `15` - Return 15 days of daily index data starting from the current day. + /// + /// + /// Numeric index identifier that can be used for restricting returned results + /// to the corresponding index type. Cannot be paired with `indexGroupId`. + /// Please refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and to see + /// the supported indices. + /// + /// + /// Numeric index group identifier that can be used for restricting returned + /// results to the corresponding subset of indices (index group). Cannot be + /// paired with `indexId`. Please refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and to see + /// the supported index groups. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetDailyIndicesWithHttpMessagesAsync(IList coordinates, string language = default(string), int? duration = default(int?), int? indexId = default(int?), int? indexGroupId = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (coordinates == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "coordinates"); + } + if (coordinates != null) + { + if (coordinates.Count > 2) + { + throw new ValidationException(ValidationRules.MaxItems, "coordinates", 2); + } + if (coordinates.Count < 2) + { + throw new ValidationException(ValidationRules.MinItems, "coordinates", 2); + } + } + string format = "json"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("format", format); + tracingParameters.Add("coordinates", coordinates); + tracingParameters.Add("language", language); + tracingParameters.Add("duration", duration); + tracingParameters.Add("indexId", indexId); + tracingParameters.Add("indexGroupId", indexGroupId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDailyIndices", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "weather/indices/daily/{format}").ToString(); + _url = _url.Replace("{format}", System.Uri.EscapeDataString(format)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (coordinates != null) + { + _queryParameters.Add(string.Format("query={0}", System.Uri.EscapeDataString(string.Join(",", coordinates)))); + } + if (language != null) + { + _queryParameters.Add(string.Format("language={0}", System.Uri.EscapeDataString(language))); + } + if (duration != null) + { + _queryParameters.Add(string.Format("duration={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(duration, Client.SerializationSettings).Trim('"')))); + } + if (indexId != null) + { + _queryParameters.Add(string.Format("indexId={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(indexId, Client.SerializationSettings).Trim('"')))); + } + if (indexGroupId != null) + { + _queryParameters.Add(string.Format("indexGroupId={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(indexGroupId, Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.ClientId != null) + { + if (_httpRequest.Headers.Contains("x-ms-client-id")) + { + _httpRequest.Headers.Remove("x-ms-client-id"); + } + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-id", Client.ClientId); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperationsExtensions.cs b/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperationsExtensions.cs new file mode 100644 index 000000000000..db688b7db93d --- /dev/null +++ b/sdk/maps/Azure.Maps.Weather/src/Generated/WeatherOperationsExtensions.cs @@ -0,0 +1,502 @@ +// +// 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. +// + +namespace Azure.Maps.Weather +{ + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for WeatherOperations. + /// + public static partial class WeatherOperationsExtensions + { + /// + /// **Get Hourly Forecast** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Request detailed weather forecast by the hour for the next 1, 12, 24 (1 + /// day), 72 (3 days), 120 (5 days), and 240 hours (10 days) for the given the + /// given coordinate location. The API returns details such as temperature, + /// humidity, wind, precipitation, and ultraviolet (UV) index. + /// + /// In S0 you can request hourly forecast for the next 1, 12, 24 hours (1 day), + /// and 72 hours (3 days). In S1 you can also request hourly forecast for the + /// next 120 (5 days) and 240 hours (10 days). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Time frame of the returned weather forecast. By default, the forecast data + /// for next hour will be returned. Available values are + /// * `1` - Return forecast data for the next hour. Default value. + /// * `12` - Return hourly forecast for next 12 hours. + /// * `24` - Return hourly forecast for next 24 hours. + /// * `72` - Return hourly forecast for next 72 hours (3 days). + /// * `120` - Return hourly forecast for next 120 hours (5 days). Only + /// available in S1 SKU. + /// * `240` - Return hourly forecast for next 240 hours (10 days). Only + /// available in S1 SKU. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The cancellation token. + /// + public static async Task GetHourlyForecastAsync(this IWeatherOperations operations, IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetHourlyForecastWithHttpMessagesAsync(coordinates, unit, duration, language, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Minute Forecast** + /// + /// + /// **Applies to**: S1 pricing tier. + /// + /// + /// Get Minute Forecast service returns minute-by-minute forecasts for a given + /// location for the next 120 minutes. Users can request weather forecasts in + /// the interval of 1, 5 and 15 minutes. The response will include details + /// such as the type of precipitation (including rain, snow, or a mixture of + /// both), start time, and precipitation intensity value (dBZ). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies time interval in minutes for the returned weather forecast. + /// Supported values are + /// * `1` - Retrieve forecast for 1-minute intervals. Returned by default. + /// * `5` - Retrieve forecasts for 5-minute intervals. + /// * `15` - Retrieve forecasts for 15-minute intervals. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The cancellation token. + /// + public static async Task GetMinuteForecastAsync(this IWeatherOperations operations, IList coordinates, int? interval = default(int?), string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetMinuteForecastWithHttpMessagesAsync(coordinates, interval, language, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Quarter-Day Forecast** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Service returns detailed weather forecast by quarter-day for the next 1, 5, + /// 10, or 15 days for a given location. Response data is presented by quarters + /// of the day - morning, afternoon, evening, and overnight. Details such as + /// temperature, humidity, wind, precipitation, and UV index are returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Specifies for how many days the quester-day forecast responses are + /// returned. Supported values are: + /// * `1` - Return forecast data for the next day. Returned by default. + /// * `5` - Return forecast data for the next 5 days. + /// * `10` - Return forecast data for next 10 days. + /// * `15` - Return forecast data for the next 15 days. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The cancellation token. + /// + public static async Task GetQuarterDayForecastAsync(this IWeatherOperations operations, IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetQuarterDayForecastWithHttpMessagesAsync(coordinates, unit, duration, language, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Current Conditions** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// Get Current Conditions service returns detailed current weather conditions + /// such as precipitation, temperature and wind for a given coordinate + /// location. Also, observations from the past 6 or 24 hours for a particular + /// location can be retrieved. The basic information returned with the response + /// include details such as observation date and time, brief description of the + /// weather conditions, weather icon, precipitation indicator flags, and + /// temperature. Additional details such as RealFeel™ Temperature and UV index + /// are also returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Return full details for the current conditions. Available values are + /// * `true` - Returns full details. By default all details are returned. + /// * `false` - Returns a truncated version of the current condition data, + /// which includes observation date time, weather phrase, icon code, + /// precipitation indicator flag, and temperature. + /// + /// + /// Time frame of the returned weather conditions. By default, the most current + /// weather conditions will be returned. Default value is 0. Supported values + /// are: + /// * `0` - Return the most current weather conditions. + /// * `6` - Return weather conditions from past 6 hours. + /// * `24` - Return weather conditions from past 24 hours. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The cancellation token. + /// + public static async Task GetCurrentConditionsAsync(this IWeatherOperations operations, IList coordinates, string unit = default(string), string details = default(string), int? duration = default(int?), string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetCurrentConditionsWithHttpMessagesAsync(coordinates, unit, details, duration, language, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Daily Forecast** + /// + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// + /// The service returns detailed weather forecast such as temperature and wind + /// by day for the next 1, 5, 10, 15, 25, or 45 days for a given coordinate + /// location. The response include details such as temperature, wind, + /// precipitation, air quality, and UV index. + /// + /// In S0 you can request daily forecast for the next 1, 5, 10, and 15 days. In + /// S1 you can also request daily forecast for the next 25 days, and 45 days. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Specifies to return the data in either metric units or imperial units. + /// Default value is metric. Possible values include: 'metric', 'imperial' + /// + /// + /// Specifies for how many days the daily forecast responses are returned. + /// Available values are + /// * `1` - Return forecast data for the next day. Returned by default. + /// * `5` - Return forecast data for the next 5 days. + /// * `10` - Return forecast data for the next 10 days. + /// * `25` - Return forecast data for the next 25 days. Only available in S1 + /// SKU. + /// * `45` - Return forecast data for the next 45 days. Only available in S1 + /// SKU. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The cancellation token. + /// + public static async Task GetDailyForecastAsync(this IWeatherOperations operations, IList coordinates, string unit = default(string), int? duration = default(int?), string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDailyForecastWithHttpMessagesAsync(coordinates, unit, duration, language, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Weather along route** + /// + /// + /// **Applies to**: S1 pricing tier. + /// + /// Weather along a route API returns hyper local (one kilometer or less), + /// up-to-the-minute weather nowcasts, weather hazard assessments, and + /// notifications along a route described as a sequence of waypoints. + /// This includes a list of weather hazards affecting the waypoint or route, + /// and the aggregated hazard index for each waypoint might be used to paint + /// each portion of a route according to how safe it is for the driver. When + /// submitting the waypoints, it is recommended to stay within, or close to, + /// the distance that can be traveled within 120-mins or shortly after. Data is + /// updated every five minutes. + /// + /// The service supplements Azure Maps [Route + /// Service](https://docs.microsoft.com/rest/api/maps/route) that allows you to + /// first request a route between an origin and a destination and use that as + /// an input for Weather Along Route endpoint. + /// + /// In addition, the service supports scenarios to generate weather + /// notifications for waypoints that experience an increase in intensity of a + /// weather hazard. For example, if the vehicle is expected to begin + /// experiencing heavy rain as it reaches a waypoint, a weather notification + /// for heavy rain will be generated for that waypoint allowing the end product + /// to display a heavy rain notification before the driver reaches that + /// waypoint. + /// The trigger for when to display the notification for a waypoint could be + /// based, for example, on a + /// [geofence](https://docs.microsoft.com/azure/azure-maps/tutorial-iot-hub-maps), + /// or selectable distance to the waypoint. + /// + /// The API covers all regions of the planet except latitudes above Greenland + /// and Antarctica. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Coordinates through which the route is calculated, separated by colon (:) + /// and entered in chronological order. A minimum of two waypoints is required. + /// A single API call may contain up to 60 waypoints. + /// A waypoint indicates location, ETA, and optional heading: + /// latitude,longitude,ETA,heading, where + /// * `Latitude` - Latitude coordinate in decimal degrees. + /// * `Longitude` - Longitude coordinate in decimal degrees. + /// * `ETA (estimated time of arrival)` - The number of minutes from the + /// present time that it will take for the vehicle to reach the waypoint. + /// Allowed range is from 0.0 to 120.0 minutes. + /// * `Heading` - An optional value indicating the vehicle heading as it passes + /// the waypoint. Expressed in clockwise degrees relative to true north. This + /// is issued to calculate sun glare as a driving hazard. Allowed range is from + /// 0.0 to 360.0 degrees. If not provided, a heading will automatically be + /// derived based on the position of neighboring waypoints. + /// + /// It is recommended to stay within, or close to, the distance that can be + /// traveled within 120-mins or shortly after. This way a more accurate + /// assessment can be provided for the trip and prevent isolated events not + /// being captured between waypoints. Information can and should be updated + /// along the route (especially for trips greater than 2 hours) to continuously + /// pull new waypoints moving forward, but also to ensure that forecast + /// information for content such as precipitation type and intensity is + /// accurate as storms develop and dissipate over time. + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// The cancellation token. + /// + public static async Task GetWeatherAlongRouteAsync(this IWeatherOperations operations, string query, string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWeatherAlongRouteWithHttpMessagesAsync(query, language, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Severe Weather Alerts** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// Severe weather phenomenon can significantly impact our everyday life and + /// business operations. For example, severe weather conditions such as + /// tropical storms, high winds or flooding can close roads and force logistics + /// companies to reroute their fleet causing delays in reaching destinations + /// and breaking the cold chain of refrigerated food products.  Azure Maps + /// Severe Weather Alerts API returns the severe weather alerts that are + /// available worldwide from both official Government Meteorological Agencies + /// and leading global to regional weather alert providers. The service can + /// return details such as alert type, category, level and detailed description + /// about the active severe alerts for the requested location, like hurricanes, + /// thunderstorms, lightning, heat waves or forest fires. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Return full details for the severe weather alerts. Available values are + /// * `true` - Returns full details. By default all details are returned. + /// * `false` - Returns a truncated version of the alerts data, which excludes + /// the area-specific full description of alert details (`alertDetails`). + /// + /// + /// The cancellation token. + /// + public static async Task GetSevereWeatherAlertsAsync(this IWeatherOperations operations, IList coordinates, string language = default(string), string details = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetSevereWeatherAlertsWithHttpMessagesAsync(coordinates, language, details, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// **Get Daily Indices** + /// + /// **Applies to**: S0 and S1 pricing tiers. + /// + /// There may be times when you want to know if the weather conditions are + /// optimal for a specific activity, for example, for outdoor construction, + /// indoor activities, running or farming including soil moisture information. + /// Azure Maps Indices API returns index values that will guide end users to + /// plan future activities. For example, a health mobile application can notify + /// users that today is good weather for running or for other outdoors + /// activities like for playing golf, and retail stores can optimize their + /// digital marketing campaigns based on predicted index values. The service + /// returns in daily indices values for current and next 5, 10 and 15 days + /// starting from current day. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The applicable query specified as a comma separated string composed by + /// latitude followed by longitude e.g. "47.641268,-122.125679". + /// + /// + /// Language in which search results should be returned. Should be one of + /// supported IETF language tags, case insensitive. When data in specified + /// language is not available for a specific field, default language is used. + /// + /// Please refer to [Supported + /// Languages](https://docs.microsoft.com/azure/azure-maps/supported-languages) + /// for details. + /// + /// + /// Specifies for how many days the daily indices are returned. By default, the + /// indices data for the current day will be returned. When requesting future + /// indices data, the current day is included in the response as day 1. + /// Available values are + /// * `1` - Return daily index data for the current day. Default value. + /// * `5` - Return 5 days of daily index data starting from the current day. + /// * `10` - Return 10 days of daily index data starting from the current day. + /// * `15` - Return 15 days of daily index data starting from the current day. + /// + /// + /// Numeric index identifier that can be used for restricting returned results + /// to the corresponding index type. Cannot be paired with `indexGroupId`. + /// Please refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and to see + /// the supported indices. + /// + /// + /// Numeric index group identifier that can be used for restricting returned + /// results to the corresponding subset of indices (index group). Cannot be + /// paired with `indexId`. Please refer to [Weather Service + /// Concepts](https://aka.ms/AzureMapsWeatherConcepts) for details and to see + /// the supported index groups. + /// + /// + /// The cancellation token. + /// + public static async Task GetDailyIndicesAsync(this IWeatherOperations operations, IList coordinates, string language = default(string), int? duration = default(int?), int? indexId = default(int?), int? indexGroupId = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDailyIndicesWithHttpMessagesAsync(coordinates, language, duration, indexId, indexGroupId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +}