|
| 1 | +using System.Collections.Generic; |
| 2 | +using RestSharp.Deserializers; |
| 3 | + |
| 4 | +namespace RestSharp.Tests.SampleClasses |
| 5 | +{ |
| 6 | + public class GoogleWeatherApi |
| 7 | + { |
| 8 | + public string Version { get; set; } |
| 9 | + public GoogleWeather Weather { get; set; } |
| 10 | + } |
| 11 | + |
| 12 | + public class GoogleWeather : List<ForecastConditions> |
| 13 | + { |
| 14 | + public string ModuleId { get; set; } |
| 15 | + public string TabId { get; set; } |
| 16 | + public string MobileRow { get; set; } |
| 17 | + public string MobileZipped { get; set; } |
| 18 | + public string Row { get; set; } |
| 19 | + public string Section { get; set; } |
| 20 | + |
| 21 | + [DeserializeAs(Name = "forecast_information")] |
| 22 | + public ForecastInformation Forecast { get; set; } |
| 23 | + |
| 24 | + [DeserializeAs(Name = "current_conditions")] |
| 25 | + public CurrentConditions Current { get; set; } |
| 26 | + } |
| 27 | + |
| 28 | + public class GoogleDataElement |
| 29 | + { |
| 30 | + public string Data { get; set; } |
| 31 | + } |
| 32 | + |
| 33 | + public class ForecastInformation |
| 34 | + { |
| 35 | + public GoogleDataElement City { get; set; } |
| 36 | + public GoogleDataElement PostalCode { get; set; } |
| 37 | + public GoogleDataElement ForecastDate { get; set; } |
| 38 | + public GoogleDataElement UnitSystem { get; set; } |
| 39 | + } |
| 40 | + |
| 41 | + public class CurrentConditions |
| 42 | + { |
| 43 | + public GoogleDataElement Condition { get; set; } |
| 44 | + public GoogleDataElement TempC { get; set; } |
| 45 | + public GoogleDataElement Humidity { get; set; } |
| 46 | + public GoogleDataElement Icon { get; set; } |
| 47 | + public GoogleDataElement WindCondition { get; set; } |
| 48 | + } |
| 49 | + |
| 50 | + public class ForecastConditions |
| 51 | + { |
| 52 | + public GoogleDataElement DayOfWeek { get; set; } |
| 53 | + public GoogleDataElement Condition { get; set; } |
| 54 | + public GoogleDataElement Low { get; set; } |
| 55 | + public GoogleDataElement High { get; set; } |
| 56 | + public GoogleDataElement Icon { get; set; } |
| 57 | + } |
| 58 | + |
| 59 | + |
| 60 | +} |
0 commit comments