コード例 #1
0
        protected override void ProcessRecord()
        {
            var dto = new QueueItemDataDto
            {
                Name            = QueueName,
                Reference       = Reference,
                DeferDate       = DeferDate,
                DueDate         = DueDate,
                SpecificContent = new QueueItemSpecificContent
                {
                    DynamicProperties = SpecificContent.Cast <DictionaryEntry>().ToDictionary(kv => (string)kv.Key, kv => kv.Value)
                }
            };
            QueueItemDataDtoPriority priority;

            if (Enum.TryParse <QueueItemDataDtoPriority>(Priority, out priority))
            {
                dto.Priority = priority;
            }
            var queueItem = HandleHttpOperationException(() => Api.Queues.AddQueueItem(new QueueItemParameters
            {
                ItemData = dto
            }));

            WriteObject(QueueItem.FromDto(queueItem));
        }
コード例 #2
0
 /// <summary>
 /// Updates the QueueItem properties with the new values provided.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Queues or Queues.Write.
 ///
 /// Required permissions: Queues.Edit and Transactions.Edit.
 ///
 /// Only UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Progress,
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Priority,
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DueDate,
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DeferDate and
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.SpecificContent
 /// will be updated from given queueItemDto object.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='xUIPATHOrganizationUnitId'>
 /// Folder/OrganizationUnit Id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PutByIdAsync(this IQueueItems operations, long key, QueueItemDataDto body = default(QueueItemDataDto), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.PutByIdWithHttpMessagesAsync(key, body, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #3
0
 /// <summary>
 /// Updates the QueueItem properties with the new values provided.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Queues or Queues.Write.
 ///
 /// Required permissions: Queues.Edit and Transactions.Edit.
 ///
 /// Only UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Progress,
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Priority,
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DueDate,
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DeferDate and
 /// UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.SpecificContent
 /// will be updated from given queueItemDto object.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='xUIPATHOrganizationUnitId'>
 /// Folder/OrganizationUnit Id
 /// </param>
 public static void PutById(this IQueueItems operations, long key, QueueItemDataDto body = default(QueueItemDataDto), long?xUIPATHOrganizationUnitId = default(long?))
 {
     operations.PutByIdAsync(key, body, xUIPATHOrganizationUnitId).GetAwaiter().GetResult();
 }
コード例 #4
0
 /// <summary>
 /// Updates the QueueItem properties with the new values provided.
 /// </summary>
 /// <remarks>
 /// Required permissions: Queues.Edit and Transactions.Edit.
 ///
 /// Only {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Progress},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Priority},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DueDate},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DeferDate} and
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.SpecificContent}
 /// will be updated from given queueItemDto object.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='queueItemDto'>
 /// The entity to put
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> PutByIdAsync(this IQueueItems operations, long id, QueueItemDataDto queueItemDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.PutByIdWithHttpMessagesAsync(id, queueItemDto, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #5
0
 /// <summary>
 /// Updates the QueueItem properties with the new values provided.
 /// </summary>
 /// <remarks>
 /// Required permissions: Queues.Edit and Transactions.Edit.
 ///
 /// Only {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Progress},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Priority},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DueDate},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DeferDate} and
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.SpecificContent}
 /// will be updated from given queueItemDto object.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='queueItemDto'>
 /// The entity to put
 /// </param>
 /// <param name='xUIPATHOrganizationUnitId'>
 /// Folder/OrganizationUnit Id
 /// </param>
 public static object PutById(this IQueueItems operations, long id, QueueItemDataDto queueItemDto, long?xUIPATHOrganizationUnitId = default(long?))
 {
     return(operations.PutByIdAsync(id, queueItemDto, xUIPATHOrganizationUnitId).GetAwaiter().GetResult());
 }
コード例 #6
0
 /// <summary>
 /// Updates the QueueItem properties with the new values provided.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Queues or Queues.Write.
 ///
 /// Required permissions: Queues.Edit and Transactions.Edit.
 ///
 /// Only {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Progress},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.Priority},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DueDate},
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.DeferDate} and
 /// {UiPath.Orchestrator.Application.Dto.Queues.QueueItemDto.SpecificContent}
 /// will be updated from given queueItemDto object.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='queueItemDto'>
 /// The entity to put
 /// </param>
 /// <param name='xUIPATHOrganizationUnitId'>
 /// Folder/OrganizationUnit Id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PutByIdAsync(this IQueueItems operations, long id, QueueItemDataDto queueItemDto, long?xUIPATHOrganizationUnitId = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.PutByIdWithHttpMessagesAsync(id, queueItemDto, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }