/*
 * 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>
    /// UpdateAccessAclRequest
    /// </summary>
    [DataContract(Name = "UpdateAccessAclRequest")]
    public partial class UpdateAccessAclRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateAccessAclRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected UpdateAccessAclRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateAccessAclRequest" /> class.
        /// </summary>
        /// <param name="delete">delete.</param>
        /// <param name="groups">groups.</param>
        /// <param name="path">path (required).</param>
        /// <param name="propagate">propagate.</param>
        /// <param name="roles">roles (required).</param>
        /// <param name="tokens">tokens.</param>
        /// <param name="users">users.</param>
        public UpdateAccessAclRequest(bool delete = default(bool), string groups = default(string), string path = default(string), bool propagate = default(bool), string roles = default(string), string tokens = default(string), string users = default(string))
        {
            // to ensure "path" is required (not null)
            if (path == null)
            {
                throw new ArgumentNullException("path is a required property for UpdateAccessAclRequest and cannot be null");
            }
            this.Path = path;
            // to ensure "roles" is required (not null)
            if (roles == null)
            {
                throw new ArgumentNullException("roles is a required property for UpdateAccessAclRequest and cannot be null");
            }
            this.Roles = roles;
            this.Delete = delete;
            this.Groups = groups;
            this.Propagate = propagate;
            this.Tokens = tokens;
            this.Users = users;
        }

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Users
        /// </summary>
        [DataMember(Name = "users", EmitDefaultValue = false)]
        public string Users { 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 UpdateAccessAclRequest {\n");
            sb.Append("  Delete: ").Append(Delete).Append("\n");
            sb.Append("  Groups: ").Append(Groups).Append("\n");
            sb.Append("  Path: ").Append(Path).Append("\n");
            sb.Append("  Propagate: ").Append(Propagate).Append("\n");
            sb.Append("  Roles: ").Append(Roles).Append("\n");
            sb.Append("  Tokens: ").Append(Tokens).Append("\n");
            sb.Append("  Users: ").Append(Users).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;
        }
    }

}
