/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Label != null)
         {
             hashCode = hashCode * 59 + Label.GetHashCode();
         }
         if (Category != null)
         {
             hashCode = hashCode * 59 + Category.GetHashCode();
         }
         if (Tags != null)
         {
             hashCode = hashCode * 59 + Tags.GetHashCode();
         }
         if (GroupNames != null)
         {
             hashCode = hashCode * 59 + GroupNames.GetHashCode();
         }
         if (Link != null)
         {
             hashCode = hashCode * 59 + Link.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (TransformedState != null)
         {
             hashCode = hashCode * 59 + TransformedState.GetHashCode();
         }
         if (StateDescription != null)
         {
             hashCode = hashCode * 59 + StateDescription.GetHashCode();
         }
         if (CommandDescription != null)
         {
             hashCode = hashCode * 59 + CommandDescription.GetHashCode();
         }
         if (Metadata != null)
         {
             hashCode = hashCode * 59 + Metadata.GetHashCode();
         }
         if (Editable != null)
         {
             hashCode = hashCode * 59 + Editable.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EnrichedItemDTO" /> class.
 /// </summary>
 /// <param name="type">type.</param>
 /// <param name="name">name.</param>
 /// <param name="label">label.</param>
 /// <param name="category">category.</param>
 /// <param name="tags">tags.</param>
 /// <param name="groupNames">groupNames.</param>
 /// <param name="link">link.</param>
 /// <param name="state">state.</param>
 /// <param name="transformedState">transformedState.</param>
 /// <param name="stateDescription">stateDescription.</param>
 /// <param name="commandDescription">commandDescription.</param>
 /// <param name="metadata">metadata.</param>
 /// <param name="editable">editable (default to false).</param>
 public EnrichedItemDTO(string type = default(string), string name = default(string), string label = default(string), string category = default(string), List <string> tags = default(List <string>), List <string> groupNames = default(List <string>), string link = default(string), string state = default(string), string transformedState = default(string), StateDescription stateDescription = default(StateDescription), CommandDescription commandDescription = default(CommandDescription), Dictionary <string, object> metadata = default(Dictionary <string, object>), bool?editable = false)
 {
     Type               = type;
     Name               = name;
     Label              = label;
     Category           = category;
     Tags               = tags;
     GroupNames         = groupNames;
     Link               = link;
     State              = state;
     TransformedState   = transformedState;
     StateDescription   = stateDescription;
     CommandDescription = commandDescription;
     Metadata           = metadata;
     // use default value if no "editable" provided
     //Editable = editable ?? false;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ChannelTypeDTO" /> class.
 /// </summary>
 /// <param name="parameters">parameters.</param>
 /// <param name="parameterGroups">parameterGroups.</param>
 /// <param name="description">description.</param>
 /// <param name="label">label.</param>
 /// <param name="category">category.</param>
 /// <param name="itemType">itemType.</param>
 /// <param name="kind">kind.</param>
 /// <param name="stateDescription">stateDescription.</param>
 /// <param name="tags">tags.</param>
 /// <param name="uID">uID.</param>
 /// <param name="advanced">advanced (default to false).</param>
 /// <param name="commandDescription">commandDescription.</param>
 public ChannelTypeDTO(List <ConfigDescriptionParameterDTO> parameters = default(List <ConfigDescriptionParameterDTO>), List <ConfigDescriptionParameterGroupDTO> parameterGroups = default(List <ConfigDescriptionParameterGroupDTO>), string description = default(string), string label = default(string), string category = default(string), string itemType = default(string), string kind = default(string), StateDescription stateDescription = default(StateDescription), List <string> tags = default(List <string>), string uID = default(string), bool?advanced = false, CommandDescription commandDescription = default(CommandDescription))
 {
     Parameters       = parameters;
     ParameterGroups  = parameterGroups;
     Description      = description;
     Label            = label;
     Category         = category;
     ItemType         = itemType;
     Kind             = kind;
     StateDescription = stateDescription;
     Tags             = tags;
     UID = uID;
     // use default value if no "advanced" provided
     if (advanced == null)
     {
         Advanced = false;
     }
     else
     {
         Advanced = advanced;
     }
     CommandDescription = commandDescription;
 }
        /// <summary>
        /// Returns true if EnrichedItemDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of EnrichedItemDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(EnrichedItemDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Type == input.Type ||
                     (Type != null &&
                      Type.Equals(input.Type))
                     ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Category == input.Category ||
                     (Category != null &&
                      Category.Equals(input.Category))
                 ) &&
                 (
                     Tags == input.Tags ||
                     Tags != null &&
                     Tags.SequenceEqual(input.Tags)
                 ) &&
                 (
                     GroupNames == input.GroupNames ||
                     GroupNames != null &&
                     GroupNames.SequenceEqual(input.GroupNames)
                 ) &&
                 (
                     Link == input.Link ||
                     (Link != null &&
                      Link.Equals(input.Link))
                 ) &&
                 (
                     State == input.State ||
                     (State != null &&
                      State.Equals(input.State))
                 ) &&
                 (
                     TransformedState == input.TransformedState ||
                     (TransformedState != null &&
                      TransformedState.Equals(input.TransformedState))
                 ) &&
                 (
                     StateDescription == input.StateDescription ||
                     (StateDescription != null &&
                      StateDescription.Equals(input.StateDescription))
                 ) &&
                 (
                     CommandDescription == input.CommandDescription ||
                     (CommandDescription != null &&
                      CommandDescription.Equals(input.CommandDescription))
                 ) &&
                 (
                     Metadata == input.Metadata ||
                     Metadata != null &&
                     Metadata.SequenceEqual(input.Metadata)
                 ) &&
                 (
                     Editable == input.Editable ||
                     (Editable != null &&
                      Editable.Equals(input.Editable))
                 ));
        }