< Summary

Class:Microsoft.Azure.CognitiveServices.Search.WebSearch.Models.TimeZoneTimeZoneInformation
Assembly:Microsoft.Azure.CognitiveServices.Search.BingWebSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\TimeZoneTimeZoneInformation.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:93
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Location()-0%100%
get_Time()-0%100%
get_UtcOffset()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\TimeZoneTimeZoneInformation.cs

#LineLine coverage
 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
 7namespace 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>
 022        public TimeZoneTimeZoneInformation()
 23        {
 24            CustomInit();
 025        }
 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>
 038        public TimeZoneTimeZoneInformation(string location, string time, string utcOffset)
 39        {
 040            Location = location;
 041            Time = time;
 042            UtcOffset = utcOffset;
 43            CustomInit();
 044        }
 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")]
 056        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")]
 063        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")]
 069        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        {
 079            if (Location == null)
 80            {
 081                throw new ValidationException(ValidationRules.CannotBeNull, "Location");
 82            }
 083            if (Time == null)
 84            {
 085                throw new ValidationException(ValidationRules.CannotBeNull, "Time");
 86            }
 087            if (UtcOffset == null)
 88            {
 089                throw new ValidationException(ValidationRules.CannotBeNull, "UtcOffset");
 90            }
 091        }
 92    }
 93}