/// <summary> /// Create service model from model /// </summary> public ApplicationInfoModel ToServiceModel() { return(new ApplicationInfoModel { ApplicationId = ApplicationId, ApplicationType = ApplicationType, ApplicationUri = ApplicationUri, ApplicationName = ApplicationName, Locale = Locale, LocalizedNames = LocalizedNames, Certificate = Certificate, ProductUri = ProductUri, SiteId = SiteId, HostAddresses = HostAddresses, SupervisorId = SupervisorId, DiscoveryProfileUri = DiscoveryProfileUri, DiscoveryUrls = DiscoveryUrls, Capabilities = Capabilities, NotSeenSince = NotSeenSince, State = State, GatewayServerUri = GatewayServerUri, Created = Created?.ToServiceModel(), Approved = Approved?.ToServiceModel(), Updated = Updated?.ToServiceModel(), }); }
/// <summary> /// To service model /// </summary> /// <returns></returns> public CertificateRequestRecordModel ToServiceModel() { return(new CertificateRequestRecordModel { RequestId = RequestId, EntityId = EntityId, Type = Type, State = State, GroupId = GroupId, Submitted = Submitted?.ToServiceModel(), Accepted = Accepted?.ToServiceModel(), Approved = Approved?.ToServiceModel(), ErrorInfo = ErrorInfo }); }