/*
 * Tribufu API
 *
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.2.6
 * Contact: contact@tribufu.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 = Tribufu.Client.OpenAPIDateConverter;

namespace Tribufu.Model
{
    /// <summary>
    /// GroupGame
    /// </summary>
    [DataContract(Name = "GroupGame")]
    public partial class GroupGame : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GroupGame" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected GroupGame() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="GroupGame" /> class.
        /// </summary>
        /// <param name="groupId">groupId (required).</param>
        /// <param name="group">group.</param>
        /// <param name="applicationId">applicationId.</param>
        /// <param name="application">application.</param>
        /// <param name="stats">stats.</param>
        /// <param name="acquired">acquired.</param>
        /// <param name="lastUsed">lastUsed.</param>
        public GroupGame(string groupId = default(string), Group group = default(Group), string applicationId = default(string), Application application = default(Application), Object stats = default(Object), DateTime acquired = default(DateTime), DateTime? lastUsed = default(DateTime?))
        {
            // to ensure "groupId" is required (not null)
            if (groupId == null)
            {
                throw new ArgumentNullException("groupId is a required property for GroupGame and cannot be null");
            }
            this.GroupId = groupId;
            this.Group = group;
            this.ApplicationId = applicationId;
            this.Application = application;
            this.Stats = stats;
            this.Acquired = acquired;
            this.LastUsed = lastUsed;
        }

        /// <summary>
        /// Gets or Sets GroupId
        /// </summary>
        [DataMember(Name = "group_id", IsRequired = true, EmitDefaultValue = true)]
        public string GroupId { get; set; }

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

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

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

        /// <summary>
        /// Gets or Sets Stats
        /// </summary>
        [DataMember(Name = "stats", EmitDefaultValue = true)]
        public Object Stats { get; set; }

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

        /// <summary>
        /// Gets or Sets LastUsed
        /// </summary>
        [DataMember(Name = "last_used", EmitDefaultValue = true)]
        public DateTime? LastUsed { 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 GroupGame {\n");
            sb.Append("  GroupId: ").Append(GroupId).Append("\n");
            sb.Append("  Group: ").Append(Group).Append("\n");
            sb.Append("  ApplicationId: ").Append(ApplicationId).Append("\n");
            sb.Append("  Application: ").Append(Application).Append("\n");
            sb.Append("  Stats: ").Append(Stats).Append("\n");
            sb.Append("  Acquired: ").Append(Acquired).Append("\n");
            sb.Append("  LastUsed: ").Append(LastUsed).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>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
