/*
 * 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>
    /// Information about bridge ports.
    /// </summary>
    [DataContract(Name = "getNodesSingleSdnZonesSingleBridges_200_response_data_inner_ports_inner")]
    public partial class GetNodesSingleSdnZonesSingleBridges200ResponseDataInnerPortsInner : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetNodesSingleSdnZonesSingleBridges200ResponseDataInnerPortsInner" /> class.
        /// </summary>
        /// <param name="index">The index of the guests network device that this interface belongs to..</param>
        /// <param name="name">The name of the bridge port..</param>
        /// <param name="primaryVlan">The primary VLAN configured for the port of this bridge (&#x3D; PVID). Only for VLAN-aware bridges..</param>
        /// <param name="vlans">A list of VLANs and VLAN ranges that are allowed for this bridge port in addition to the primary VLAN. Only for VLAN-aware bridges..</param>
        /// <param name="vmid">The ID of the guest that this interface belongs to..</param>
        public GetNodesSingleSdnZonesSingleBridges200ResponseDataInnerPortsInner(string index = default(string), string name = default(string), decimal primaryVlan = default(decimal), List<string> vlans = default(List<string>), decimal vmid = default(decimal))
        {
            this.Index = index;
            this.Name = name;
            this.PrimaryVlan = primaryVlan;
            this.Vlans = vlans;
            this.Vmid = vmid;
        }

        /// <summary>
        /// The index of the guests network device that this interface belongs to.
        /// </summary>
        /// <value>The index of the guests network device that this interface belongs to.</value>
        [DataMember(Name = "index", EmitDefaultValue = false)]
        public string Index { get; set; }

        /// <summary>
        /// The name of the bridge port.
        /// </summary>
        /// <value>The name of the bridge port.</value>
        [DataMember(Name = "name", EmitDefaultValue = false)]
        public string Name { get; set; }

        /// <summary>
        /// The primary VLAN configured for the port of this bridge (&#x3D; PVID). Only for VLAN-aware bridges.
        /// </summary>
        /// <value>The primary VLAN configured for the port of this bridge (&#x3D; PVID). Only for VLAN-aware bridges.</value>
        [DataMember(Name = "primary_vlan", EmitDefaultValue = false)]
        public decimal PrimaryVlan { get; set; }

        /// <summary>
        /// A list of VLANs and VLAN ranges that are allowed for this bridge port in addition to the primary VLAN. Only for VLAN-aware bridges.
        /// </summary>
        /// <value>A list of VLANs and VLAN ranges that are allowed for this bridge port in addition to the primary VLAN. Only for VLAN-aware bridges.</value>
        [DataMember(Name = "vlans", EmitDefaultValue = false)]
        public List<string> Vlans { get; set; }

        /// <summary>
        /// The ID of the guest that this interface belongs to.
        /// </summary>
        /// <value>The ID of the guest that this interface belongs to.</value>
        [DataMember(Name = "vmid", EmitDefaultValue = false)]
        public decimal Vmid { 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 GetNodesSingleSdnZonesSingleBridges200ResponseDataInnerPortsInner {\n");
            sb.Append("  Index: ").Append(Index).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  PrimaryVlan: ").Append(PrimaryVlan).Append("\n");
            sb.Append("  Vlans: ").Append(Vlans).Append("\n");
            sb.Append("  Vmid: ").Append(Vmid).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;
        }
    }

}
