/*
 * 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>
    /// CreateClusterSdnVnetsSingleSubnetsRequest
    /// </summary>
    [DataContract(Name = "CreateClusterSdnVnetsSingleSubnetsRequest")]
    public partial class CreateClusterSdnVnetsSingleSubnetsRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateClusterSdnVnetsSingleSubnetsRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateClusterSdnVnetsSingleSubnetsRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateClusterSdnVnetsSingleSubnetsRequest" /> class.
        /// </summary>
        /// <param name="dhcpDnsServer">dhcpDnsServer.</param>
        /// <param name="dhcpRange">dhcpRange.</param>
        /// <param name="dnszoneprefix">dnszoneprefix.</param>
        /// <param name="gateway">gateway.</param>
        /// <param name="lockToken">lockToken.</param>
        /// <param name="snat">snat.</param>
        /// <param name="subnet">subnet (required).</param>
        /// <param name="type">type (required).</param>
        public CreateClusterSdnVnetsSingleSubnetsRequest(string dhcpDnsServer = default(string), List<string> dhcpRange = default(List<string>), string dnszoneprefix = default(string), string gateway = default(string), string lockToken = default(string), bool snat = default(bool), string subnet = default(string), string type = default(string))
        {
            // to ensure "subnet" is required (not null)
            if (subnet == null)
            {
                throw new ArgumentNullException("subnet is a required property for CreateClusterSdnVnetsSingleSubnetsRequest and cannot be null");
            }
            this.Subnet = subnet;
            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new ArgumentNullException("type is a required property for CreateClusterSdnVnetsSingleSubnetsRequest and cannot be null");
            }
            this.Type = type;
            this.DhcpDnsServer = dhcpDnsServer;
            this.DhcpRange = dhcpRange;
            this.Dnszoneprefix = dnszoneprefix;
            this.Gateway = gateway;
            this.LockToken = lockToken;
            this.Snat = snat;
        }

        /// <summary>
        /// Gets or Sets DhcpDnsServer
        /// </summary>
        [DataMember(Name = "dhcp-dns-server", EmitDefaultValue = false)]
        public string DhcpDnsServer { get; set; }

        /// <summary>
        /// Gets or Sets DhcpRange
        /// </summary>
        [DataMember(Name = "dhcp-range", EmitDefaultValue = false)]
        public List<string> DhcpRange { get; set; }

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

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

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

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

        /// <summary>
        /// Gets or Sets Subnet
        /// </summary>
        [DataMember(Name = "subnet", IsRequired = true, EmitDefaultValue = true)]
        public string Subnet { 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 CreateClusterSdnVnetsSingleSubnetsRequest {\n");
            sb.Append("  DhcpDnsServer: ").Append(DhcpDnsServer).Append("\n");
            sb.Append("  DhcpRange: ").Append(DhcpRange).Append("\n");
            sb.Append("  Dnszoneprefix: ").Append(Dnszoneprefix).Append("\n");
            sb.Append("  Gateway: ").Append(Gateway).Append("\n");
            sb.Append("  LockToken: ").Append(LockToken).Append("\n");
            sb.Append("  Snat: ").Append(Snat).Append("\n");
            sb.Append("  Subnet: ").Append(Subnet).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;
        }
    }

}
