/*
 * 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>
    /// ScanContentListRequest
    /// </summary>
    [DataContract(Name = "ScanContentListRequest")]
    public partial class ScanContentListRequest : IEquatable<ScanContentListRequest>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ScanContentListRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ScanContentListRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ScanContentListRequest" /> class.
        /// </summary>
        /// <param name="codeId">The SMAC ID.</param>
        /// <param name="qrCode">The QrCode string.</param>
        /// <param name="latitude">The latitude (required).</param>
        /// <param name="longitude">The longitude (required).</param>
        /// <param name="tzo">The timezone offset (in minutes) (required).</param>
        /// <param name="deviceInfo">deviceInfo.</param>
        public ScanContentListRequest(Guid? codeId = default(Guid?), string qrCode = default(string), double latitude = default(double), double longitude = default(double), double tzo = default(double), DeviceInfo deviceInfo = default(DeviceInfo))
        {
            this.Latitude = latitude;
            this.Longitude = longitude;
            this.Tzo = tzo;
            this.CodeId = codeId;
            this.QrCode = qrCode;
            this.DeviceInfo = deviceInfo;
        }

        /// <summary>
        /// The SMAC ID
        /// </summary>
        /// <value>The SMAC ID</value>
        [DataMember(Name = "codeId", EmitDefaultValue = true)]
        public Guid? CodeId { get; set; }

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

        /// <summary>
        /// The latitude
        /// </summary>
        /// <value>The latitude</value>
        [DataMember(Name = "latitude", IsRequired = true, EmitDefaultValue = true)]
        public double Latitude { get; set; }

        /// <summary>
        /// The longitude
        /// </summary>
        /// <value>The longitude</value>
        [DataMember(Name = "longitude", IsRequired = true, EmitDefaultValue = true)]
        public double Longitude { get; set; }

        /// <summary>
        /// The timezone offset (in minutes)
        /// </summary>
        /// <value>The timezone offset (in minutes)</value>
        [DataMember(Name = "tzo", IsRequired = true, EmitDefaultValue = true)]
        public double Tzo { get; set; }

        /// <summary>
        /// Gets or Sets DeviceInfo
        /// </summary>
        [DataMember(Name = "deviceInfo", EmitDefaultValue = false)]
        public DeviceInfo DeviceInfo { 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 ScanContentListRequest {\n");
            sb.Append("  CodeId: ").Append(CodeId).Append("\n");
            sb.Append("  QrCode: ").Append(QrCode).Append("\n");
            sb.Append("  Latitude: ").Append(Latitude).Append("\n");
            sb.Append("  Longitude: ").Append(Longitude).Append("\n");
            sb.Append("  Tzo: ").Append(Tzo).Append("\n");
            sb.Append("  DeviceInfo: ").Append(DeviceInfo).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 ScanContentListRequest);
        }

        /// <summary>
        /// Returns true if ScanContentListRequest instances are equal
        /// </summary>
        /// <param name="input">Instance of ScanContentListRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ScanContentListRequest input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.CodeId == input.CodeId ||
                    (this.CodeId != null &&
                    this.CodeId.Equals(input.CodeId))
                ) && 
                (
                    this.QrCode == input.QrCode ||
                    (this.QrCode != null &&
                    this.QrCode.Equals(input.QrCode))
                ) && 
                (
                    this.Latitude == input.Latitude ||
                    this.Latitude.Equals(input.Latitude)
                ) && 
                (
                    this.Longitude == input.Longitude ||
                    this.Longitude.Equals(input.Longitude)
                ) && 
                (
                    this.Tzo == input.Tzo ||
                    this.Tzo.Equals(input.Tzo)
                ) && 
                (
                    this.DeviceInfo == input.DeviceInfo ||
                    (this.DeviceInfo != null &&
                    this.DeviceInfo.Equals(input.DeviceInfo))
                );
        }

        /// <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.CodeId != null)
                {
                    hashCode = (hashCode * 59) + this.CodeId.GetHashCode();
                }
                if (this.QrCode != null)
                {
                    hashCode = (hashCode * 59) + this.QrCode.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Latitude.GetHashCode();
                hashCode = (hashCode * 59) + this.Longitude.GetHashCode();
                hashCode = (hashCode * 59) + this.Tzo.GetHashCode();
                if (this.DeviceInfo != null)
                {
                    hashCode = (hashCode * 59) + this.DeviceInfo.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;
        }
    }

}
