namespace PS.IPAM; using System; [Serializable] public class Subnetwork { public int Id { get; } public string Subnet { get; } public int Mask { get; } public int SectionId { get; } public string Description { get; } public string LinkedSubnet { get; } public string FirewallAddressObject { get; } public int VrfId { get; } public int MasterSubnetId { get; } public bool AllowRequests { get; } public int VlanId { get; } public bool ShowName { get; } public int DeviceId { get; } public string Permissions { get; } public bool PingSubnet { get; } public bool DiscoverSubnet { get; } public bool ResolveDNS { get; } public bool DNSRecursive { get; } public bool DNSRecords { get; } public int NameserverId { get; } public bool ScanAgent { get; } public bool IsFolder { get; } public bool IsFull { get; } public bool IsPool { get; } public int TagId { get; } public int Threshold { get; } public int LocationId { get; } public DateTime? EditDate { get; } public DateTime? LastScan { get; } public DateTime? LastDiscovery { get; } public Object Calculation { get; } public Object? ExtendedData { get; } public Subnetwork( int id, string subnet, int mask, int sectionId, string description, string linkedSubnet, string firewallAddressObject, int vrfId, int masterSubnetId, bool allowRequests, int vlanId, bool showName, int deviceId, string permissions, bool pingSubnet, bool discoverSubnet, bool resolveDNS, bool dnsRecursive, bool dnsRecords, int nameserverId, bool scanAgent, bool isFolder, bool isFull, bool isPool, int tagId, int threshold, int locationId, DateTime? editDate, DateTime? lastScan, DateTime? lastDiscovery, Object calculation, Object? custom_fields ) { this.Id = id; this.Subnet = subnet; this.Mask = mask; this.SectionId = sectionId; this.Description = description; this.LinkedSubnet = linkedSubnet; this.FirewallAddressObject = firewallAddressObject; this.VrfId = vrfId; this.MasterSubnetId = masterSubnetId; this.AllowRequests = allowRequests; this.VlanId = vlanId; this.ShowName = showName; this.DeviceId = deviceId; this.Permissions = permissions; this.PingSubnet = pingSubnet; this.DiscoverSubnet = discoverSubnet; this.ResolveDNS = resolveDNS; this.DNSRecursive = dnsRecursive; this.DNSRecords = dnsRecords; this.NameserverId = nameserverId; this.ScanAgent = scanAgent; this.IsFolder = isFolder; this.IsFull = isFull; this.IsPool = isPool; this.TagId = tagId; this.Threshold = threshold; this.LocationId = locationId; this.EditDate = editDate; this.LastScan = lastScan; this.LastDiscovery = lastDiscovery; this.Calculation = calculation; this.ExtendedData = custom_fields; } public string GetCIDR() { return $"{this.Subnet}/{this.Mask}"; } public override string ToString() { return this.GetCIDR(); } }