/*
 * 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>
    /// ScanContentListResponse
    /// </summary>
    [DataContract(Name = "ScanContentListResponse")]
    public partial class ScanContentListResponse : IEquatable<ScanContentListResponse>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ScanContentListResponse" /> class.
        /// </summary>
        /// <param name="uid">The SMAC identifier.</param>
        /// <param name="name">The SMAC name.</param>
        /// <param name="token">The token to be used when calling &lt;a href&#x3D;\&quot;#operations-Scan-post_api_Scan_content\&quot;&gt;/api/Scan/content&lt;/a&gt;.</param>
        /// <param name="items">The content items.</param>
        /// <param name="metadata">Custom metadata.</param>
        public ScanContentListResponse(Guid uid = default(Guid), string name = default(string), Guid token = default(Guid), List<ScanContentListItem> items = default(List<ScanContentListItem>), Object metadata = default(Object))
        {
            this.Uid = uid;
            this.Name = name;
            this.Token = token;
            this.Items = items;
            this.Metadata = metadata;
        }

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

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

        /// <summary>
        /// The token to be used when calling &lt;a href&#x3D;\&quot;#operations-Scan-post_api_Scan_content\&quot;&gt;/api/Scan/content&lt;/a&gt;
        /// </summary>
        /// <value>The token to be used when calling &lt;a href&#x3D;\&quot;#operations-Scan-post_api_Scan_content\&quot;&gt;/api/Scan/content&lt;/a&gt;</value>
        [DataMember(Name = "token", EmitDefaultValue = false)]
        public Guid Token { get; set; }

        /// <summary>
        /// The content items
        /// </summary>
        /// <value>The content items</value>
        [DataMember(Name = "items", EmitDefaultValue = true)]
        public List<ScanContentListItem> Items { get; set; }

        /// <summary>
        /// Custom metadata
        /// </summary>
        /// <value>Custom metadata</value>
        [DataMember(Name = "metadata", EmitDefaultValue = true)]
        public Object Metadata { 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 ScanContentListResponse {\n");
            sb.Append("  Uid: ").Append(Uid).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  Token: ").Append(Token).Append("\n");
            sb.Append("  Items: ").Append(Items).Append("\n");
            sb.Append("  Metadata: ").Append(Metadata).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 ScanContentListResponse);
        }

        /// <summary>
        /// Returns true if ScanContentListResponse instances are equal
        /// </summary>
        /// <param name="input">Instance of ScanContentListResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ScanContentListResponse input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Uid == input.Uid ||
                    (this.Uid != null &&
                    this.Uid.Equals(input.Uid))
                ) && 
                (
                    this.Name == input.Name ||
                    (this.Name != null &&
                    this.Name.Equals(input.Name))
                ) && 
                (
                    this.Token == input.Token ||
                    (this.Token != null &&
                    this.Token.Equals(input.Token))
                ) && 
                (
                    this.Items == input.Items ||
                    this.Items != null &&
                    input.Items != null &&
                    this.Items.SequenceEqual(input.Items)
                ) && 
                (
                    this.Metadata == input.Metadata ||
                    (this.Metadata != null &&
                    this.Metadata.Equals(input.Metadata))
                );
        }

        /// <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.Uid != null)
                {
                    hashCode = (hashCode * 59) + this.Uid.GetHashCode();
                }
                if (this.Name != null)
                {
                    hashCode = (hashCode * 59) + this.Name.GetHashCode();
                }
                if (this.Token != null)
                {
                    hashCode = (hashCode * 59) + this.Token.GetHashCode();
                }
                if (this.Items != null)
                {
                    hashCode = (hashCode * 59) + this.Items.GetHashCode();
                }
                if (this.Metadata != null)
                {
                    hashCode = (hashCode * 59) + this.Metadata.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;
        }
    }

}
