/// <summary> /// Create model /// </summary> /// <param name="model"></param> public TrustGroupApiModel(TrustGroupModel model) { Name = model.Name; ParentId = model.ParentId; Type = model.Type; SubjectName = model.SubjectName; IssuedKeySize = model.IssuedKeySize; IssuedLifetime = model.IssuedLifetime; IssuedSignatureAlgorithm = model.IssuedSignatureAlgorithm; KeySize = model.KeySize; Lifetime = model.Lifetime; SignatureAlgorithm = model.SignatureAlgorithm; }
/// <summary> /// Create model /// </summary> /// <param name="model"></param> public static TrustGroupApiModel ToApiModel( this TrustGroupModel model) { if (model == null) { return(null); } return(new TrustGroupApiModel { Name = model.Name, ParentId = model.ParentId, Type = (IIoT.OpcUa.Api.Vault.Models.TrustGroupType)model.Type, SubjectName = model.SubjectName, IssuedKeySize = model.IssuedKeySize, IssuedLifetime = model.IssuedLifetime, IssuedSignatureAlgorithm = (IIoT.OpcUa.Api.Vault.Models.SignatureAlgorithm)model.IssuedSignatureAlgorithm, KeySize = model.KeySize, Lifetime = model.Lifetime, SignatureAlgorithm = (IIoT.OpcUa.Api.Vault.Models.SignatureAlgorithm)model.SignatureAlgorithm }); }