/*
 * Tribufu API
 *
 * REST API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.1.0
 * 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.Generated.Client.OpenAPIDateConverter;

namespace Tribufu.Generated.Model
{
    /// <summary>
    /// TokenRequest
    /// </summary>
    [DataContract(Name = "TokenRequest")]
    public partial class TokenRequest : IValidatableObject
    {

        /// <summary>
        /// Gets or Sets GrantType
        /// </summary>
        [DataMember(Name = "grant_type", EmitDefaultValue = false)]
        public GrantType? GrantType { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="TokenRequest" /> class.
        /// </summary>
        /// <param name="grantType">grantType.</param>
        /// <param name="code">code.</param>
        /// <param name="username">username.</param>
        /// <param name="password">password.</param>
        /// <param name="refreshToken">refreshToken.</param>
        /// <param name="clientId">clientId.</param>
        /// <param name="redirectUri">redirectUri.</param>
        /// <param name="codeVerifier">codeVerifier.</param>
        public TokenRequest(GrantType? grantType = default(GrantType?), string code = default(string), string username = default(string), string password = default(string), string refreshToken = default(string), string clientId = default(string), string redirectUri = default(string), string codeVerifier = default(string))
        {
            this.GrantType = grantType;
            this.Code = code;
            this.Username = username;
            this.Password = password;
            this.RefreshToken = refreshToken;
            this.ClientId = clientId;
            this.RedirectUri = redirectUri;
            this.CodeVerifier = codeVerifier;
        }

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets CodeVerifier
        /// </summary>
        [DataMember(Name = "code_verifier", EmitDefaultValue = true)]
        public string CodeVerifier { 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 TokenRequest {\n");
            sb.Append("  GrantType: ").Append(GrantType).Append("\n");
            sb.Append("  Code: ").Append(Code).Append("\n");
            sb.Append("  Username: ").Append(Username).Append("\n");
            sb.Append("  Password: ").Append(Password).Append("\n");
            sb.Append("  RefreshToken: ").Append(RefreshToken).Append("\n");
            sb.Append("  ClientId: ").Append(ClientId).Append("\n");
            sb.Append("  RedirectUri: ").Append(RedirectUri).Append("\n");
            sb.Append("  CodeVerifier: ").Append(CodeVerifier).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;
        }
    }

}
