/*
 * Bungie.Net API
 *
 * These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
 *
 * The version of the OpenAPI document: 2.18.0
 * Contact: support@bungie.com
 * 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 = Destiny.Client.OpenAPIDateConverter;

namespace Destiny.Model
{
    /// <summary>
    /// GroupsV2GroupBan
    /// </summary>
    [DataContract(Name = "GroupsV2.GroupBan")]
    public partial class GroupsV2GroupBan : IEquatable<GroupsV2GroupBan>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GroupsV2GroupBan" /> class.
        /// </summary>
        /// <param name="groupId">groupId.</param>
        /// <param name="lastModifiedBy">lastModifiedBy.</param>
        /// <param name="createdBy">createdBy.</param>
        /// <param name="dateBanned">dateBanned.</param>
        /// <param name="dateExpires">dateExpires.</param>
        /// <param name="comment">comment.</param>
        /// <param name="bungieNetUserInfo">bungieNetUserInfo.</param>
        /// <param name="destinyUserInfo">destinyUserInfo.</param>
        public GroupsV2GroupBan(long groupId = default(long), UserUserInfoCard lastModifiedBy = default(UserUserInfoCard), UserUserInfoCard createdBy = default(UserUserInfoCard), DateTime dateBanned = default(DateTime), DateTime dateExpires = default(DateTime), string comment = default(string), UserUserInfoCard bungieNetUserInfo = default(UserUserInfoCard), GroupsV2GroupUserInfoCard destinyUserInfo = default(GroupsV2GroupUserInfoCard))
        {
            this.GroupId = groupId;
            this.LastModifiedBy = lastModifiedBy;
            this.CreatedBy = createdBy;
            this.DateBanned = dateBanned;
            this.DateExpires = dateExpires;
            this.Comment = comment;
            this.BungieNetUserInfo = bungieNetUserInfo;
            this.DestinyUserInfo = destinyUserInfo;
        }

        /// <summary>
        /// Gets or Sets GroupId
        /// </summary>
        [DataMember(Name = "groupId", EmitDefaultValue = false)]
        public long GroupId { get; set; }

        /// <summary>
        /// Gets or Sets LastModifiedBy
        /// </summary>
        [DataMember(Name = "lastModifiedBy", EmitDefaultValue = false)]
        public UserUserInfoCard LastModifiedBy { get; set; }

        /// <summary>
        /// Gets or Sets CreatedBy
        /// </summary>
        [DataMember(Name = "createdBy", EmitDefaultValue = false)]
        public UserUserInfoCard CreatedBy { get; set; }

        /// <summary>
        /// Gets or Sets DateBanned
        /// </summary>
        [DataMember(Name = "dateBanned", EmitDefaultValue = false)]
        public DateTime DateBanned { get; set; }

        /// <summary>
        /// Gets or Sets DateExpires
        /// </summary>
        [DataMember(Name = "dateExpires", EmitDefaultValue = false)]
        public DateTime DateExpires { get; set; }

        /// <summary>
        /// Gets or Sets Comment
        /// </summary>
        [DataMember(Name = "comment", EmitDefaultValue = false)]
        public string Comment { get; set; }

        /// <summary>
        /// Gets or Sets BungieNetUserInfo
        /// </summary>
        [DataMember(Name = "bungieNetUserInfo", EmitDefaultValue = false)]
        public UserUserInfoCard BungieNetUserInfo { get; set; }

        /// <summary>
        /// Gets or Sets DestinyUserInfo
        /// </summary>
        [DataMember(Name = "destinyUserInfo", EmitDefaultValue = false)]
        public GroupsV2GroupUserInfoCard DestinyUserInfo { 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 GroupsV2GroupBan {\n");
            sb.Append("  GroupId: ").Append(GroupId).Append("\n");
            sb.Append("  LastModifiedBy: ").Append(LastModifiedBy).Append("\n");
            sb.Append("  CreatedBy: ").Append(CreatedBy).Append("\n");
            sb.Append("  DateBanned: ").Append(DateBanned).Append("\n");
            sb.Append("  DateExpires: ").Append(DateExpires).Append("\n");
            sb.Append("  Comment: ").Append(Comment).Append("\n");
            sb.Append("  BungieNetUserInfo: ").Append(BungieNetUserInfo).Append("\n");
            sb.Append("  DestinyUserInfo: ").Append(DestinyUserInfo).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 GroupsV2GroupBan);
        }

        /// <summary>
        /// Returns true if GroupsV2GroupBan instances are equal
        /// </summary>
        /// <param name="input">Instance of GroupsV2GroupBan to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GroupsV2GroupBan input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.GroupId == input.GroupId ||
                    this.GroupId.Equals(input.GroupId)
                ) && 
                (
                    this.LastModifiedBy == input.LastModifiedBy ||
                    (this.LastModifiedBy != null &&
                    this.LastModifiedBy.Equals(input.LastModifiedBy))
                ) && 
                (
                    this.CreatedBy == input.CreatedBy ||
                    (this.CreatedBy != null &&
                    this.CreatedBy.Equals(input.CreatedBy))
                ) && 
                (
                    this.DateBanned == input.DateBanned ||
                    (this.DateBanned != null &&
                    this.DateBanned.Equals(input.DateBanned))
                ) && 
                (
                    this.DateExpires == input.DateExpires ||
                    (this.DateExpires != null &&
                    this.DateExpires.Equals(input.DateExpires))
                ) && 
                (
                    this.Comment == input.Comment ||
                    (this.Comment != null &&
                    this.Comment.Equals(input.Comment))
                ) && 
                (
                    this.BungieNetUserInfo == input.BungieNetUserInfo ||
                    (this.BungieNetUserInfo != null &&
                    this.BungieNetUserInfo.Equals(input.BungieNetUserInfo))
                ) && 
                (
                    this.DestinyUserInfo == input.DestinyUserInfo ||
                    (this.DestinyUserInfo != null &&
                    this.DestinyUserInfo.Equals(input.DestinyUserInfo))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                hashCode = (hashCode * 59) + this.GroupId.GetHashCode();
                if (this.LastModifiedBy != null)
                {
                    hashCode = (hashCode * 59) + this.LastModifiedBy.GetHashCode();
                }
                if (this.CreatedBy != null)
                {
                    hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode();
                }
                if (this.DateBanned != null)
                {
                    hashCode = (hashCode * 59) + this.DateBanned.GetHashCode();
                }
                if (this.DateExpires != null)
                {
                    hashCode = (hashCode * 59) + this.DateExpires.GetHashCode();
                }
                if (this.Comment != null)
                {
                    hashCode = (hashCode * 59) + this.Comment.GetHashCode();
                }
                if (this.BungieNetUserInfo != null)
                {
                    hashCode = (hashCode * 59) + this.BungieNetUserInfo.GetHashCode();
                }
                if (this.DestinyUserInfo != null)
                {
                    hashCode = (hashCode * 59) + this.DestinyUserInfo.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;
        }
    }

}
