105 lines
3.0 KiB
C#
105 lines
3.0 KiB
C#
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 DNSRecursive { get; }
|
|
public bool DNSRecords { get; }
|
|
public int NameserverId { get; }
|
|
public bool ScanAgent { get; }
|
|
public bool IsFolder { get; }
|
|
public bool IsFull { 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 bool ResolveDNS { 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 dnsRecursive,
|
|
bool dnsRecords,
|
|
int nameserverId,
|
|
bool scanAgent,
|
|
bool isFolder,
|
|
bool isFull,
|
|
int tagId,
|
|
int threshold,
|
|
int locationId,
|
|
DateTime? editDate,
|
|
DateTime? lastScan,
|
|
DateTime? lastDiscovery,
|
|
bool resolveDNS
|
|
) {
|
|
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.DNSRecursive = dnsRecursive;
|
|
this.DNSRecords = dnsRecords;
|
|
this.NameserverId = nameserverId;
|
|
this.ScanAgent = scanAgent;
|
|
this.IsFolder = isFolder;
|
|
this.IsFull = isFull;
|
|
this.TagId = tagId;
|
|
this.Threshold = threshold;
|
|
this.LocationId = locationId;
|
|
this.EditDate = editDate;
|
|
this.LastScan = lastScan;
|
|
this.LastDiscovery = lastDiscovery;
|
|
this.ResolveDNS = resolveDNS;
|
|
}
|
|
|
|
public string GetCIDR() {
|
|
return $"{this.Subnet}/{this.Mask}";
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return this.GetCIDR();
|
|
}
|
|
} |