/*
 * SMAC API
 *
 * SMAC ASP.NET Core Web API
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;

namespace Org.OpenAPITools.Model
{
    /// <summary>
    /// The content item
    /// </summary>
    [DataContract(Name = "ScanContentListItem")]
    public partial class ScanContentListItem : IEquatable<ScanContentListItem>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ScanContentListItem" /> class.
        /// </summary>
        /// <param name="datasetId">The dataset identifier.</param>
        /// <param name="datasetName">The dataset name.</param>
        /// <param name="payloadType">The payload type    The value can be:  - Image  - Url  - Contact.</param>
        /// <param name="payloadName">The payload name.</param>
        public ScanContentListItem(Guid datasetId = default(Guid), string datasetName = default(string), string payloadType = default(string), string payloadName = default(string))
        {
            this.DatasetId = datasetId;
            this.DatasetName = datasetName;
            this.PayloadType = payloadType;
            this.PayloadName = payloadName;
        }

        /// <summary>
        /// The dataset identifier
        /// </summary>
        /// <value>The dataset identifier</value>
        [DataMember(Name = "datasetId", EmitDefaultValue = false)]
        public Guid DatasetId { get; set; }

        /// <summary>
        /// The dataset name
        /// </summary>
        /// <value>The dataset name</value>
        [DataMember(Name = "datasetName", EmitDefaultValue = true)]
        public string DatasetName { get; set; }

        /// <summary>
        /// The payload type    The value can be:  - Image  - Url  - Contact
        /// </summary>
        /// <value>The payload type    The value can be:  - Image  - Url  - Contact</value>
        [DataMember(Name = "payloadType", EmitDefaultValue = true)]
        public string PayloadType { get; set; }

        /// <summary>
        /// The payload name
        /// </summary>
        /// <value>The payload name</value>
        [DataMember(Name = "payloadName", EmitDefaultValue = true)]
        public string PayloadName { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ScanContentListItem {\n");
            sb.Append("  DatasetId: ").Append(DatasetId).Append("\n");
            sb.Append("  DatasetName: ").Append(DatasetName).Append("\n");
            sb.Append("  PayloadType: ").Append(PayloadType).Append("\n");
            sb.Append("  PayloadName: ").Append(PayloadName).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as ScanContentListItem);
        }

        /// <summary>
        /// Returns true if ScanContentListItem instances are equal
        /// </summary>
        /// <param name="input">Instance of ScanContentListItem to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ScanContentListItem input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.DatasetId == input.DatasetId ||
                    (this.DatasetId != null &&
                    this.DatasetId.Equals(input.DatasetId))
                ) && 
                (
                    this.DatasetName == input.DatasetName ||
                    (this.DatasetName != null &&
                    this.DatasetName.Equals(input.DatasetName))
                ) && 
                (
                    this.PayloadType == input.PayloadType ||
                    (this.PayloadType != null &&
                    this.PayloadType.Equals(input.PayloadType))
                ) && 
                (
                    this.PayloadName == input.PayloadName ||
                    (this.PayloadName != null &&
                    this.PayloadName.Equals(input.PayloadName))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.DatasetId != null)
                {
                    hashCode = (hashCode * 59) + this.DatasetId.GetHashCode();
                }
                if (this.DatasetName != null)
                {
                    hashCode = (hashCode * 59) + this.DatasetName.GetHashCode();
                }
                if (this.PayloadType != null)
                {
                    hashCode = (hashCode * 59) + this.PayloadType.GetHashCode();
                }
                if (this.PayloadName != null)
                {
                    hashCode = (hashCode * 59) + this.PayloadName.GetHashCode();
                }
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
