techgarage-ir.MTWireGuard/MikrotikAPI/Models/WGServer.cs

59 lines
1.8 KiB
C#
Raw Normal View History

2023-03-03 23:24:18 +03:30
using Newtonsoft.Json;
2023-06-02 15:26:29 +03:30
using System;
using System.Collections.Generic;
2023-03-03 23:24:18 +03:30
using System.ComponentModel;
2023-06-02 15:26:29 +03:30
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2023-03-03 23:24:18 +03:30
2023-06-02 15:26:29 +03:30
namespace MikrotikAPI.Models
2023-03-03 23:24:18 +03:30
{
public class WGServer
{
[JsonProperty(".id")]
public string Id { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("disabled")]
public bool Disabled { get; set; }
[JsonProperty("listen-port")]
public string ListenPort { get; set; }
[JsonProperty("mtu")]
public string MTU { get; set; }
[JsonProperty("private-key")]
public string PrivateKey { get; set; }
[JsonProperty("public-key")]
public string PublicKey { get; set; }
[JsonProperty("running")]
public bool Running { get; set; }
}
public class WGServerCreateModel
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("disabled"), DefaultValue(false)]
public bool Disabled { get; set; }
[JsonProperty("listen-port")]
public ushort ListenPort { get; set; }
[JsonProperty("mtu")]
public ushort MTU { get; set; }
[JsonProperty("private-key")]
public string PrivateKey { get; set; }
}
public class WGServerUpdateModel
{
[JsonProperty(".id")]
public string Id { get; set; }
[JsonProperty("name"), DefaultValue("")]
public string Name { get; set; }
[JsonProperty("listen-port"), DefaultValue(0)]
public ushort ListenPort { get; set; }
[JsonProperty("mtu"), DefaultValue(0)]
public ushort MTU { get; set; }
[JsonProperty("private-key"), DefaultValue("")]
public string PrivateKey { get; set; }
}
}