/// <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> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Parameters != null) { hashCode = hashCode * 59 + Parameters.GetHashCode(); } if (ParameterGroups != null) { hashCode = hashCode * 59 + ParameterGroups.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Category != null) { hashCode = hashCode * 59 + Category.GetHashCode(); } if (ItemType != null) { hashCode = hashCode * 59 + ItemType.GetHashCode(); } if (Kind != null) { hashCode = hashCode * 59 + Kind.GetHashCode(); } if (StateDescription != null) { hashCode = hashCode * 59 + StateDescription.GetHashCode(); } if (Tags != null) { hashCode = hashCode * 59 + Tags.GetHashCode(); } if (UID != null) { hashCode = hashCode * 59 + UID.GetHashCode(); } if (Advanced != null) { hashCode = hashCode * 59 + Advanced.GetHashCode(); } if (CommandDescription != null) { hashCode = hashCode * 59 + CommandDescription.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if ChannelDefinitionDTO instances are equal /// </summary> /// <param name="input">Instance of ChannelDefinitionDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(ChannelDefinitionDTO input) { if (input == null) { return(false); } return (( Description == input.Description || (Description != null && Description.Equals(input.Description)) ) && ( Id == input.Id || (Id != null && Id.Equals(input.Id)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Tags == input.Tags || Tags != null && Tags.SequenceEqual(input.Tags) ) && ( Properties == input.Properties || Properties != null && Properties.SequenceEqual(input.Properties) ) && ( Category == input.Category || (Category != null && Category.Equals(input.Category)) ) && ( StateDescription == input.StateDescription || (StateDescription != null && StateDescription.Equals(input.StateDescription)) ) && ( Advanced == input.Advanced || (Advanced != null && Advanced.Equals(input.Advanced)) ) && ( TypeUID == input.TypeUID || (TypeUID != null && TypeUID.Equals(input.TypeUID)) )); }
/// <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> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Tags != null) { hashCode = hashCode * 59 + Tags.GetHashCode(); } if (Properties != null) { hashCode = hashCode * 59 + Properties.GetHashCode(); } if (Category != null) { hashCode = hashCode * 59 + Category.GetHashCode(); } if (StateDescription != null) { hashCode = hashCode * 59 + StateDescription.GetHashCode(); } if (Advanced != null) { hashCode = hashCode * 59 + Advanced.GetHashCode(); } if (TypeUID != null) { hashCode = hashCode * 59 + TypeUID.GetHashCode(); } return(hashCode); } }
/// <summary> /// Initializes a new instance of the <see cref="ChannelDefinitionDTO" /> class. /// </summary> /// <param name="description">description.</param> /// <param name="id">id.</param> /// <param name="label">label.</param> /// <param name="tags">tags.</param> /// <param name="properties">properties.</param> /// <param name="category">category.</param> /// <param name="stateDescription">stateDescription.</param> /// <param name="advanced">advanced (default to false).</param> /// <param name="typeUID">typeUID.</param> public ChannelDefinitionDTO(string description = default(string), string id = default(string), string label = default(string), List <string> tags = default(List <string>), Dictionary <string, string> properties = default(Dictionary <string, string>), string category = default(string), StateDescription stateDescription = default(StateDescription), bool?advanced = false, string typeUID = default(string)) { Description = description; Id = id; Label = label; Tags = tags; Properties = properties; Category = category; StateDescription = stateDescription; // use default value if no "advanced" provided if (advanced == null) { Advanced = false; } else { Advanced = advanced; } TypeUID = typeUID; }
/// <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 ChannelTypeDTO instances are equal /// </summary> /// <param name="input">Instance of ChannelTypeDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(ChannelTypeDTO input) { if (input == null) { return(false); } return (( Parameters == input.Parameters || Parameters != null && Parameters.SequenceEqual(input.Parameters) ) && ( ParameterGroups == input.ParameterGroups || ParameterGroups != null && ParameterGroups.SequenceEqual(input.ParameterGroups) ) && ( Description == input.Description || (Description != null && Description.Equals(input.Description)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Category == input.Category || (Category != null && Category.Equals(input.Category)) ) && ( ItemType == input.ItemType || (ItemType != null && ItemType.Equals(input.ItemType)) ) && ( Kind == input.Kind || (Kind != null && Kind.Equals(input.Kind)) ) && ( StateDescription == input.StateDescription || (StateDescription != null && StateDescription.Equals(input.StateDescription)) ) && ( Tags == input.Tags || Tags != null && Tags.SequenceEqual(input.Tags) ) && ( UID == input.UID || (UID != null && UID.Equals(input.UID)) ) && ( Advanced == input.Advanced || (Advanced != null && Advanced.Equals(input.Advanced)) ) && ( CommandDescription == input.CommandDescription || (CommandDescription != null && CommandDescription.Equals(input.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)) )); }