/*
 * 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>
    /// FacePhotoRequest
    /// </summary>
    [DataContract(Name = "FacePhotoRequest")]
    public partial class FacePhotoRequest : IEquatable<FacePhotoRequest>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FacePhotoRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected FacePhotoRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="FacePhotoRequest" /> class.
        /// </summary>
        /// <param name="userId">The user identifier to request (required).</param>
        /// <param name="isCrop">A flag indicating whether to crop the result image according to ISO 19794-5..</param>
        /// <param name="width">width.</param>
        /// <param name="height">height.</param>
        public FacePhotoRequest(Guid userId = default(Guid), bool isCrop = default(bool), int? width = default(int?), int? height = default(int?))
        {
            this.UserId = userId;
            this.IsCrop = isCrop;
            this.Width = width;
            this.Height = height;
        }

        /// <summary>
        /// The user identifier to request
        /// </summary>
        /// <value>The user identifier to request</value>
        [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)]
        public Guid UserId { get; set; }

        /// <summary>
        /// A flag indicating whether to crop the result image according to ISO 19794-5.
        /// </summary>
        /// <value>A flag indicating whether to crop the result image according to ISO 19794-5.</value>
        [DataMember(Name = "isCrop", EmitDefaultValue = true)]
        public bool IsCrop { get; set; }

        /// <summary>
        /// Gets or Sets Width
        /// </summary>
        [DataMember(Name = "width", EmitDefaultValue = true)]
        public int? Width { get; set; }

        /// <summary>
        /// Gets or Sets Height
        /// </summary>
        [DataMember(Name = "height", EmitDefaultValue = true)]
        public int? Height { 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 FacePhotoRequest {\n");
            sb.Append("  UserId: ").Append(UserId).Append("\n");
            sb.Append("  IsCrop: ").Append(IsCrop).Append("\n");
            sb.Append("  Width: ").Append(Width).Append("\n");
            sb.Append("  Height: ").Append(Height).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 FacePhotoRequest);
        }

        /// <summary>
        /// Returns true if FacePhotoRequest instances are equal
        /// </summary>
        /// <param name="input">Instance of FacePhotoRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FacePhotoRequest input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.UserId == input.UserId ||
                    (this.UserId != null &&
                    this.UserId.Equals(input.UserId))
                ) && 
                (
                    this.IsCrop == input.IsCrop ||
                    this.IsCrop.Equals(input.IsCrop)
                ) && 
                (
                    this.Width == input.Width ||
                    (this.Width != null &&
                    this.Width.Equals(input.Width))
                ) && 
                (
                    this.Height == input.Height ||
                    (this.Height != null &&
                    this.Height.Equals(input.Height))
                );
        }

        /// <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.UserId != null)
                {
                    hashCode = (hashCode * 59) + this.UserId.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.IsCrop.GetHashCode();
                if (this.Width != null)
                {
                    hashCode = (hashCode * 59) + this.Width.GetHashCode();
                }
                if (this.Height != null)
                {
                    hashCode = (hashCode * 59) + this.Height.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;
        }
    }

}
