Refactor IPAM model classes to use records for Address, Subnetwork, Vlan, Vrf, Section, Tag, Domain, Nameserver, and Session; enhance documentation and implement value equality for records.
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
namespace PS.IPAM;
|
||||
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the authentication method for phpIPAM API.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public enum AuthType {
|
||||
credentials,
|
||||
token
|
||||
}
|
||||
public enum AuthType
|
||||
{
|
||||
/// <summary>
|
||||
/// Authentication using username and password credentials.
|
||||
/// </summary>
|
||||
Credentials,
|
||||
|
||||
/// <summary>
|
||||
/// Authentication using a static API token.
|
||||
/// </summary>
|
||||
Token
|
||||
}
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
namespace PS.IPAM;
|
||||
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the main API controllers in phpIPAM.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public enum controllers {
|
||||
user,
|
||||
vlan,
|
||||
subnets,
|
||||
addresses,
|
||||
sections,
|
||||
vrf,
|
||||
l2domains,
|
||||
tools
|
||||
}
|
||||
public enum ApiController
|
||||
{
|
||||
User,
|
||||
Vlan,
|
||||
Subnets,
|
||||
Addresses,
|
||||
Sections,
|
||||
Vrf,
|
||||
L2Domains,
|
||||
Tools
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
namespace PS.IPAM;
|
||||
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Represents sub-controllers/endpoints within main API controllers.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public enum subcontrollers {
|
||||
nameservers,
|
||||
tags,
|
||||
devices,
|
||||
device_types,
|
||||
vlans,
|
||||
vrfs,
|
||||
scanagents,
|
||||
locations,
|
||||
nat,
|
||||
racks
|
||||
}
|
||||
public enum ApiSubController
|
||||
{
|
||||
Nameservers,
|
||||
Tags,
|
||||
Devices,
|
||||
DeviceTypes,
|
||||
Vlans,
|
||||
Vrfs,
|
||||
ScanAgents,
|
||||
Locations,
|
||||
Nat,
|
||||
Racks
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
namespace PS.IPAM;
|
||||
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the model types returned by the phpIPAM API.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public enum types {
|
||||
public enum ModelType
|
||||
{
|
||||
Address,
|
||||
Domain,
|
||||
Section,
|
||||
@@ -11,4 +16,4 @@ public enum types {
|
||||
Tag,
|
||||
Vlan,
|
||||
Vrf
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user