/* 
 * bSDD API prototype
 *
 * API to access the buildingSMART Data Dictionary
 *
 * OpenAPI spec version: v1
 * Contact: bsdd_support@buildingsmart.org
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;

namespace IO.Swagger.Model
{
    /// <summary>
    /// RequestExportFilePreviewBody
    /// </summary>
    [DataContract]
        public partial class RequestExportFilePreviewBody :  IEquatable<RequestExportFilePreviewBody>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RequestExportFilePreviewBody" /> class.
        /// </summary>
        /// <param name="xsltFormFile">The format the download should be in. Only applicable for Export Format &#x27;Custom&#x27;.</param>
        public RequestExportFilePreviewBody(byte[] xsltFormFile = default(byte[]))
        {
            this.XsltFormFile = xsltFormFile;
        }
        
        /// <summary>
        /// The format the download should be in. Only applicable for Export Format &#x27;Custom&#x27;
        /// </summary>
        /// <value>The format the download should be in. Only applicable for Export Format &#x27;Custom&#x27;</value>
        [DataMember(Name="XsltFormFile", EmitDefaultValue=false)]
        public byte[] XsltFormFile { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class RequestExportFilePreviewBody {\n");
            sb.Append("  XsltFormFile: ").Append(XsltFormFile).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 JsonConvert.SerializeObject(this, 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 RequestExportFilePreviewBody);
        }

        /// <summary>
        /// Returns true if RequestExportFilePreviewBody instances are equal
        /// </summary>
        /// <param name="input">Instance of RequestExportFilePreviewBody to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RequestExportFilePreviewBody input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.XsltFormFile == input.XsltFormFile ||
                    (this.XsltFormFile != null &&
                    this.XsltFormFile.Equals(input.XsltFormFile))
                );
        }

        /// <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.XsltFormFile != null)
                    hashCode = hashCode * 59 + this.XsltFormFile.GetHashCode();
                return hashCode;
            }
        }

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