/*
 * 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>
    /// CreateClusterSdnVnetsSingleFirewallRulesRequest
    /// </summary>
    [DataContract(Name = "CreateClusterSdnVnetsSingleFirewallRulesRequest")]
    public partial class CreateClusterSdnVnetsSingleFirewallRulesRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateClusterSdnVnetsSingleFirewallRulesRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateClusterSdnVnetsSingleFirewallRulesRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateClusterSdnVnetsSingleFirewallRulesRequest" /> class.
        /// </summary>
        /// <param name="action">action (required).</param>
        /// <param name="comment">comment.</param>
        /// <param name="dest">dest.</param>
        /// <param name="digest">digest.</param>
        /// <param name="dport">dport.</param>
        /// <param name="enable">enable.</param>
        /// <param name="icmpType">icmpType.</param>
        /// <param name="iface">iface.</param>
        /// <param name="log">log.</param>
        /// <param name="macro">macro.</param>
        /// <param name="pos">pos.</param>
        /// <param name="proto">proto.</param>
        /// <param name="source">source.</param>
        /// <param name="sport">sport.</param>
        /// <param name="type">type (required).</param>
        public CreateClusterSdnVnetsSingleFirewallRulesRequest(string action = default(string), string comment = default(string), string dest = default(string), string digest = default(string), string dport = default(string), int enable = default(int), string icmpType = default(string), string iface = default(string), string log = default(string), string macro = default(string), int pos = default(int), string proto = default(string), string source = default(string), string sport = default(string), string type = default(string))
        {
            // to ensure "action" is required (not null)
            if (action == null)
            {
                throw new ArgumentNullException("action is a required property for CreateClusterSdnVnetsSingleFirewallRulesRequest and cannot be null");
            }
            this.Action = action;
            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new ArgumentNullException("type is a required property for CreateClusterSdnVnetsSingleFirewallRulesRequest and cannot be null");
            }
            this.Type = type;
            this.Comment = comment;
            this.Dest = dest;
            this.Digest = digest;
            this.Dport = dport;
            this.Enable = enable;
            this.IcmpType = icmpType;
            this.Iface = iface;
            this.Log = log;
            this.Macro = macro;
            this.Pos = pos;
            this.Proto = proto;
            this.Source = source;
            this.Sport = sport;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Type
        /// </summary>
        [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
        public string Type { 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 CreateClusterSdnVnetsSingleFirewallRulesRequest {\n");
            sb.Append("  Action: ").Append(Action).Append("\n");
            sb.Append("  Comment: ").Append(Comment).Append("\n");
            sb.Append("  Dest: ").Append(Dest).Append("\n");
            sb.Append("  Digest: ").Append(Digest).Append("\n");
            sb.Append("  Dport: ").Append(Dport).Append("\n");
            sb.Append("  Enable: ").Append(Enable).Append("\n");
            sb.Append("  IcmpType: ").Append(IcmpType).Append("\n");
            sb.Append("  Iface: ").Append(Iface).Append("\n");
            sb.Append("  Log: ").Append(Log).Append("\n");
            sb.Append("  Macro: ").Append(Macro).Append("\n");
            sb.Append("  Pos: ").Append(Pos).Append("\n");
            sb.Append("  Proto: ").Append(Proto).Append("\n");
            sb.Append("  Source: ").Append(Source).Append("\n");
            sb.Append("  Sport: ").Append(Sport).Append("\n");
            sb.Append("  Type: ").Append(Type).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;
        }
    }

}
