/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (WidgetId != null)
         {
             hashCode = hashCode * 59 + WidgetId.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Visibility != null)
         {
             hashCode = hashCode * 59 + Visibility.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Icon != null)
         {
             hashCode = hashCode * 59 + Icon.GetHashCode();
         }
         if (Labelcolor != null)
         {
             hashCode = hashCode * 59 + Labelcolor.GetHashCode();
         }
         if (Valuecolor != null)
         {
             hashCode = hashCode * 59 + Valuecolor.GetHashCode();
         }
         if (Mappings != null)
         {
             hashCode = hashCode * 59 + Mappings.GetHashCode();
         }
         if (SwitchSupport != null)
         {
             hashCode = hashCode * 59 + SwitchSupport.GetHashCode();
         }
         if (SendFrequency != null)
         {
             hashCode = hashCode * 59 + SendFrequency.GetHashCode();
         }
         if (Separator != null)
         {
             hashCode = hashCode * 59 + Separator.GetHashCode();
         }
         if (Refresh != null)
         {
             hashCode = hashCode * 59 + Refresh.GetHashCode();
         }
         if (Height != null)
         {
             hashCode = hashCode * 59 + Height.GetHashCode();
         }
         if (MinValue != null)
         {
             hashCode = hashCode * 59 + MinValue.GetHashCode();
         }
         if (MaxValue != null)
         {
             hashCode = hashCode * 59 + MaxValue.GetHashCode();
         }
         if (Step != null)
         {
             hashCode = hashCode * 59 + Step.GetHashCode();
         }
         if (Url != null)
         {
             hashCode = hashCode * 59 + Url.GetHashCode();
         }
         if (Encoding != null)
         {
             hashCode = hashCode * 59 + Encoding.GetHashCode();
         }
         if (Service != null)
         {
             hashCode = hashCode * 59 + Service.GetHashCode();
         }
         if (Period != null)
         {
             hashCode = hashCode * 59 + Period.GetHashCode();
         }
         if (Legend != null)
         {
             hashCode = hashCode * 59 + Legend.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Item != null)
         {
             hashCode = hashCode * 59 + Item.GetHashCode();
         }
         if (LinkedPage != null)
         {
             hashCode = hashCode * 59 + LinkedPage.GetHashCode();
         }
         if (Widgets != null)
         {
             hashCode = hashCode * 59 + Widgets.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if WidgetDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of WidgetDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(WidgetDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     WidgetId == input.WidgetId ||
                     (WidgetId != null &&
                      WidgetId.Equals(input.WidgetId))
                     ) &&
                 (
                     Type == input.Type ||
                     (Type != null &&
                      Type.Equals(input.Type))
                 ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     Visibility == input.Visibility ||
                     (Visibility != null &&
                      Visibility.Equals(input.Visibility))
                 ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Icon == input.Icon ||
                     (Icon != null &&
                      Icon.Equals(input.Icon))
                 ) &&
                 (
                     Labelcolor == input.Labelcolor ||
                     (Labelcolor != null &&
                      Labelcolor.Equals(input.Labelcolor))
                 ) &&
                 (
                     Valuecolor == input.Valuecolor ||
                     (Valuecolor != null &&
                      Valuecolor.Equals(input.Valuecolor))
                 ) &&
                 (
                     Mappings == input.Mappings ||
                     Mappings != null &&
                     Mappings.SequenceEqual(input.Mappings)
                 ) &&
                 (
                     SwitchSupport == input.SwitchSupport ||
                     (SwitchSupport != null &&
                      SwitchSupport.Equals(input.SwitchSupport))
                 ) &&
                 (
                     SendFrequency == input.SendFrequency ||
                     (SendFrequency != null &&
                      SendFrequency.Equals(input.SendFrequency))
                 ) &&
                 (
                     Separator == input.Separator ||
                     (Separator != null &&
                      Separator.Equals(input.Separator))
                 ) &&
                 (
                     Refresh == input.Refresh ||
                     (Refresh != null &&
                      Refresh.Equals(input.Refresh))
                 ) &&
                 (
                     Height == input.Height ||
                     (Height != null &&
                      Height.Equals(input.Height))
                 ) &&
                 (
                     MinValue == input.MinValue ||
                     (MinValue != null &&
                      MinValue.Equals(input.MinValue))
                 ) &&
                 (
                     MaxValue == input.MaxValue ||
                     (MaxValue != null &&
                      MaxValue.Equals(input.MaxValue))
                 ) &&
                 (
                     Step == input.Step ||
                     (Step != null &&
                      Step.Equals(input.Step))
                 ) &&
                 (
                     Url == input.Url ||
                     (Url != null &&
                      Url.Equals(input.Url))
                 ) &&
                 (
                     Encoding == input.Encoding ||
                     (Encoding != null &&
                      Encoding.Equals(input.Encoding))
                 ) &&
                 (
                     Service == input.Service ||
                     (Service != null &&
                      Service.Equals(input.Service))
                 ) &&
                 (
                     Period == input.Period ||
                     (Period != null &&
                      Period.Equals(input.Period))
                 ) &&
                 (
                     Legend == input.Legend ||
                     (Legend != null &&
                      Legend.Equals(input.Legend))
                 ) &&
                 (
                     State == input.State ||
                     (State != null &&
                      State.Equals(input.State))
                 ) &&
                 (
                     Item == input.Item ||
                     (Item != null &&
                      Item.Equals(input.Item))
                 ) &&
                 (
                     LinkedPage == input.LinkedPage ||
                     (LinkedPage != null &&
                      LinkedPage.Equals(input.LinkedPage))
                 ) &&
                 (
                     Widgets == input.Widgets ||
                     Widgets != null &&
                     Widgets.SequenceEqual(input.Widgets)
                 ));
        }