| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.Search.WebSearch.Models |
| | 8 | | { |
| | 9 | | using Microsoft.Rest; |
| | 10 | | using Newtonsoft.Json; |
| | 11 | | using System.Linq; |
| | 12 | |
|
| | 13 | | /// <summary> |
| | 14 | | /// Defines a date and time for a geographical location. |
| | 15 | | /// </summary> |
| | 16 | | public partial class TimeZoneTimeZoneInformation |
| | 17 | | { |
| | 18 | | /// <summary> |
| | 19 | | /// Initializes a new instance of the TimeZoneTimeZoneInformation |
| | 20 | | /// class. |
| | 21 | | /// </summary> |
| 0 | 22 | | public TimeZoneTimeZoneInformation() |
| | 23 | | { |
| | 24 | | CustomInit(); |
| 0 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the TimeZoneTimeZoneInformation |
| | 29 | | /// class. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="location">The name of the geographical location.For |
| | 32 | | /// example, County; City; City, State; City, State, Country; or Time |
| | 33 | | /// Zone.</param> |
| | 34 | | /// <param name="time">The data and time specified in the form, |
| | 35 | | /// YYYY-MM-DDThh;mm:ss.ssssssZ.</param> |
| | 36 | | /// <param name="utcOffset">The offset from UTC. For example, |
| | 37 | | /// UTC-7.</param> |
| 0 | 38 | | public TimeZoneTimeZoneInformation(string location, string time, string utcOffset) |
| | 39 | | { |
| 0 | 40 | | Location = location; |
| 0 | 41 | | Time = time; |
| 0 | 42 | | UtcOffset = utcOffset; |
| | 43 | | CustomInit(); |
| 0 | 44 | | } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// An initialization method that performs custom operations like setting defaults |
| | 48 | | /// </summary> |
| | 49 | | partial void CustomInit(); |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Gets or sets the name of the geographical location.For example, |
| | 53 | | /// County; City; City, State; City, State, Country; or Time Zone. |
| | 54 | | /// </summary> |
| | 55 | | [JsonProperty(PropertyName = "location")] |
| 0 | 56 | | public string Location { get; set; } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// Gets or sets the data and time specified in the form, |
| | 60 | | /// YYYY-MM-DDThh;mm:ss.ssssssZ. |
| | 61 | | /// </summary> |
| | 62 | | [JsonProperty(PropertyName = "time")] |
| 0 | 63 | | public string Time { get; set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Gets or sets the offset from UTC. For example, UTC-7. |
| | 67 | | /// </summary> |
| | 68 | | [JsonProperty(PropertyName = "utcOffset")] |
| 0 | 69 | | public string UtcOffset { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// Validate the object. |
| | 73 | | /// </summary> |
| | 74 | | /// <exception cref="ValidationException"> |
| | 75 | | /// Thrown if validation fails |
| | 76 | | /// </exception> |
| | 77 | | public virtual void Validate() |
| | 78 | | { |
| 0 | 79 | | if (Location == null) |
| | 80 | | { |
| 0 | 81 | | throw new ValidationException(ValidationRules.CannotBeNull, "Location"); |
| | 82 | | } |
| 0 | 83 | | if (Time == null) |
| | 84 | | { |
| 0 | 85 | | throw new ValidationException(ValidationRules.CannotBeNull, "Time"); |
| | 86 | | } |
| 0 | 87 | | if (UtcOffset == null) |
| | 88 | | { |
| 0 | 89 | | throw new ValidationException(ValidationRules.CannotBeNull, "UtcOffset"); |
| | 90 | | } |
| 0 | 91 | | } |
| | 92 | | } |
| | 93 | | } |