/*
 * 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>
    /// CreateNodesSingleNetworkRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleNetworkRequest")]
    public partial class CreateNodesSingleNetworkRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleNetworkRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleNetworkRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleNetworkRequest" /> class.
        /// </summary>
        /// <param name="address">address.</param>
        /// <param name="address6">address6.</param>
        /// <param name="autostart">autostart.</param>
        /// <param name="bondPrimary">bondPrimary.</param>
        /// <param name="bondMode">bondMode.</param>
        /// <param name="bondXmitHashPolicy">bondXmitHashPolicy.</param>
        /// <param name="bridgePorts">bridgePorts.</param>
        /// <param name="bridgeVids">bridgeVids.</param>
        /// <param name="bridgeVlanAware">bridgeVlanAware.</param>
        /// <param name="cidr">cidr.</param>
        /// <param name="cidr6">cidr6.</param>
        /// <param name="comments">comments.</param>
        /// <param name="comments6">comments6.</param>
        /// <param name="gateway">gateway.</param>
        /// <param name="gateway6">gateway6.</param>
        /// <param name="iface">iface (required).</param>
        /// <param name="mtu">mtu.</param>
        /// <param name="netmask">netmask.</param>
        /// <param name="netmask6">netmask6.</param>
        /// <param name="ovsBonds">ovsBonds.</param>
        /// <param name="ovsBridge">ovsBridge.</param>
        /// <param name="ovsOptions">ovsOptions.</param>
        /// <param name="ovsPorts">ovsPorts.</param>
        /// <param name="ovsTag">ovsTag.</param>
        /// <param name="slaves">slaves.</param>
        /// <param name="type">type (required).</param>
        /// <param name="vlanId">vlanId.</param>
        /// <param name="vlanRawDevice">vlanRawDevice.</param>
        public CreateNodesSingleNetworkRequest(string address = default(string), string address6 = default(string), bool autostart = default(bool), string bondPrimary = default(string), string bondMode = default(string), string bondXmitHashPolicy = default(string), string bridgePorts = default(string), string bridgeVids = default(string), bool bridgeVlanAware = default(bool), string cidr = default(string), string cidr6 = default(string), string comments = default(string), string comments6 = default(string), string gateway = default(string), string gateway6 = default(string), string iface = default(string), int mtu = default(int), string netmask = default(string), int netmask6 = default(int), string ovsBonds = default(string), string ovsBridge = default(string), string ovsOptions = default(string), string ovsPorts = default(string), int ovsTag = default(int), string slaves = default(string), string type = default(string), int vlanId = default(int), string vlanRawDevice = default(string))
        {
            // to ensure "iface" is required (not null)
            if (iface == null)
            {
                throw new ArgumentNullException("iface is a required property for CreateNodesSingleNetworkRequest and cannot be null");
            }
            this.Iface = iface;
            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new ArgumentNullException("type is a required property for CreateNodesSingleNetworkRequest and cannot be null");
            }
            this.Type = type;
            this.Address = address;
            this.Address6 = address6;
            this.Autostart = autostart;
            this.BondPrimary = bondPrimary;
            this.BondMode = bondMode;
            this.BondXmitHashPolicy = bondXmitHashPolicy;
            this.BridgePorts = bridgePorts;
            this.BridgeVids = bridgeVids;
            this.BridgeVlanAware = bridgeVlanAware;
            this.Cidr = cidr;
            this.Cidr6 = cidr6;
            this.Comments = comments;
            this.Comments6 = comments6;
            this.Gateway = gateway;
            this.Gateway6 = gateway6;
            this.Mtu = mtu;
            this.Netmask = netmask;
            this.Netmask6 = netmask6;
            this.OvsBonds = ovsBonds;
            this.OvsBridge = ovsBridge;
            this.OvsOptions = ovsOptions;
            this.OvsPorts = ovsPorts;
            this.OvsTag = ovsTag;
            this.Slaves = slaves;
            this.VlanId = vlanId;
            this.VlanRawDevice = vlanRawDevice;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets VlanRawDevice
        /// </summary>
        [DataMember(Name = "vlan-raw-device", EmitDefaultValue = false)]
        public string VlanRawDevice { 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 CreateNodesSingleNetworkRequest {\n");
            sb.Append("  Address: ").Append(Address).Append("\n");
            sb.Append("  Address6: ").Append(Address6).Append("\n");
            sb.Append("  Autostart: ").Append(Autostart).Append("\n");
            sb.Append("  BondPrimary: ").Append(BondPrimary).Append("\n");
            sb.Append("  BondMode: ").Append(BondMode).Append("\n");
            sb.Append("  BondXmitHashPolicy: ").Append(BondXmitHashPolicy).Append("\n");
            sb.Append("  BridgePorts: ").Append(BridgePorts).Append("\n");
            sb.Append("  BridgeVids: ").Append(BridgeVids).Append("\n");
            sb.Append("  BridgeVlanAware: ").Append(BridgeVlanAware).Append("\n");
            sb.Append("  Cidr: ").Append(Cidr).Append("\n");
            sb.Append("  Cidr6: ").Append(Cidr6).Append("\n");
            sb.Append("  Comments: ").Append(Comments).Append("\n");
            sb.Append("  Comments6: ").Append(Comments6).Append("\n");
            sb.Append("  Gateway: ").Append(Gateway).Append("\n");
            sb.Append("  Gateway6: ").Append(Gateway6).Append("\n");
            sb.Append("  Iface: ").Append(Iface).Append("\n");
            sb.Append("  Mtu: ").Append(Mtu).Append("\n");
            sb.Append("  Netmask: ").Append(Netmask).Append("\n");
            sb.Append("  Netmask6: ").Append(Netmask6).Append("\n");
            sb.Append("  OvsBonds: ").Append(OvsBonds).Append("\n");
            sb.Append("  OvsBridge: ").Append(OvsBridge).Append("\n");
            sb.Append("  OvsOptions: ").Append(OvsOptions).Append("\n");
            sb.Append("  OvsPorts: ").Append(OvsPorts).Append("\n");
            sb.Append("  OvsTag: ").Append(OvsTag).Append("\n");
            sb.Append("  Slaves: ").Append(Slaves).Append("\n");
            sb.Append("  Type: ").Append(Type).Append("\n");
            sb.Append("  VlanId: ").Append(VlanId).Append("\n");
            sb.Append("  VlanRawDevice: ").Append(VlanRawDevice).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;
        }
    }

}
