Esempio n. 1
0
 public ServerSendPacket(IInternalClient connection)
 {
     Connection = connection;
     Log        = connection.Log;
     OpCodes    = connection.PacketService;
     Buffer     = new ByteBuffer();
 }
 /// <summary>
 /// Uploads the single citizen document
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// </param>
 /// <param name='cpr'>
 /// </param>
 /// <param name='retentionPeriodInDays'>
 /// </param>
 /// <param name='documentType'>
 /// Possible values include: 'citizenDocument', 'digitalPostCoverLetter',
 /// 'snailMailCoverLetter'
 /// </param>
 /// <param name='document'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> UploadAttachmentAsync(this IInternalClient operations, System.Guid subscriptionId, string configurationId = default(string), string cpr = default(string), int?retentionPeriodInDays = default(int?), string documentType = default(string), Stream document = default(Stream), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UploadAttachmentWithHttpMessagesAsync(subscriptionId, configurationId, cpr, retentionPeriodInDays, documentType, document, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Update an existing consent group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The subscription responsible for managing this consent group
 /// </param>
 /// <param name='consentGroupId'>
 /// The consent group to update
 /// </param>
 /// <param name='request'>
 /// The details of the consent group being updated
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> UpdateConsentGroupAsync(this IInternalClient operations, System.Guid subscriptionId, System.Guid consentGroupId, ConsentGroupRequest request = default(ConsentGroupRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateConsentGroupWithHttpMessagesAsync(subscriptionId, consentGroupId, request, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Get the complete details of consent
 /// </summary>
 /// <remarks>
 /// The requesting member must have both Read and Write permissions to use this
 /// method.
 ///
 /// For a member to get consent details for operational use, use the route:
 /// subscriptions/{subscriptionId}/consents/{consentGroupId}/{key}/{member}
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The subscription with access to the consent group
 /// </param>
 /// <param name='consentGroupId'>
 /// The consent group being requested
 /// </param>
 /// <param name='key'>
 /// The consent key being requested
 /// </param>
 /// <param name='member'>
 /// The consent group member requesting access
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetConsentAsync(this IInternalClient operations, System.Guid subscriptionId, System.Guid consentGroupId, string key, string member, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetConsentWithHttpMessagesAsync(subscriptionId, consentGroupId, key, member, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets citizen data by ID
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// LoGIC subscription ID
 /// </param>
 /// <param name='id'>
 /// ID of danish citizen
 /// </param>
 /// <param name='configurationId'>
 /// Identifier that represents CPR environment and associated configuration
 /// which this request will be sent with.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetByIdAsync(this IInternalClient operations, System.Guid subscriptionId, System.Guid id, System.Guid?configurationId = default(System.Guid?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByIdWithHttpMessagesAsync(subscriptionId, id, configurationId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Gets the citizen document by id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='documentId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetDocumentAsync(this IInternalClient operations, System.Guid documentId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetDocumentWithHttpMessagesAsync(documentId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Edit citizen document configuration settings.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// configuration Id
 /// </param>
 /// <param name='request'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> EditConfigAsync(this IInternalClient operations, System.Guid subscriptionId, System.Guid configurationId, CitizenDocumentProviderConfigRequest request, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EditConfigWithHttpMessagesAsync(subscriptionId, configurationId, request, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Adds fake provider configuration
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// Id of LoGIC subscription
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='callbackUrl'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> CreateFakeConfigurationAsync(this IInternalClient operations, System.Guid subscriptionId, string id = default(string), string callbackUrl = default(string), string name = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateFakeConfigurationWithHttpMessagesAsync(subscriptionId, id, callbackUrl, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 9
0
 /// <summary>
 /// Get all the  caseworkers
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='pageNumber'>
 /// The PageNumber to access the records from Core system. Minimum Value is 0
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetAllCaseworkersAsync(this IInternalClient operations, int?pageNumber = 0, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllCaseworkersWithHttpMessagesAsync(pageNumber, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 10
0
 /// <summary>
 /// Get caseworkers in Momentum with ID
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='caseworkerId'>
 /// The caseworker id to access the records from Core system.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetCaseworkerByIdAsync(this IInternalClient operations, string caseworkerId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetCaseworkerByIdWithHttpMessagesAsync(caseworkerId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 11
0
 /// <summary>
 /// Update Status
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// The request model to update task in the Core system
 /// </param>
 /// <param name='taskId'>
 /// The TaskId to update the task in the Core system
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> UpdateTaskStatusAsync(this IInternalClient operations, TaskUpdateStatus body, string taskId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateTaskStatusWithHttpMessagesAsync(body, taskId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 12
0
 /// <summary>
 /// Get Health
 /// </summary>
 /// <remarks>
 /// Provides an indication about the health of the API
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <HealthReport> HealthLiveAsync(this IInternalClient operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.HealthLiveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 13
0
 /// <summary>
 /// Create a Journal Note with attachment
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// The requestmodel to save as a journal note record, in the Core system
 /// </param>
 /// <param name='momentumCitizenId'>
 /// The MomentumCitizenID or CitizenId to Create the journal note record in the
 /// Core system
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProblemDetails> CreateJournalNoteAsync(this IInternalClient operations, JournalNoteRequestModel body, string momentumCitizenId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateJournalNoteWithHttpMessagesAsync(body, momentumCitizenId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 14
0
 /// <summary>
 /// Get Citizen in Momentum by CPR
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cprNumber'>
 /// The CPR number to search the record in the Core system
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetCitizenByCprAsync(this IInternalClient operations, string cprNumber, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetCitizenByCprWithHttpMessagesAsync(cprNumber, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 15
0
 /// <summary>
 /// Gets link to storage with access to upload document.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='documentName'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> StorageAccessAsync(this IInternalClient operations, System.Guid subscriptionId, string documentName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.StorageAccessWithHttpMessagesAsync(subscriptionId, documentName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 16
0
 /// <summary>
 /// Adds existing eboks configuration and upload certificate file to the Azure
 /// Key Vault
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// Id of LoGIC subscription
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='systemId'>
 /// </param>
 /// <param name='environment'>
 /// Possible values include: 'production', 'test'
 /// </param>
 /// <param name='callbackUrl'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='certificate'>
 /// </param>
 /// <param name='certificatePassword'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> CreateEboksConfigurationAsync(this IInternalClient operations, System.Guid subscriptionId, string id = default(string), int?systemId = default(int?), string environment = default(string), string callbackUrl = default(string), string name = default(string), Stream certificate = default(Stream), string certificatePassword = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateEboksConfigurationWithHttpMessagesAsync(subscriptionId, id, systemId, environment, callbackUrl, name, certificate, certificatePassword, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 17
0
 /// <summary>
 /// Updates the upload data to db
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='request'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> UpdateDataToDbAsync(this IInternalClient operations, System.Guid subscriptionId, CitizenDocumentUploadRequestModel request, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateDataToDbWithHttpMessagesAsync(subscriptionId, request, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 18
0
 /// <summary>
 /// Sends a single document to a citizen/company.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// Id of LoGIC subscription
 /// </param>
 /// <param name='request'>
 /// Request body
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> SendDocumentAsync(this IInternalClient operations, System.Guid subscriptionId, SendDocumentRequest request = default(SendDocumentRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SendDocumentWithHttpMessagesAsync(subscriptionId, request, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 19
0
 /// <summary>
 /// Uploads a single file that could be add as an attachment to the message
 /// later.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// Id of LoGIC subscription
 /// </param>
 /// <param name='attachment'>
 /// File added to message
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UploadAttachmentResponse> UploadAttachmentAsync(this IInternalClient operations, System.Guid subscriptionId, Stream attachment, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UploadAttachmentWithHttpMessagesAsync(subscriptionId, attachment, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 20
0
        public void Process(IInternalClient connection)
        {
            Buffer = new ByteBuffer(connection.Buffer);

            Connection = connection;
            Log        = Connection.Log;
            OpCodes    = connection.PacketService;

            try
            {
                Read();
            }
            catch (Exception ex)
            {
                Log?.Exception(ex, GetType().UnderlyingSystemType.Name);
            }
        }
Esempio n. 21
0
 public EventsController(IInternalClient internalClient)
 {
     _internalClient = internalClient;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='environment'>
 /// Possible values include: 'production', 'test'
 /// </param>
 /// <param name='certificate'>
 /// </param>
 /// <param name='certificatePassword'>
 /// </param>
 /// <param name='municipalityCvr'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServicePlatformProviderConfiguration> UpdateServicePlatformConfigurationAsync(this IInternalClient operations, System.Guid subscriptionId, System.Guid configurationId, string name = default(string), string environment = default(string), Stream certificate = default(Stream), string certificatePassword = default(string), string municipalityCvr = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateServicePlatformConfigurationWithHttpMessagesAsync(subscriptionId, configurationId, name, environment, certificate, certificatePassword, municipalityCvr, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets citizen data by ID
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// LoGIC subscription ID
 /// </param>
 /// <param name='id'>
 /// ID of danish citizen
 /// </param>
 /// <param name='configurationId'>
 /// Identifier that represents CPR environment and associated configuration
 /// which this request will be sent with.
 /// </param>
 public static object GetById(this IInternalClient operations, System.Guid subscriptionId, System.Guid id, System.Guid?configurationId = default(System.Guid?))
 {
     return(operations.GetByIdAsync(subscriptionId, id, configurationId).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CprFakeProviderConfiguration> UpdateFakeProviderConfigurationAsync(this IInternalClient operations, System.Guid subscriptionId, System.Guid configurationId, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateFakeProviderConfigurationWithHttpMessagesAsync(subscriptionId, configurationId, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='environment'>
 /// Possible values include: 'production', 'test'
 /// </param>
 /// <param name='certificate'>
 /// </param>
 /// <param name='certificatePassword'>
 /// </param>
 /// <param name='municipalityCvr'>
 /// </param>
 public static ServicePlatformProviderConfiguration UpdateServicePlatformConfiguration(this IInternalClient operations, System.Guid subscriptionId, System.Guid configurationId, string name = default(string), string environment = default(string), Stream certificate = default(Stream), string certificatePassword = default(string), string municipalityCvr = default(string))
 {
     return(operations.UpdateServicePlatformConfigurationAsync(subscriptionId, configurationId, name, environment, certificate, certificatePassword, municipalityCvr).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// </param>
 /// <param name='name'>
 /// </param>
 public static CprFakeProviderConfiguration UpdateFakeProviderConfiguration(this IInternalClient operations, System.Guid subscriptionId, System.Guid configurationId, string name)
 {
     return(operations.UpdateFakeProviderConfigurationAsync(subscriptionId, configurationId, name).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Adds or updates existing cpr configuration and uploads certificate file to
 /// the Azure Key Vault
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='configurationId'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='environment'>
 /// Possible values include: 'production', 'test'
 /// </param>
 /// <param name='certificate'>
 /// </param>
 /// <param name='certificatePassword'>
 /// </param>
 public static CprProviderConfiguration UpdateDataDistributorConfiguration(this IInternalClient operations, System.Guid subscriptionId, System.Guid configurationId, string name = default(string), string environment = default(string), Stream certificate = default(Stream), string certificatePassword = default(string))
 {
     return(operations.UpdateDataDistributorConfigurationAsync(subscriptionId, configurationId, name, environment, certificate, certificatePassword).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Adds new CPR configuration and uploads certificate file to the Azure Key
 /// Vault
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='environment'>
 /// Possible values include: 'production', 'test'
 /// </param>
 /// <param name='certificate'>
 /// </param>
 /// <param name='certificatePassword'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CprProviderConfiguration> CreateDataDistributorConfigurationAsync(this IInternalClient operations, System.Guid subscriptionId, string name = default(string), string environment = default(string), Stream certificate = default(Stream), string certificatePassword = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateDataDistributorConfigurationWithHttpMessagesAsync(subscriptionId, name, environment, certificate, certificatePassword, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all Cpr configurations assigned to the logic subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <CprProviderConfigurationModel> > GetAllCprConfigurationsAsync(this IInternalClient operations, System.Guid subscriptionId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllCprConfigurationsWithHttpMessagesAsync(subscriptionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all Cpr configurations assigned to the logic subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 public static IList <CprProviderConfigurationModel> GetAllCprConfigurations(this IInternalClient operations, System.Guid subscriptionId)
 {
     return(operations.GetAllCprConfigurationsAsync(subscriptionId).GetAwaiter().GetResult());
 }