initial source commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class Enrol : ServiceBase<EnrolResponse>
|
||||
{
|
||||
public override string Feature
|
||||
{
|
||||
get { return "Enrol"; }
|
||||
}
|
||||
|
||||
public string DeviceSerialNumber { get; set; }
|
||||
public string DeviceUUID { get; set; }
|
||||
|
||||
public string DeviceComputerName { get; set; }
|
||||
public bool DeviceIsPartOfDomain { get; set; }
|
||||
|
||||
public string DeviceManufacturer { get; set; }
|
||||
public string DeviceModel { get; set; }
|
||||
public string DeviceModelType { get; set; }
|
||||
|
||||
public string DeviceLanMacAddress { get; set; }
|
||||
|
||||
public string DeviceWlanMacAddress { get; set; }
|
||||
|
||||
public List<string> DeviceCertificates { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class EnrolResponse
|
||||
{
|
||||
public string SessionId { get; set; }
|
||||
|
||||
public string DeviceDomainName { get; set; }
|
||||
public string DeviceComputerName { get; set; }
|
||||
|
||||
public string DeviceAssignedUserDomain { get; set; }
|
||||
public string DeviceAssignedUserName { get; set; }
|
||||
public string DeviceAssignedUserSID { get; set; }
|
||||
public string DeviceAssignedUserUsername { get; set; }
|
||||
|
||||
public string OfflineDomainJoin { get; set; }
|
||||
|
||||
public string DeviceCertificate { get; set; }
|
||||
public List<string> DeviceCertificateRemoveExisting { get; set; }
|
||||
|
||||
// Actions
|
||||
public bool AllowBootstrapperUninstall { get; set; }
|
||||
public bool RequireReboot { get; set; }
|
||||
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class MacEnrol : ServiceBase<MacEnrolResponse>
|
||||
{
|
||||
public override string Feature
|
||||
{
|
||||
get { return "MacEnrol"; }
|
||||
}
|
||||
|
||||
public string DeviceSerialNumber { get; set; }
|
||||
public string DeviceUUID { get; set; }
|
||||
|
||||
public string DeviceComputerName { get; set; }
|
||||
|
||||
public string DeviceManufacturer { get; set; }
|
||||
public string DeviceModel { get; set; }
|
||||
public string DeviceModelType { get; set; }
|
||||
|
||||
public string DeviceLanMacAddress { get; set; }
|
||||
|
||||
public string DeviceWlanMacAddress { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class MacEnrolResponse
|
||||
{
|
||||
public string DeviceComputerName { get; set; }
|
||||
|
||||
public string DeviceAssignedUserDomain { get; set; }
|
||||
public string DeviceAssignedUserName { get; set; }
|
||||
public string DeviceAssignedUserSID { get; set; }
|
||||
public string DeviceAssignedUserUsername { get; set; }
|
||||
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class MacSecureEnrolResponse
|
||||
{
|
||||
public string DeviceComputerName { get; set; }
|
||||
|
||||
public string DeviceAssignedUserDomain { get; set; }
|
||||
public string DeviceAssignedUserName { get; set; }
|
||||
public string DeviceAssignedUserSID { get; set; }
|
||||
public string DeviceAssignedUserUsername { get; set; }
|
||||
|
||||
public string ErrorMessage { get; set; }
|
||||
|
||||
public static MacSecureEnrolResponse FromMacEnrolResponse(MacEnrolResponse mer)
|
||||
{
|
||||
return new MacSecureEnrolResponse
|
||||
{
|
||||
DeviceComputerName = mer.DeviceComputerName,
|
||||
DeviceAssignedUserDomain = mer.DeviceAssignedUserDomain,
|
||||
DeviceAssignedUserName = mer.DeviceAssignedUserName,
|
||||
DeviceAssignedUserSID = mer.DeviceAssignedUserSID,
|
||||
DeviceAssignedUserUsername = mer.DeviceAssignedUserUsername
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public abstract class ServiceBase<ResponseType>
|
||||
{
|
||||
internal ServiceBase()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract string Feature { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class WhoAmI : ServiceBase<WhoAmIResponse>
|
||||
{
|
||||
|
||||
public override string Feature
|
||||
{
|
||||
get { return "WhoAmI"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Disco.Models.ClientServices
|
||||
{
|
||||
public class WhoAmIResponse
|
||||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Username { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} ({1})", DisplayName, Username);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user