52 lines
1.1 KiB
C#
52 lines
1.1 KiB
C#
namespace PS.IPAM;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
/// <summary>
|
|
/// Represents a subnet/network in phpIPAM.
|
|
/// </summary>
|
|
[Serializable]
|
|
public sealed record 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,
|
|
Dictionary<string, object>? ExtendedData = null
|
|
)
|
|
{
|
|
/// <summary>
|
|
/// Gets the subnet in CIDR notation (e.g., "192.168.1.0/24").
|
|
/// </summary>
|
|
public string CIDR => $"{Subnet}/{Mask}";
|
|
|
|
public override string ToString() => CIDR;
|
|
}
|