/// <summary> /// Gets a single environment. /// </summary> /// <remarks> /// Required permissions: Environments.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EnvironmentDto> GetByIdAsync(this IEnvironments operations, long id, string expand = default(string), string select = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetByIdWithHttpMessagesAsync(id, expand, select, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private void cbEnvironments_Loaded(object sender, RoutedEventArgs e) { IEnvironments environment = CreateEnvironments(); GatherEnvironments(environment); PopulateEnvironmentComboBox(sender, environment); }
private static void PopulateEnvironmentComboBox(object sender, IEnvironments environment) { var comboBox = sender as ComboBox; comboBox.ItemsSource = environment; comboBox.SelectedIndex = 0; }
/// <summary> /// Gets a single environment. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Read. /// /// Required permissions: Environments.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EnvironmentDto> GetByIdAsync(this IEnvironments operations, long key, string expand = default(string), string select = default(string), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetByIdWithHttpMessagesAsync(key, expand, select, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Post new environment /// </summary> /// <remarks> /// Required permissions: Environments.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='environmentDto'> /// The entity to post /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EnvironmentDto> PostAsync(this IEnvironments operations, EnvironmentDto environmentDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.PostWithHttpMessagesAsync(environmentDto, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private void GetAvailableQueues(string value) { IEnvironments environment = CreateEnvironments(); environment.GetAvailableQueues(value); Console.WriteLine("test"); }
/// <summary> /// Post new environment /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Write. /// /// Required permissions: Environments.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EnvironmentDto> PostAsync(this IEnvironments operations, EnvironmentDto body = default(EnvironmentDto), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostWithHttpMessagesAsync(body, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets Environments. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Read. /// /// Required permissions: Environments.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='filter'> /// Restricts the set of items returned. The maximum number of expressions is /// 100. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='orderby'> /// Specifies the order in which items are returned. The maximum number of /// expressions is 5. /// </param> /// <param name='top'> /// Limits the number of items returned from a collection. The maximum value is /// 1000. /// </param> /// <param name='skip'> /// Excludes the specified number of items of the queried collection from the /// result. /// </param> /// <param name='count'> /// Indicates whether the total count of items within a collection are returned /// in the result. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataValueOfIEnumerableOfEnvironmentDto> GetAsync(this IEnvironments operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(expand, filter, select, orderby, top, skip, count, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private void GatherEnvironments(IEnvironments environments) { //TODO: Turn this into a foreach read from a property file environments.GatherEnvironments("DEV"); environments.GatherEnvironments("QA"); environments.GatherEnvironments("CERT"); environments.GatherEnvironments("PROD"); }
/// <summary> /// Deletes an environment. /// </summary> /// <remarks> /// Required permissions: Environments.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='ifMatch'> /// If-Match header /// </param> public static void DeleteById(this IEnvironments operations, long id, string ifMatch = default(string)) { operations.DeleteByIdAsync(id, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Associates a group of robots with and dissociates another group of robots /// from the given environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='setRobotsParameters'> /// <para />addedRobotIds - The id of the robots to be associated with /// the environment. /// <para />removedRobotIds - The id of the robots to be dissociated from /// the environment. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task SetRobotsByIdAsync(this IEnvironments operations, long id, SetRobotsParameters setRobotsParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.SetRobotsByIdWithHttpMessagesAsync(id, setRobotsParameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets Environments. /// </summary> /// <remarks> /// Required permissions: Environments.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='filter'> /// Filters the results, based on a Boolean condition. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> /// <param name='orderby'> /// Sorts the results. /// </param> /// <param name='top'> /// Returns only the first n results. /// </param> /// <param name='skip'> /// Skips the first n results. /// </param> /// <param name='count'> /// Includes a count of the matching results in the response. /// </param> public static ODataResponseListEnvironmentDto GetEnvironments(this IEnvironments operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?)) { return(operations.GetEnvironmentsAsync(expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult()); }
/// <summary> /// Dissociates a robot from the given environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='removeRobotParameters'> /// RobotId - The dissociated robot Id. /// </param> public static void RemoveRobotById(this IEnvironments operations, long id, RemoveRobotParameters removeRobotParameters = default(RemoveRobotParameters)) { operations.RemoveRobotByIdAsync(id, removeRobotParameters).GetAwaiter().GetResult(); }
/// <summary> /// Associates a group of robots with and dissociates another group of robots /// from the given environment. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Write. /// /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The environment id. /// </param> /// <param name='body'> /// <para />addedRobotIds - The id of the robots to be associated with /// the environment. /// <para />removedRobotIds - The id of the robots to be dissociated from /// the environment. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> public static void SetRobotsById(this IEnvironments operations, long key, EnvironmentsSetRobotsParameters body = default(EnvironmentsSetRobotsParameters), long?xUIPATHOrganizationUnitId = default(long?)) { operations.SetRobotsByIdAsync(key, body, xUIPATHOrganizationUnitId).GetAwaiter().GetResult(); }
/// <summary> /// Deletes an environment. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Write. /// /// Required permissions: Environments.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteByIdAsync(this IEnvironments operations, long key, long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteByIdWithHttpMessagesAsync(key, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
public EnvironmentsController(IRedAlert commonDomain, IEnvironments environmentsDomain) { _commonDomain = commonDomain; _environmentsDomain = environmentsDomain; }
/// <summary> /// Returns a collection of all the ids of the robots associated to an /// environment based on environment Id. /// </summary> /// <remarks> /// Required permissions: Environments.View and Robots.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The Id of the environment for which the robot ids are fetched. /// </param> public static ODataResponseListInt64 GetRobotIdsForEnvironmentByKey(this IEnvironments operations, long key) { return(operations.GetRobotIdsForEnvironmentByKeyAsync(key).GetAwaiter().GetResult()); }
/// <summary> /// Associates a robot with the given environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='addRobotParameters'> /// RobotId - The associated robot Id. /// </param> public static void AddRobotById(this IEnvironments operations, long id, AddRobotParameters addRobotParameters = default(AddRobotParameters)) { operations.AddRobotByIdAsync(id, addRobotParameters).GetAwaiter().GetResult(); }
/// <summary> /// Associates a group of robots with and dissociates another group of robots /// from the given environment. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Write. /// /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The environment id. /// </param> /// <param name='body'> /// <para />addedRobotIds - The id of the robots to be associated with /// the environment. /// <para />removedRobotIds - The id of the robots to be dissociated from /// the environment. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task SetRobotsByIdAsync(this IEnvironments operations, long key, EnvironmentsSetRobotsParameters body = default(EnvironmentsSetRobotsParameters), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.SetRobotsByIdWithHttpMessagesAsync(key, body, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Associates a group of robots with and dissociates another group of robots /// from the given environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='setRobotsParameters'> /// <para />addedRobotIds - The id of the robots to be associated with /// the environment. /// <para />removedRobotIds - The id of the robots to be dissociated from /// the environment. /// </param> public static void SetRobotsById(this IEnvironments operations, long id, SetRobotsParameters setRobotsParameters) { operations.SetRobotsByIdAsync(id, setRobotsParameters).GetAwaiter().GetResult(); }
/// <summary> /// Updates an environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='environmentDto'> /// The entity to put /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutByIdAsync(this IEnvironments operations, long id, EnvironmentDto environmentDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.PutByIdWithHttpMessagesAsync(id, environmentDto, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Returns a collection of all the ids of the robots associated to an /// environment based on environment Id. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Read. /// /// Required permissions: Environments.View and Robots.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The Id of the environment for which the robot ids are fetched. /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='filter'> /// Restricts the set of items returned. The maximum number of expressions is /// 100. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='orderby'> /// Specifies the order in which items are returned. The maximum number of /// expressions is 5. /// </param> /// <param name='count'> /// Indicates whether the total count of items within a collection are returned /// in the result. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataValueOfIEnumerableOfInt64> GetRobotIdsForEnvironmentByKeyAsync(this IEnvironments operations, long key, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), bool?count = default(bool?), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetRobotIdsForEnvironmentByKeyWithHttpMessagesAsync(key, expand, filter, select, orderby, count, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a collection of all the ids of the robots associated to an /// environment based on environment Id. /// </summary> /// <remarks> /// Required permissions: Environments.View and Robots.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The Id of the environment for which the robot ids are fetched. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListInt64> GetRobotIdsForEnvironmentByKeyAsync(this IEnvironments operations, long key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetRobotIdsForEnvironmentByKeyWithHttpMessagesAsync(key, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes an environment. /// </summary> /// <remarks> /// Required permissions: Environments.Delete. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='ifMatch'> /// If-Match header /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteByIdAsync(this IEnvironments operations, long id, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.DeleteByIdWithHttpMessagesAsync(id, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Returns a collection of all robots and, if no other sorting is provided, /// will place first those belonging to the environment. Allows odata query /// options. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Robots or Robots.Read. /// /// Required permissions: Environments.View and Robots.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// The Id of the environment for which the associated robots are placed first. /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='filter'> /// Restricts the set of items returned. The maximum number of expressions is /// 100. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='orderby'> /// Specifies the order in which items are returned. The maximum number of /// expressions is 5. /// </param> /// <param name='top'> /// Limits the number of items returned from a collection. The maximum value is /// 1000. /// </param> /// <param name='skip'> /// Excludes the specified number of items of the queried collection from the /// result. /// </param> /// <param name='count'> /// Indicates whether the total count of items within a collection are returned /// in the result. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> public static ODataValueOfIEnumerableOfRobotDto GetRobotsForEnvironmentByKey(this IEnvironments operations, long key, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), long?xUIPATHOrganizationUnitId = default(long?)) { return(operations.GetRobotsForEnvironmentByKeyAsync(key, expand, filter, select, orderby, top, skip, count, xUIPATHOrganizationUnitId).GetAwaiter().GetResult()); }
/// <summary> /// Dissociates a robot from the given environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='removeRobotParameters'> /// RobotId - The dissociated robot Id. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RemoveRobotByIdAsync(this IEnvironments operations, long id, RemoveRobotParameters removeRobotParameters = default(RemoveRobotParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.RemoveRobotByIdWithHttpMessagesAsync(id, removeRobotParameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Post new environment /// </summary> /// <remarks> /// Required permissions: Environments.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='environmentDto'> /// The entity to post /// </param> public static EnvironmentDto Post(this IEnvironments operations, EnvironmentDto environmentDto) { return(operations.PostAsync(environmentDto).GetAwaiter().GetResult()); }
/// <summary> /// Gets Environments. /// </summary> /// <remarks> /// Required permissions: Environments.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='filter'> /// Filters the results, based on a Boolean condition. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> /// <param name='orderby'> /// Sorts the results. /// </param> /// <param name='top'> /// Returns only the first n results. /// </param> /// <param name='skip'> /// Skips the first n results. /// </param> /// <param name='count'> /// Includes a count of the matching results in the response. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListEnvironmentDto> GetEnvironmentsAsync(this IEnvironments operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetEnvironmentsWithHttpMessagesAsync(expand, filter, select, orderby, top, skip, count, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a single environment. /// </summary> /// <remarks> /// Required permissions: Environments.View. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='expand'> /// Expands related entities inline. /// </param> /// <param name='select'> /// Selects which properties to include in the response. /// </param> public static EnvironmentDto GetById(this IEnvironments operations, long id, string expand = default(string), string select = default(string)) { return(operations.GetByIdAsync(id, expand, select).GetAwaiter().GetResult()); }
public EnvironmentsController(IEnvironments domain) { _domain = domain; }
/// <summary> /// Updates an environment. /// </summary> /// <remarks> /// Required permissions: Environments.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='environmentDto'> /// The entity to put /// </param> public static void PutById(this IEnvironments operations, long id, EnvironmentDto environmentDto) { operations.PutByIdAsync(id, environmentDto).GetAwaiter().GetResult(); }