/*
 * ProxMox VE API
 *
 * ProxMox VE API
 *
 * The version of the OpenAPI document: 2.0
 * Contact: support@lumaserv.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 = ProxmoxSharp.Client.OpenAPIDateConverter;

namespace ProxmoxSharp.Model
{
    /// <summary>
    /// CreateAccessOpenidLoginRequest
    /// </summary>
    [DataContract(Name = "CreateAccessOpenidLoginRequest")]
    public partial class CreateAccessOpenidLoginRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessOpenidLoginRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateAccessOpenidLoginRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessOpenidLoginRequest" /> class.
        /// </summary>
        /// <param name="code">code (required).</param>
        /// <param name="redirectUrl">redirectUrl (required).</param>
        /// <param name="state">state (required).</param>
        public CreateAccessOpenidLoginRequest(string code = default(string), string redirectUrl = default(string), string state = default(string))
        {
            // to ensure "code" is required (not null)
            if (code == null)
            {
                throw new ArgumentNullException("code is a required property for CreateAccessOpenidLoginRequest and cannot be null");
            }
            this.Code = code;
            // to ensure "redirectUrl" is required (not null)
            if (redirectUrl == null)
            {
                throw new ArgumentNullException("redirectUrl is a required property for CreateAccessOpenidLoginRequest and cannot be null");
            }
            this.RedirectUrl = redirectUrl;
            // to ensure "state" is required (not null)
            if (state == null)
            {
                throw new ArgumentNullException("state is a required property for CreateAccessOpenidLoginRequest and cannot be null");
            }
            this.State = state;
        }

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

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

        /// <summary>
        /// Gets or Sets State
        /// </summary>
        [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)]
        public string State { 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 CreateAccessOpenidLoginRequest {\n");
            sb.Append("  Code: ").Append(Code).Append("\n");
            sb.Append("  RedirectUrl: ").Append(RedirectUrl).Append("\n");
            sb.Append("  State: ").Append(State).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;
        }
    }

}
