/*
 * 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>
    /// ScanContentResponse
    /// </summary>
    [DataContract(Name = "ScanContentResponse")]
    public partial class ScanContentResponse : IEquatable<ScanContentResponse>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ScanContentResponse" /> class.
        /// </summary>
        /// <param name="name">The dataset name.</param>
        /// <param name="codeId">The SMAC identifier.</param>
        /// <param name="payloadType">The payload type    The value can be:  - Image  - Url  - Contact.</param>
        /// <param name="payloadName">The payload name.</param>
        /// <param name="payload">The payload content.</param>
        /// <param name="token">The access token containing the information on the scan (The access token is used to identify the scanner and the payload.  It should be transmitted to the recipient if traffic need to be  redirected. This is especially true for URL Payload.  The recipient should call &lt;a href&#x3D;\&quot;#operations-OAuth-post_api_OAuth_verify_token\&quot;&gt;/api/OAuth/verify-token&lt;/a&gt;  to validate the token before consuming it.).</param>
        /// <param name="isUseExternalBrowser">A flag indicating whether an external browser should be used.</param>
        public ScanContentResponse(string name = default(string), Guid codeId = default(Guid), string payloadType = default(string), string payloadName = default(string), string payload = default(string), string token = default(string), bool isUseExternalBrowser = default(bool))
        {
            this.Name = name;
            this.CodeId = codeId;
            this.PayloadType = payloadType;
            this.PayloadName = payloadName;
            this.Payload = payload;
            this.Token = token;
            this.IsUseExternalBrowser = isUseExternalBrowser;
        }

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

        /// <summary>
        /// The SMAC identifier
        /// </summary>
        /// <value>The SMAC identifier</value>
        [DataMember(Name = "codeId", EmitDefaultValue = false)]
        public Guid CodeId { 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>
        /// The payload content
        /// </summary>
        /// <value>The payload content</value>
        [DataMember(Name = "payload", EmitDefaultValue = true)]
        public string Payload { get; set; }

        /// <summary>
        /// The access token containing the information on the scan (The access token is used to identify the scanner and the payload.  It should be transmitted to the recipient if traffic need to be  redirected. This is especially true for URL Payload.  The recipient should call &lt;a href&#x3D;\&quot;#operations-OAuth-post_api_OAuth_verify_token\&quot;&gt;/api/OAuth/verify-token&lt;/a&gt;  to validate the token before consuming it.)
        /// </summary>
        /// <value>The access token containing the information on the scan (The access token is used to identify the scanner and the payload.  It should be transmitted to the recipient if traffic need to be  redirected. This is especially true for URL Payload.  The recipient should call &lt;a href&#x3D;\&quot;#operations-OAuth-post_api_OAuth_verify_token\&quot;&gt;/api/OAuth/verify-token&lt;/a&gt;  to validate the token before consuming it.)</value>
        [DataMember(Name = "token", EmitDefaultValue = true)]
        public string Token { get; set; }

        /// <summary>
        /// A flag indicating whether an external browser should be used
        /// </summary>
        /// <value>A flag indicating whether an external browser should be used</value>
        [DataMember(Name = "isUseExternalBrowser", EmitDefaultValue = true)]
        public bool IsUseExternalBrowser { 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 ScanContentResponse {\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  CodeId: ").Append(CodeId).Append("\n");
            sb.Append("  PayloadType: ").Append(PayloadType).Append("\n");
            sb.Append("  PayloadName: ").Append(PayloadName).Append("\n");
            sb.Append("  Payload: ").Append(Payload).Append("\n");
            sb.Append("  Token: ").Append(Token).Append("\n");
            sb.Append("  IsUseExternalBrowser: ").Append(IsUseExternalBrowser).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 ScanContentResponse);
        }

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

        /// <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.Name != null)
                {
                    hashCode = (hashCode * 59) + this.Name.GetHashCode();
                }
                if (this.CodeId != null)
                {
                    hashCode = (hashCode * 59) + this.CodeId.GetHashCode();
                }
                if (this.PayloadType != null)
                {
                    hashCode = (hashCode * 59) + this.PayloadType.GetHashCode();
                }
                if (this.PayloadName != null)
                {
                    hashCode = (hashCode * 59) + this.PayloadName.GetHashCode();
                }
                if (this.Payload != null)
                {
                    hashCode = (hashCode * 59) + this.Payload.GetHashCode();
                }
                if (this.Token != null)
                {
                    hashCode = (hashCode * 59) + this.Token.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.IsUseExternalBrowser.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;
        }
    }

}
