├── .gitattributes
├── Directory.Build.props
├── Properties
└── GlobalAssemblyInfo.cs
├── UiPath.PowerShell
├── Util
│ ├── FilterAttribute.cs
│ ├── SetParameterAttribute.cs
│ ├── RequiredVersionAttribute.cs
│ ├── PSCredentialExtenssions.cs
│ ├── SecurityProtocolFix.cs
│ ├── EnumExtensions.cs
│ ├── OrchestratorProtocolVersion.cs
│ ├── NetworkAuthenticationCredentials.cs
│ ├── EditCmdlet.cs
│ ├── HashtableExtensions.cs
│ ├── UserCmdlet.cs
│ └── ValidateEnumAttribute.cs
├── Models
│ ├── CloudDeployments.cs
│ ├── ChangePasswordAccountDto.cs
│ ├── ExtendedFolder.cs
│ ├── UserRole.cs
│ ├── Timezone.cs
│ ├── MaintenanceLog.cs
│ ├── Webhook.cs
│ ├── Environment.cs
│ ├── CredentialStore.cs
│ ├── Permission.cs
│ ├── MachineFolder.cs
│ ├── Setting.cs
│ ├── Tenant.cs
│ ├── Process.cs
│ ├── Job.cs
│ ├── Folder.cs
│ ├── Package.cs
│ ├── Library.cs
│ └── AssetRobotValue.cs
├── Properties
│ └── AssemblyInfo.cs
├── app.config
├── Cmdlets
│ ├── LockUser.cs
│ ├── UnlockUser.cs
│ ├── GetLicense.cs
│ ├── ClearAuthToken.cs
│ ├── GetPermission.cs
│ ├── AddPackage.cs
│ ├── GetWebhook.cs
│ ├── GetCurrentUserFolders.cs
│ ├── RemoveAsset.cs
│ ├── GetTimeZones.cs
│ ├── SetAuthToken.cs
│ ├── RemoveRole.cs
│ ├── RemoveUser.cs
│ ├── RemoveFolder.cs
│ ├── RemoveRobot.cs
│ ├── RemoveTenant.cs
│ ├── RemoveBucket.cs
│ ├── RemoveMachine.cs
│ ├── RemoveProcess.cs
│ ├── AddEnvironmentRobot.cs
│ ├── GetAsset.cs
│ ├── RemoveWebhook.cs
│ ├── RemoveLibrary.cs
│ ├── RemoveQueueItem.cs
│ ├── RemoveEnvironment.cs
│ ├── GetBucket.cs
│ ├── RemoveProcessSchedule.cs
│ ├── RegisterLicense.cs
│ ├── GetFolder.cs
│ ├── RemoveQueueDefinition.cs
│ ├── EditProcessSchedule.cs
│ ├── AddLibrary.cs
│ ├── GetEnvironment.cs
│ ├── GetFolderUsers.cs
│ ├── RemoveFolderUser.cs
│ ├── StopJob.cs
│ ├── GetLibrary.cs
│ ├── RemovePackage.cs
│ ├── GetFolderMachines.cs
│ ├── GetJob.cs
│ ├── GetSettings.cs
│ ├── GetTenant.cs
│ ├── GetLibraryVersion.cs
│ ├── GrantRolePermission.cs
│ ├── RevokeRolePermission.cs
│ ├── AddEnvironment.cs
│ ├── SetCurrentFolder.cs
│ ├── StopMaintenance.cs
│ ├── RemoveEnvironmentRobot.cs
│ ├── EditRoleUser.cs
│ ├── GetRole.cs
│ ├── GetMaintenance.cs
│ ├── AddTenant.cs
│ ├── GetQueueDefinition.cs
│ ├── GetProcessSchedule.cs
│ ├── AddQueueDefinition.cs
│ ├── EditQueueDefinition.cs
│ └── GetMachine.cs
└── UiPath.BindingResolve.ps1
├── UiPath.PowerShell.Tests
├── Properties
│ └── AssemblyInfo.cs
├── app.config
└── Util
│ ├── TestFileFixture.cs
│ ├── PackageSpec.cs
│ ├── TestContextExtensions.cs
│ └── TestSettings.cs
├── UiPath.Web.Client
├── IUiPathWebApi.cs
├── UiPathWebApi.cs
├── app.config
├── Properties
│ └── AssemblyInfo.cs
├── generated202010
│ └── Models
│ │ ├── ODataValueOfInt64.cs
│ │ ├── ODataValueOfBoolean.cs
│ │ ├── ODataValueOfString.cs
│ │ ├── RobotServicePayload.cs
│ │ ├── UsersChangeCultureParameters.cs
│ │ ├── EnvironmentsAddRobotParameters.cs
│ │ ├── UsersChangeUserCultureParameters.cs
│ │ ├── EnvironmentsRemoveRobotParameters.cs
│ │ ├── RobotServiceResponse.cs
│ │ ├── CalendarsCalendarExistsParameters.cs
│ │ ├── MachineDeleteBulkRequest.cs
│ │ ├── FoldersAssignUsersParameters.cs
│ │ ├── DomainDto.cs
│ │ └── NameValueDto.cs
├── generated20194
│ └── Models
│ │ ├── AddRobotParameters.cs
│ │ ├── ClearAllCacheModel.cs
│ │ ├── RemoveRobotParameters.cs
│ │ ├── ChangeCultureParameters.cs
│ │ ├── RobotServicePayload.cs
│ │ ├── SpecificPackageParameters.cs
│ │ ├── SetTenantLicenseParameters.cs
│ │ ├── TransactionProgressParameters.cs
│ │ ├── HeartbeatResponse.cs
│ │ ├── SetTransactionParameters.cs
│ │ ├── UpdateBulkParameters.cs
│ │ ├── RobotServiceResponse.cs
│ │ ├── ApplyClause.cs
│ │ ├── ListResultDtoNameValueDto.cs
│ │ ├── DeleteBulkParameters.cs
│ │ └── NameValueDto.cs
├── generated20204
│ └── Models
│ │ ├── AddRobotParameters.cs
│ │ ├── ClearAllCacheModel.cs
│ │ ├── RemoveRobotParameters.cs
│ │ ├── ChangeCultureParameters.cs
│ │ ├── RobotServicePayload.cs
│ │ ├── CalendarExistsParameters.cs
│ │ ├── SpecificPackageParameters.cs
│ │ ├── Body.cs
│ │ ├── SetTenantLicenseParameters.cs
│ │ ├── TransactionProgressParameters.cs
│ │ ├── HeartbeatResponse.cs
│ │ ├── DeactivateLicenseOnlineParameters.cs
│ │ ├── DeactivateLicenseOfflineParameters.cs
│ │ ├── SetTransactionParameters.cs
│ │ ├── UpdateBulkParameters.cs
│ │ ├── RobotServiceResponse.cs
│ │ ├── ApplyClause.cs
│ │ ├── AssignUsersActionParameters.cs
│ │ ├── ListResultDtoLanguageInfo.cs
│ │ ├── ListResultDtoNameValueDto.cs
│ │ ├── DeleteBulkParameters.cs
│ │ └── AssignMachinesActionParameters.cs
└── generated201910
│ └── Models
│ ├── AddRobotParameters.cs
│ ├── ClearAllCacheModel.cs
│ ├── RemoveRobotParameters.cs
│ ├── ChangeCultureParameters.cs
│ ├── RobotServicePayload.cs
│ ├── CalendarExistsParameters.cs
│ ├── SpecificPackageParameters.cs
│ ├── SetTenantLicenseParameters.cs
│ ├── Body.cs
│ ├── TransactionProgressParameters.cs
│ ├── HeartbeatResponse.cs
│ ├── DeactivateLicenseOnlineParameters.cs
│ ├── DeactivateLicenseOfflineParameters.cs
│ ├── SetTransactionParameters.cs
│ ├── RobotServiceResponse.cs
│ ├── UpdateBulkParameters.cs
│ ├── ApplyClause.cs
│ ├── AssignUsersActionParameters.cs
│ ├── ListResultDtoLanguageInfo.cs
│ ├── ListResultDtoNameValueDto.cs
│ ├── DeleteBulkParameters.cs
│ └── NameValueDto.cs
├── Generate-CmdletDocs.ps1
├── docs
├── Set-UiPathAuthToken.md
├── Get-UiPathLicense.md
├── Clear-UiPathAuthToken.md
├── Get-UiPathCurrentUserFolders.md
└── Get-UiPathTimeZones.md
└── LICENSE.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | UiPath.Web.Client/generated*/**/* linguist-generated=true
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | 8.0
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Properties/GlobalAssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/UiPath/orchestrator-powershell/HEAD/Properties/GlobalAssemblyInfo.cs
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/FilterAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UiPath.PowerShell.Util
4 | {
5 | public class FilterAttribute: Attribute
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/SetParameterAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UiPath.PowerShell.Util
4 | {
5 | public class SetParameterAttribute: Attribute
6 | {
7 | public string DtoProperty { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/CloudDeployments.cs:
--------------------------------------------------------------------------------
1 | namespace UiPath.PowerShell.Models
2 | {
3 | public enum CloudDeployments
4 | {
5 | None,
6 | Alpha,
7 | Staging,
8 | Production,
9 | Cloud = Production,
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/RequiredVersionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UiPath.PowerShell.Util
4 | {
5 | [AttributeUsage(AttributeTargets.Property)]
6 | public class RequiredVersionAttribute : Attribute
7 | {
8 | public string MinVersion { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/ChangePasswordAccountDto.cs:
--------------------------------------------------------------------------------
1 | namespace UiPath.PowerShell.Models
2 | {
3 | internal class ChangePasswordAccountDto
4 | {
5 | public long UserId { get; set; }
6 |
7 | public string CurrentPassword { get; set; }
8 |
9 | public string NewPassword { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/UiPath.PowerShell.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | [assembly: AssemblyTitle("UiPath.PowerShell.Tests")]
5 | [assembly: AssemblyDescription("")]
6 | [assembly: AssemblyConfiguration("")]
7 |
8 | [assembly: ComVisible(false)]
9 |
10 | [assembly: Guid("94a57d5b-56bc-482f-88b0-0df1fedfb148")]
11 |
12 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 |
3 | // General Information about an assembly is controlled through the following
4 | // set of attributes. Change these attribute values to modify the information
5 | // associated with an assembly.
6 | [assembly: AssemblyTitle("UiPath.PowerShell")]
7 | [assembly: AssemblyDescription("")]
8 | [assembly: AssemblyConfiguration("")]
9 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/PSCredentialExtenssions.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using System.Net;
3 |
4 | namespace UiPath.PowerShell.Util
5 | {
6 | internal static class PSCredentialExtenssions
7 | {
8 | public static string ExtractPassword(this PSCredential ps)
9 | {
10 | return new NetworkCredential(string.Empty, ps.Password).Password;
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/SecurityProtocolFix.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 |
3 | namespace UiPath.PowerShell.Util
4 | {
5 | internal class SecurityProtocolFix
6 | {
7 | internal static bool Ignored = false;
8 |
9 | static SecurityProtocolFix()
10 | {
11 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/IUiPathWebApi.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Rest;
2 | using Newtonsoft.Json;
3 |
4 | namespace UiPath.Web.Client.Generic
5 | {
6 | public interface IUiPathWebApi
7 | {
8 | JsonSerializerSettings SerializationSettings { get; }
9 |
10 | JsonSerializerSettings DeserializationSettings { get; }
11 |
12 | System.Uri BaseUri { get; set; }
13 |
14 | ServiceClientCredentials Credentials { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/UiPathWebApi.cs:
--------------------------------------------------------------------------------
1 | namespace UiPath.Web.Client20194
2 | {
3 | public partial class UiPathWebApi : Client.Generic.IUiPathWebApi
4 | {
5 | }
6 | }
7 |
8 | namespace UiPath.Web.Client201910
9 | {
10 | public partial class UiPathWebApi : Client.Generic.IUiPathWebApi
11 | {
12 | }
13 | }
14 |
15 | namespace UiPath.Web.Client20204
16 | {
17 | public partial class UiPathWebApi : Client.Generic.IUiPathWebApi
18 | {
19 | }
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UiPath.PowerShell.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/LockUser.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194;
4 | using UiPath.Web.Client20194.Models;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Lock, Nouns.User)]
9 | public class LockUser : UserCmdlet
10 | {
11 | protected override void ProcessRecord(long userId) =>
12 | Api.Users.SetActiveById(userId, new SetUserActiveParameters(false));
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/UnlockUser.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194;
4 | using UiPath.Web.Client20194.Models;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Unlock, Nouns.User)]
9 | public class UnlockUser : UserCmdlet
10 | {
11 | protected override void ProcessRecord(long userId) =>
12 | Api.Users.SetActiveById(userId, new SetUserActiveParameters(true));
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/EnumExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UiPath.PowerShell.Util
4 | {
5 | public static class EnumExtensions
6 | {
7 | public static TEnum Cast(this Enum val) where TEnum : struct
8 | {
9 | if (Enum.TryParse(val.ToString(), out var result))
10 | {
11 | return result;
12 | }
13 |
14 | throw new Exception($"Cannot cast value {val} ({val.GetType().Name}) to type {typeof(TEnum).Name}");
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Generate-CmdletDocs.ps1:
--------------------------------------------------------------------------------
1 |
2 | $cmdlets = Get-Command -Module UiPath.PowerShell | select Name
3 |
4 | $file = "docs\Home.md"
5 | "" | Out-File $file -Encoding utf8
6 | foreach($cmdlet in $cmdlets)
7 | {
8 | "- [$($cmdlet.Name)]($($cmdlet.Name).md)" | Out-File $file -Encoding utf8 -Append
9 | }
10 |
11 | foreach($cmdlet in $cmdlets)
12 | {
13 | $file = "docs\$($cmdlet.Name).md"
14 | "``````PowerShell" | Out-File $file -Encoding utf8
15 | Get-Help $cmdlet.Name -full | Out-File $file -Encoding utf8 -Append
16 | "``````" | Out-File $file -Encoding utf8 -Append
17 | }
--------------------------------------------------------------------------------
/UiPath.Web.Client/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/UiPath.PowerShell.Tests/Util/TestFileFixture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace UiPath.PowerShell.Tests.Util
9 | {
10 | public class TestFileFixture: IDisposable
11 | {
12 | public string FileName { get; set; }
13 |
14 | public void Dispose()
15 | {
16 | if (File.Exists(FileName))
17 | {
18 | File.Delete(FileName);
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/OrchestratorProtocolVersion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UiPath.PowerShell.Util
4 | {
5 | internal static class OrchestratorProtocolVersion
6 | {
7 | internal const string sV19_10 = "9.0";
8 | internal const string sV20_4 = "10.0";
9 | internal const string sV18_1 = "4.0";
10 |
11 | internal static Version V18_1 => Version.Parse(sV18_1);
12 |
13 | internal static Version V19_10 => Version.Parse(sV19_10);
14 |
15 | internal static Version V20_4 => Version.Parse(sV20_4);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/UiPath.PowerShell.Tests/Util/PackageSpec.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace UiPath.PowerShell.Tests.Util
8 | {
9 | public class PackageSpec
10 | {
11 | public string Id { get; set; }
12 | public Version Version { get; set; }
13 | public string Authors { get; set; }
14 | public string Title { get; set; }
15 | public string Description { get; set; }
16 | public string ReleaseNotes { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/ExtendedFolder.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client201910.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class ExtendedFolder: Folder
9 | {
10 | public bool? IsSelectable { get; set; }
11 |
12 | public bool? HasChildren { get; set; }
13 |
14 | public int? Level { get; set; }
15 |
16 | public static ExtendedFolder FromDto(ExtendedFolderDto dto) => dto.To();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetLicense.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.License)]
9 | public class GetLicense : AuthenticatedCmdlet
10 | {
11 | protected override void ProcessRecord()
12 | {
13 | var license = HandleHttpOperationException(() => Api.Settings.GetLicense());
14 | WriteObject(License.FromDto(license));
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/ClearAuthToken.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Util;
3 |
4 | namespace UiPath.PowerShell.Cmdlets
5 | {
6 | ///
7 | /// Clears the Orchestrator authentication token from the Powershell session.
8 | ///
9 | [Cmdlet(VerbsCommon.Clear, Nouns.AuthToken)]
10 | public class ClearAuthToken: AuthenticatedCmdlet
11 | {
12 | protected override void ProcessRecord()
13 | {
14 | AuthenticatedCmdlet.SetAuthToken(null);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/NetworkAuthenticationCredentials.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Rest;
2 | using System.Linq;
3 | using System.Net;
4 | using System.Net.Http;
5 |
6 | namespace UiPath.PowerShell.Util
7 | {
8 | internal class NetworkAuthenticationCredentials: ServiceClientCredentials
9 | {
10 | public ICredentials Credentials { get; set; }
11 |
12 | public override void InitializeServiceClient(ServiceClient client)
13 | {
14 |
15 | var handler = client.HttpMessageHandlers.First();
16 |
17 | //handler.Credentials = Credentials;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/UserRole.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using UiPath.PowerShell.Util;
6 | using UiPath.Web.Client201910.Models;
7 |
8 | namespace UiPath.PowerShell.Models
9 | {
10 | [TypeConverter(typeof(UiPathTypeConverter))]
11 | public class UserRole
12 | {
13 | public long Id { get; set; }
14 |
15 | public Hashtable UserEntity { get; set; }
16 |
17 | public Hashtable[] Roles { get; set; }
18 |
19 | public static UserRole FromDto(UserRolesDto dto) => dto.To();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Timezone.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class Timezone
9 | {
10 | public string Name { get; internal set; }
11 | public string Value { get; internal set; }
12 |
13 | internal static Timezone FromDto(NameValueDto dto)
14 | {
15 | return new Timezone
16 | {
17 | Name = dto.Name,
18 | Value = dto.Value
19 | };
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/EditCmdlet.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Management.Automation;
4 |
5 | namespace UiPath.PowerShell.Util
6 | {
7 | public abstract class EditCmdlet: AuthenticatedCmdlet
8 | {
9 | protected void ProcessImpl(
10 | Func getItem,
11 | Action updateItem)
12 | {
13 | bool hasAction = false;
14 |
15 | DtoType dto = getItem();
16 |
17 | (dto, hasAction) = this.ApplySetParameters(dto);
18 |
19 | if (hasAction)
20 | {
21 | updateItem(dto);
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetPermission.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Models;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Get, Nouns.Permission)]
10 | public class GetPermission : FilteredBaseCmdlet
11 | {
12 | protected override void ProcessRecord()
13 | {
14 | ProcessImpl(
15 | (filter) => Api.Permissions.GetPermissions(filter: filter).Value.Where(p => Permission.IsVisiblePermission(p)).ToList(),
16 | (dto) => Permission.FromDto(dto).Name);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/AddPackage.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Add, Nouns.Package)]
9 | public class AddPackage:AuthenticatedCmdlet
10 | {
11 | [Parameter(Mandatory = true, Position = 0)]
12 | public string PackageFile { get; set; }
13 |
14 | protected override void ProcessRecord()
15 | {
16 | using (var stream = File.OpenRead(PackageFile))
17 | {
18 | HandleHttpOperationException(() => Api.Processes.UploadPackage(stream));
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/MaintenanceLog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910.Models;
5 |
6 | namespace UiPath.PowerShell.Models
7 | {
8 | [TypeConverter(typeof(UiPathTypeConverter))]
9 | public class MaintenanceLog
10 | {
11 | public string State { get; internal set; }
12 |
13 | public DateTime? TimeStamp { get; internal set; }
14 |
15 | internal static MaintenanceLog FromDto(MaintenanceStateLog input)
16 | {
17 | return new MaintenanceLog()
18 | {
19 | State = input.State.ToString(),
20 | TimeStamp = input.TimeStamp,
21 | };
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/HashtableExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using UiPath.Web.Client201910.Models;
5 |
6 | namespace UiPath.PowerShell.Util
7 | {
8 | internal static class HashtableExtensions
9 | {
10 | public static List ToKeyList(this Hashtable ht)
11 | {
12 | return ht.Cast().Select(de => new CustomKeyValuePair
13 | {
14 | Key = de.Key.ToString(),
15 | Value = de.Value.ToString()
16 | }).ToList();
17 | }
18 |
19 | public static Hashtable ToHashtable(this IDictionary dict) => new Hashtable((IDictionary)dict);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Webhook.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.ComponentModel;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194.Models;
5 |
6 | namespace UiPath.PowerShell.Models
7 | {
8 | [TypeConverter(typeof(UiPathTypeConverter))]
9 | public class Webhook
10 | {
11 | public string Url { get; internal set; }
12 | public string Secret { get; internal set; }
13 | public bool Enabled { get; internal set; }
14 | public long? Id { get; private set; }
15 | public bool AllowInsecureSsl { get; private set; }
16 | public Hashtable[] Events { get; private set; }
17 | public bool AllEvents { get; private set; }
18 |
19 | internal static Webhook FromDto(WebhookDto dto) => dto.To();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/UserCmdlet.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 |
4 | namespace UiPath.PowerShell.Util
5 | {
6 | public abstract class UserCmdlet : AuthenticatedCmdlet
7 | {
8 | [ValidateNotNull]
9 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
10 | public long? Id { get; set; }
11 |
12 | [ValidateNotNull]
13 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "User", ValueFromPipeline = true)]
14 | public User User { get; set; }
15 |
16 | protected abstract void ProcessRecord(long userId);
17 |
18 | protected override void ProcessRecord() =>
19 | HandleHttpOperationException(() => ProcessRecord(User?.Id ?? Id.GetValueOrDefault()));
20 | }
21 | }
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetWebhook.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.Webhook)]
9 | public class GetWebhook : FilteredIdCmdlet
10 | {
11 | [Filter]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string Url { get; set; }
14 |
15 | protected override void ProcessRecord()
16 | {
17 | ProcessImpl(
18 | (filter, top, skip) => Api.Webhooks.GetWebhooks(filter: filter, top: top, skip: skip, count: false),
19 | id => Api.Webhooks.GetById(id),
20 | dto => Webhook.FromDto(dto));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetCurrentUserFolders.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.FolderCurrentUser)]
9 | public class GetCurrentUserFolders : AuthenticatedCmdlet
10 | {
11 | protected override void ProcessRecord()
12 | {
13 | var folders = HandleHttpOperationException(() => Api_19_10.FoldersNavigation.GetAllFoldersForCurrentUser());
14 | if (folders != null)
15 | {
16 | foreach (var f in folders)
17 | {
18 | WriteObject(ExtendedFolder.FromDto(f));
19 | }
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveAsset.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Asset)]
9 | public class RemoveAsset: AuthenticatedCmdlet
10 | {
11 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
12 | public long? Id { get; set; }
13 |
14 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Asset", ValueFromPipeline = true)]
15 | public Asset Asset { get; set; }
16 |
17 | protected override void ProcessRecord()
18 | {
19 | HandleHttpOperationException(() => Api.Assets.DeleteById(Asset?.Id ?? Id.Value));
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetTimeZones.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | ///
9 | /// Shows the valid time zone names recognized by the Orchestrator.
10 | ///
11 | [Cmdlet(VerbsCommon.Get, Nouns.TimeZones)]
12 | public class GetTimeZones : AuthenticatedCmdlet
13 | {
14 | protected override void ProcessRecord()
15 | {
16 | var timeZones = HandleHttpOperationException(() => Api.Settings.GetTimezones());
17 | foreach(var tz in timeZones.Items)
18 | {
19 | WriteObject(Timezone.FromDto(tz));
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("UiPath.Web.Client")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 |
11 | // Setting ComVisible to false makes the types in this assembly not visible
12 | // to COM components. If you need to access a type in this assembly from
13 | // COM, set the ComVisible attribute to true on that type.
14 | [assembly: ComVisible(false)]
15 |
16 | // The following GUID is for the ID of the typelib if this project is exposed to COM
17 | [assembly: Guid("4729246b-ee53-4760-bce3-05f14640dfb0")]
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/SetAuthToken.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 |
5 | namespace UiPath.PowerShell.Cmdlets
6 | {
7 | ///
8 | /// Sets the Powershell session Orchestrator authentication token.
9 | ///
10 | [Cmdlet(VerbsCommon.Set, Nouns.AuthToken)]
11 | public class SetAuthToken: UiPathCmdlet
12 | {
13 | [Parameter(Mandatory = true, ParameterSetName = "AuthToken", Position = 0, ValueFromPipeline = true)]
14 | public AuthToken AuthToken { get; set; }
15 |
16 | protected override void ProcessRecord()
17 | {
18 | if (AuthToken != null)
19 | {
20 | AuthenticatedCmdlet.SetAuthToken(AuthToken);
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Environment.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class Environment
9 | {
10 | public long Id { get; private set; }
11 | public string Name { get; private set; }
12 | public string Description { get; private set; }
13 | public string Type { get; private set; }
14 |
15 | internal static Environment FromDto(EnvironmentDto dto)
16 | {
17 | return new Environment
18 | {
19 | Id = dto.Id.Value,
20 | Name = dto.Name,
21 | Description = dto.Description,
22 | Type = dto.Type.ToString(),
23 | };
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveRole.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Role)]
9 | public class RemoveRole : AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public int? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Role", ValueFromPipeline = true)]
17 | public Role Role { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Roles.DeleteById(Role?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveUser.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.User)]
9 | public class RemoveUser: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "User", ValueFromPipeline = true)]
17 | public User User { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Users.DeleteById(User?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveFolder.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 |
5 | namespace UiPath.PowerShell.Cmdlets
6 | {
7 | [Cmdlet(VerbsCommon.Remove, Nouns.Folder)]
8 | public class RemoveFolder : AuthenticatedCmdlet
9 | {
10 | [ValidateNotNull]
11 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
12 | public long? Id { get; set; }
13 |
14 | [ValidateNotNull]
15 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Folder", ValueFromPipeline = true)]
16 | public Folder Folder { get; set; }
17 |
18 | protected override void ProcessRecord()
19 | {
20 | HandleHttpOperationException(() => Api_19_10.Folders.DeleteByIdWithHttpMessagesAsync(Folder?.Id ?? Id.Value));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveRobot.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Robot)]
9 | public class RemoveRobot: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Robot", ValueFromPipeline = true)]
17 | public Robot Robot { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Robots.DeleteById(Robot?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveTenant.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Tenant)]
9 | public class RemoveTenant: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public int? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Tenant", ValueFromPipeline = true)]
17 | public Tenant Tenant { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Tenants.DeleteById(Tenant?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell.Tests/Util/TestContextExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Microsoft.VisualStudio.TestTools.UnitTesting;
7 |
8 | namespace UiPath.PowerShell.Tests.Util
9 | {
10 | internal static class TestContextExtensions
11 | {
12 | internal static string GetTestParameter(this TestContext testContext, string name)
13 | {
14 | var propValue = testContext.Properties[name]?.ToString();
15 | if (string.IsNullOrWhiteSpace(propValue))
16 | {
17 | throw new ArgumentException($"Ensure that the \"{name}\" parameter is set in the .runsettings file, and that the .runsettings file has been attached to the test runner.", name);
18 | }
19 |
20 | return propValue;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveBucket.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20204;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Bucket)]
9 | public class RemoveBucket : AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Bucket", ValueFromPipeline = true)]
17 | public Bucket Bucket { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api_20_4.Buckets.DeleteById(Bucket?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveMachine.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Machine)]
9 | public class RemoveMachine : AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Machine", ValueFromPipeline = true)]
17 | public Machine Machine { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Machines.DeleteById(Machine?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveProcess.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Process)]
9 | public class RemoveProcess: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Process", ValueFromPipeline = true)]
17 | public Process Process { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Releases.DeleteById(Process?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/AddEnvironmentRobot.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Add, Nouns.EnvironmentRobot)]
10 | public class AddEnvironmentRobot: AuthenticatedCmdlet
11 | {
12 | [Parameter(Mandatory = true)]
13 | public Environment Environment { get; set; }
14 |
15 | [Parameter(Mandatory = true)]
16 | public Robot Robot { get; set; }
17 |
18 | protected override void ProcessRecord()
19 | {
20 | HandleHttpOperationException(() => Api.Environments.AddRobotById(Environment.Id, new AddRobotParameters
21 | {
22 | RobotId = Robot.Id.ToString()
23 | }));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetAsset.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.Asset)]
9 | public class GetAsset: FilteredBaseCmdlet
10 | {
11 | [Filter]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string Name { get; set; }
14 |
15 | [Filter]
16 | [Parameter(ParameterSetName = "Filter")]
17 | public string Description { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | ProcessImpl(
22 | (filter, top, skip) => Api_19_10.Assets.GetAssets(filter: filter, expand: "RobotValues", top: top, skip: skip, count: false),
23 | dto => Asset.FromDto(dto));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveWebhook.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Webhook)]
9 | public class RemoveWebhook : AuthenticatedCmdlet
10 | {
11 | [ValidateNotNullOrEmpty]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Webhook", ValueFromPipeline = true)]
17 | public Webhook Webhook { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Webhooks.DeleteById(Webhook?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveLibrary.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Library)]
9 | public class RemoveLibrary : AuthenticatedCmdlet
10 | {
11 | [ValidateNotNullOrEmpty]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public string Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Library", ValueFromPipeline = true)]
17 | public Library Library { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Libraries.DeleteById(Library?.Id ?? Id));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveQueueItem.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.QueueItem)]
9 | public class RemoveQueueItem: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "QueueItem", ValueFromPipeline = true)]
17 | public QueueItem QueueItem { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.QueueItems.DeleteById(QueueItem?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveEnvironment.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Environment)]
9 | public class RemoveEnvironment: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Environment", ValueFromPipeline = true)]
17 | public Environment Environment { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.Environments.DeleteById(Environment?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetBucket.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20204;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.Bucket)]
9 | public class GetBucket : FilteredIdCmdlet
10 | {
11 | [Filter]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string Name { get; set; }
14 |
15 | [Filter]
16 | [Parameter(ParameterSetName = "Filter")]
17 | public string StorageProvider { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | ProcessImpl(
22 | (filter, top, skip) => Api_20_4.Buckets.Get(filter: filter, top: top, skip: skip, count: false),
23 | id => Api_20_4.Buckets.GetById(id),
24 | dto => Bucket.FromDto(dto));
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveProcessSchedule.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 |
9 | [Cmdlet(VerbsCommon.Remove, Nouns.ProcessSchedule)]
10 | public class RemoveProcessSchedule : AuthenticatedCmdlet
11 | {
12 | [ValidateNotNullOrEmpty]
13 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
14 | public long? Id { get; set; }
15 |
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "ProcessSchedule", ValueFromPipeline = true)]
17 | public ProcessSchedule ProcessSchedule { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.ProcessSchedules.DeleteById(ProcessSchedule?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RegisterLicense.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | ///
9 | /// Uploads a license file to Orchestrator
10 | ///
11 | [Cmdlet(VerbsLifecycle.Register, Nouns.License)]
12 | public class RegisterLicense: AuthenticatedCmdlet
13 | {
14 | ///
15 | /// The license file location
16 | ///
17 | [Parameter(Mandatory = true, Position = 0)]
18 | public string LicenseFile { get; set; }
19 |
20 | protected override void ProcessRecord()
21 | {
22 | using (var stream = File.OpenRead(LicenseFile))
23 | {
24 | HandleHttpOperationException(() => Api.Settings.UploadLicense(stream));
25 | }
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetFolder.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.Folder)]
9 | public class GetFolder : FilteredIdCmdlet
10 | {
11 | [Filter]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string DisplayName { get; set; }
14 |
15 | [Filter]
16 | [Parameter(ParameterSetName = "Filter")]
17 | public string FullyQualifiedName { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | ProcessImpl(
22 | (filter, top, skip) => Api_19_10.Folders.GetFolders(filter: filter, top: top, skip: skip, count: false),
23 | id => Api_19_10.Folders.GetById(id),
24 | dto => Folder.FromDto(dto));
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveQueueDefinition.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.QueueDefinition)]
9 | public class RemoveQueueDefinition: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNull]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
13 | public long? Id { get; set; }
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "QueueDefinition", ValueFromPipeline = true)]
17 | public QueueDefinition QueueDefinition { get; set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | HandleHttpOperationException(() => Api.QueueDefinitions.DeleteById(QueueDefinition?.Id ?? Id.Value));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/CredentialStore.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client201910.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class CredentialStore
9 | {
10 | public long Id { get; private set; }
11 | public string Name { get; private set; }
12 | public string Type { get; private set; }
13 | public string AdditionalConfiguration { get; private set; }
14 | public bool? IsReadOnly { get; private set; }
15 |
16 | internal static CredentialStore FromDto(CredentialStoreDto dto) =>
17 | new CredentialStore
18 | {
19 | Id = dto.Id.Value,
20 | Name = dto.Name,
21 | Type = dto.Type,
22 | AdditionalConfiguration = dto.AdditionalConfiguration,
23 | IsReadOnly = dto.Details?.IsReadOnly
24 | };
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Permission.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class Permission
9 | {
10 | public long? Id { get; private set; }
11 | public string Name { get; private set; }
12 | public int? RoleId { get; private set; }
13 | public bool? IsGranted { get; private set; }
14 |
15 | internal static Permission FromDto(PermissionDto dto)
16 | {
17 | return new Permission
18 | {
19 | Id = dto.Id,
20 | Name = dto.Name,
21 | RoleId = dto.RoleId,
22 | IsGranted = dto.IsGranted
23 | };
24 | }
25 |
26 | internal static bool IsVisiblePermission(PermissionDto p)
27 | {
28 | return p.Name.Contains(".");
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/EditProcessSchedule.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 | using System.Collections;
7 | using System.Collections.Generic;
8 |
9 | namespace UiPath.PowerShell.Cmdlets
10 | {
11 | [Cmdlet(VerbsData.Edit, Nouns.ProcessSchedule)]
12 | public class EditProcessSchedule : EditCmdlet
13 | {
14 | [ValidateNotNull]
15 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
16 | public List Ids { get; set; }
17 |
18 | [SetParameter]
19 | [Parameter]
20 | public bool? Enabled { get; private set; }
21 |
22 | protected override void ProcessRecord()
23 | {
24 | HandleHttpOperationException(() => Api.ProcessSchedules.SetEnabled(new SetEnabledParameters(Ids, Enabled.Value)));
25 | }
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/MachineFolder.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20204.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class MachineFolder
9 | {
10 | public long? Id { get; set; }
11 | public string Name { get; set; }
12 | public string Description { get; set; }
13 | public string Type { get; set; }
14 | public int? NonProductionSlots { get; set; }
15 | public int? UnattendedSlots { get; set; }
16 | public int? HeadlessSlots { get; set; }
17 | public int? TestAutomationSlots { get; set; }
18 | public Folder Folder { get; private set; }
19 |
20 | public static MachineFolder FromDto(MachineFolderDto dto) => dto.To();
21 |
22 | internal MachineFolder WithFolder(Folder folder)
23 | {
24 | Folder = folder;
25 | return this;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs/Set-UiPathAuthToken.md:
--------------------------------------------------------------------------------
1 | ```PowerShell
2 |
3 | NAME
4 | Set-UiPathAuthToken
5 |
6 | SYNOPSIS
7 |
8 |
9 | SYNTAX
10 | Set-UiPathAuthToken [-AuthToken] []
11 |
12 |
13 | DESCRIPTION
14 |
15 |
16 | PARAMETERS
17 | -AuthToken
18 |
19 | Required? true
20 | Position? 0
21 | Default value
22 | Accept pipeline input? true (ByValue)
23 | Accept wildcard characters? false
24 |
25 |
26 | This cmdlet supports the common parameters: Verbose, Debug,
27 | ErrorAction, ErrorVariable, WarningAction, WarningVariable,
28 | OutBuffer, PipelineVariable, and OutVariable. For more information, see
29 | about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
30 |
31 | INPUTS
32 | UiPath.PowerShell.Models.AuthToken
33 |
34 |
35 | OUTPUTS
36 |
37 |
38 | RELATED LINKS
39 |
40 |
41 |
42 | ```
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/AddLibrary.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client201910;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Add, Nouns.Library)]
10 | public class AddLibrary : AuthenticatedCmdlet
11 | {
12 | [Parameter(Mandatory = true, Position = 0)]
13 | public string LibraryPackage { get; set; }
14 |
15 | protected override void ProcessRecord()
16 | {
17 | using (var fileStream = File.OpenRead(LibraryPackage))
18 | {
19 | if (Supports(OrchestratorProtocolVersion.V19_10))
20 | {
21 | HandleHttpOperationException(() => Api_19_10.Libraries.UploadPackage(fileStream));
22 | }
23 | else
24 | {
25 | HandleHttpOperationException(() => Api_19_4.Libraries.UploadPackage(fileStream));
26 | }
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetEnvironment.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194;
4 | using UiPath.Web.Client20194.Models;
5 | using Environment = UiPath.PowerShell.Models.Environment;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Get, Nouns.Environment)]
10 | public class GetEnvironment: FilteredIdCmdlet
11 | {
12 | [Filter]
13 | [Parameter(ParameterSetName = "Filter")]
14 | public string Name { get; set; }
15 |
16 | [Filter]
17 | [ValidateEnum(typeof(EnvironmentDtoType))]
18 | [Parameter(ParameterSetName = "Filter")]
19 | public string Type { get; set; }
20 |
21 | protected override void ProcessRecord()
22 | {
23 | ProcessImpl(
24 | (filter, top, skip) => Api.Environments.GetEnvironments(filter: filter, top: top, skip: skip, count: false),
25 | id => Api.Environments.GetById(id),
26 | dto => Environment.FromDto(dto));
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Setting.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class Setting
9 | {
10 | public string Name { get; private set; }
11 | public string Scope { get; private set; }
12 | public string Value { get; private set; }
13 |
14 | internal static Setting FromDto(SettingsDto dto)
15 | {
16 | return new Setting
17 | {
18 | Name = dto.Name,
19 | Scope = dto.Scope.ToString(),
20 | Value = dto.Value
21 | };
22 | }
23 |
24 | internal static object FromDto(KeyValuePairStringString dto, SettingsDtoScope? scope = null)
25 | {
26 | return new Setting
27 | {
28 | Name = dto.Key,
29 | Value = dto.Value,
30 | Scope = scope?.ToString()
31 | };
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetFolderUsers.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.FolderUsers)]
9 | public class GetFolderUsers : FilteredIdCmdlet
10 | {
11 | private const string FolderParameterSet = "Folder";
12 |
13 | [Parameter(Position = 0, ValueFromPipeline = true, ParameterSetName = FolderParameterSet)]
14 | public Folder Folder { get; private set; }
15 |
16 | [Parameter]
17 | public bool IncludeInherited { get; private set; }
18 |
19 | protected override void ProcessRecord()
20 | {
21 | var folder = Folder ?? InternalAuthToken.CurrentFolder;
22 |
23 | ProcessImpl(
24 | (filter, top, skip) => Api_19_10.Folders.GetUsersForFolderByKeyAndIncludeinherited(Id.HasValue ? Id.Value : folder.Id, IncludeInherited, filter: filter, top: top, skip: skip),
25 | dto => UserRole.FromDto(dto));
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveFolderUser.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910;
5 | using UiPath.Web.Client201910.Models;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Remove, Nouns.FolderUser)]
10 | public class RemoveFolderUser : AuthenticatedCmdlet
11 | {
12 | private const string FolderParameterSet = "Folder";
13 |
14 | [Parameter(Mandatory = true, ParameterSetName = "Id")]
15 | public long? Id { get; set; }
16 |
17 | [ValidateNotNull]
18 | [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = FolderParameterSet)]
19 | public Folder Folder { get; private set; }
20 |
21 | [Parameter]
22 | public long UserId { get; set; }
23 |
24 | protected override void ProcessRecord()
25 | {
26 | HandleHttpOperationException(() => Api_19_10.Folders.RemoveUserFromFolderById(Folder?.Id ?? Id.Value, new RemoveUserFromFolderParameters(UserId)));
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 UiPath
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/StopJob.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsLifecycle.Stop, Nouns.Job)]
10 | public class StopJob: AuthenticatedCmdlet
11 | {
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Job")]
13 | public Models.Job Job { get; set; }
14 |
15 |
16 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "JobId")]
17 | public long? JobId { get; set; }
18 |
19 | [ValidateEnum(typeof(StopJobParametersEnum))]
20 | [Parameter(Mandatory = true, Position = 1)]
21 | public string Strategy { get; set; }
22 |
23 | protected override void ProcessRecord()
24 | {
25 | HandleHttpOperationException(() => Api.Jobs.StopJobById(Job?.Id ?? JobId.Value, new StopJobParameters
26 | {
27 | Strategy = (StopJobParametersEnum)Enum.Parse(typeof(StopJobParametersEnum), Strategy)
28 | }));
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetLibrary.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.Library)]
9 | public class GetLibrary : FilteredBaseCmdlet
10 | {
11 |
12 | [Filter]
13 | [Parameter(ParameterSetName = "Filter")]
14 | public string Authors { get; private set; }
15 |
16 | [Filter]
17 | [Parameter(ParameterSetName = "Filter")]
18 | public string Title { get; private set; }
19 |
20 | [Filter]
21 | [Parameter(ParameterSetName = "Filter")]
22 | public string Version { get; private set; }
23 |
24 | [Filter]
25 | [Parameter(ParameterSetName = "Filter")]
26 | public string Id { get; private set; }
27 |
28 | protected override void ProcessRecord()
29 | {
30 | ProcessImpl(
31 | (filter, top, skip) => Api.Libraries.GetLibraries(filter: filter, top: top, skip: skip, count: false),
32 | dto => Library.FromDto(dto));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemovePackage.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Remove, Nouns.Package)]
9 | public class RemovePackage: AuthenticatedCmdlet
10 | {
11 | [ValidateNotNullOrEmpty]
12 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Key")]
13 | public string Id { get; set; }
14 |
15 | [Parameter(ParameterSetName = "Key")]
16 | public string Version { get; set; }
17 |
18 | [ValidateNotNull]
19 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Package", ValueFromPipeline = true)]
20 | public Package Package { get; set; }
21 |
22 | protected override void ProcessRecord()
23 | {
24 | string key = Package?.Key ?? Id;
25 | if (Package == null && Version != null)
26 | {
27 | key += ":" + Version;
28 | }
29 | HandleHttpOperationException(() => Api.Processes.DeleteById(key));
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetFolderMachines.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20204;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.FolderMachines)]
9 | public class GetFolderMachines :FilteredIdCmdlet
10 | {
11 | internal const string IsAssignedtoFolderFilter = "IsAssignedToFolder eq true";
12 |
13 | private const string FolderParameterSet = "Folder";
14 |
15 | [Parameter(Position = 0, ValueFromPipeline = true, ParameterSetName = FolderParameterSet)]
16 | public Folder Folder { get; private set; }
17 |
18 | protected override void ProcessRecord()
19 | {
20 | var folder = Folder ?? InternalAuthToken.CurrentFolder;
21 |
22 | ProcessImpl(
23 | (filter, top, skip) => Api_20_4.Folders.GetMachinesForFolderByKey(folder.Id, filter: filter, skip: skip, top: top),
24 | dto => MachineFolder.FromDto(dto).WithFolder(folder));
25 | }
26 |
27 | protected override string ImplicitFilter => IsAssignedtoFolderFilter;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetJob.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client20194;
4 |
5 | namespace UiPath.PowerShell.Cmdlets
6 | {
7 | [Cmdlet(VerbsCommon.Get, Nouns.Job)]
8 | public class GetJob: FilteredIdCmdlet
9 | {
10 | [Filter]
11 | [ValidateEnum(typeof(UiPath.Web.Client20204.Models.JobDtoSourceType))]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string Source { get; set; }
14 |
15 | [Filter]
16 | [ValidateEnum(typeof(UiPath.Web.Client20204.Models.JobDtoState))]
17 | [Parameter(ParameterSetName = "Filter")]
18 | public string State { get; set; }
19 |
20 | [Filter]
21 | [Parameter(ParameterSetName = "Filter")]
22 | public string ReleaseName { get; set; }
23 |
24 | protected override void ProcessRecord()
25 | {
26 | ProcessImpl(
27 | (filter, top, skip) => Api_19_4.Jobs.GetJobs(filter: filter, top: top, skip: skip, count: false),
28 | id => Api_19_4.Jobs.GetById(id),
29 | dto => Models.Job.FromDto(dto));
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Util/ValidateEnumAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Management.Automation;
5 |
6 | namespace UiPath.PowerShell.Util
7 | {
8 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
9 | public class ValidateEnumAttribute : ValidateEnumeratedArgumentsAttribute
10 | {
11 | private string[] _enumValues;
12 |
13 | public Type EnumType { get; private set; }
14 |
15 | public ValidateEnumAttribute(Type type)
16 | {
17 | _enumValues = Enum.GetNames(type);
18 | EnumType = type;
19 | }
20 |
21 | public IList ValidValues => _enumValues.ToList();
22 |
23 | protected override void ValidateElement(object element)
24 | {
25 | if (!_enumValues.Contains(element.ToString()))
26 | {
27 | throw new ValidationMetadataException($"The argument \"{element}\" does not belong to the set \"{String.Join(",", _enumValues)}\" specified by the ValidateEnum attribute. Supply an argument that is in the set and then try the command again");
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Models;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194;
6 | using UiPath.Web.Client20194.Models;
7 |
8 | namespace UiPath.PowerShell.Cmdlets
9 | {
10 | [Cmdlet(VerbsCommon.Get, Nouns.Setting)]
11 | public class GetSettings : FilteredBaseCmdlet
12 | {
13 | public enum SettingsType
14 | {
15 | General,
16 | }
17 |
18 | [Parameter]
19 | [ValidateEnum(typeof(SettingsType))]
20 | public string Type { get; set; }
21 |
22 | protected override void ProcessRecord()
23 | {
24 | SettingsType type = SettingsType.General;
25 | Enum.TryParse(Type, out type);
26 |
27 | switch (type)
28 | {
29 | case SettingsType.General:
30 | ProcessImpl(
31 | (filter, top, skip) => Api.Settings.GetSettings(filter: filter, top: top, skip: skip, count: false),
32 | dto => Setting.FromDto(dto));
33 | break;
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Tenant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194.Models;
5 |
6 | namespace UiPath.PowerShell.Models
7 | {
8 | [TypeConverter(typeof(UiPathTypeConverter))]
9 | public class Tenant
10 | {
11 | public int Id { get; private set; }
12 | public string Name { get; private set; }
13 | public string AdminName { get; private set; }
14 | public string AdminSurname { get; private set; }
15 | public string AdminEmailAddress { get; private set; }
16 | public bool? IsActive { get; private set; }
17 | public DateTime? LastLoginTime { get; private set; }
18 |
19 | internal static Tenant ForDto(TenantDto dto)
20 | {
21 | return new Tenant
22 | {
23 | Id = dto.Id.Value,
24 | Name = dto.Name,
25 | AdminName = dto.AdminName,
26 | AdminSurname = dto.AdminSurname,
27 | AdminEmailAddress = dto.AdminEmailAddress,
28 | IsActive = dto.IsActive,
29 | LastLoginTime= dto.LastLoginTime
30 | };
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Process.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.ComponentModel;
3 | using System.Management.Automation;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Models
8 | {
9 | [TypeConverter(typeof(UiPathTypeConverter))]
10 | public class Process
11 | {
12 | public long Id { get; private set; }
13 | public bool? IsLatestVersion { get; private set; }
14 | public bool? IsProcessDeleted { get; private set; }
15 | public string Name { get; private set; }
16 | public string Description { get; private set; }
17 | public long? EnvironmentId { get; private set; }
18 | public string Key { get; private set; }
19 | public string ProcessId => ProcessKey;
20 | public string ProcessVersion { get; private set; }
21 | [Hidden]
22 | public string ProcessKey { get; private set; }
23 | public Hashtable Arguments { get; private set; }
24 | public Hashtable ProcessSettings { get; private set; }
25 | public bool AutoUpdate { get; private set; }
26 |
27 | internal static Process FromDto(T dto) => dto.To();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetTenant.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.Tenant)]
9 | public class GetTenant: FilteredIdCmdlet
10 | {
11 | [Filter]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string Name { get; private set; }
14 |
15 | [Filter]
16 | [Parameter(ParameterSetName = "Filter")]
17 | public string AdminName { get; private set; }
18 |
19 | [Filter]
20 | [Parameter(ParameterSetName = "Filter")]
21 | public string AdminSurname { get; private set; }
22 |
23 | [Filter]
24 | [Parameter(ParameterSetName = "Filter")]
25 | public string AdminEmailAddress { get; private set; }
26 |
27 | protected override void ProcessRecord()
28 | {
29 | ProcessImpl(
30 | (filter, top, skip) => Api.Tenants.GetTenants(filter: filter, top: top, skip: skip, count: false),
31 | id => Api.Tenants.GetById((int)id),
32 | dto => Tenant.ForDto(dto));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/UiPath.PowerShell.Tests/Util/TestSettings.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.TestTools.UnitTesting;
2 |
3 | namespace UiPath.PowerShell.Tests.Util
4 | {
5 | internal class TestSettings
6 | {
7 | public string URL { get; set; }
8 | public string TenantName { get; set; }
9 | public string UserName { get; set; }
10 |
11 | public string Password { get; set; }
12 |
13 | public string HostPassword { get; set; }
14 |
15 | public static TestSettings FromTestContext(TestContext testContext)
16 | {
17 | var url = testContext.GetTestParameter("url");
18 | var tenantName = testContext.GetTestParameter("tenantName");
19 | var userName = testContext.GetTestParameter("userName");
20 | var password = testContext.GetTestParameter("password");
21 | var hostPassword = testContext.GetTestParameter("hostPassword");
22 |
23 | return new TestSettings
24 | {
25 | URL = url,
26 | TenantName = tenantName,
27 | UserName = userName,
28 | Password = password,
29 | HostPassword = hostPassword
30 |
31 | };
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Job.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.ComponentModel;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Models
8 | {
9 | [TypeConverter(typeof(UiPathTypeConverter))]
10 | public class Job
11 | {
12 | public long Id { get; private set; }
13 | public string Info { get; private set; }
14 | public Guid? Key { get; private set; }
15 | public Hashtable Release { get; private set; }
16 | public string ReleaseName { get; private set; }
17 | public long? RobotId { get; private set; }
18 | public string Source { get; private set; }
19 | public DateTime? StartTime { get; private set; }
20 | public string State { get; private set; }
21 | public long? StartingScheduleId { get; private set; }
22 | public Guid? BatchExecutionKey { get; private set; }
23 | public DateTime? CreationTime { get; private set; }
24 | public DateTime? EndTime { get; private set; }
25 |
26 | public string InputArguments { get; private set; }
27 |
28 | public string OutputArguments { get; private set; }
29 |
30 | internal static Job FromDto(T dto) => dto.To();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetLibraryVersion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Management.Automation;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using UiPath.PowerShell.Models;
8 | using UiPath.PowerShell.Util;
9 | using UiPath.Web.Client20194;
10 |
11 | namespace UiPath.PowerShell.Cmdlets
12 | {
13 | [Cmdlet(VerbsCommon.Get, Nouns.LibraryVersion)]
14 | public class GetLibraryVersion : FilteredBaseCmdlet
15 | {
16 | [ValidateNotNullOrEmpty]
17 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
18 | public string Id { get; set; }
19 |
20 | [ValidateNotNull]
21 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Library", ValueFromPipeline = true)]
22 | public Library Library { get; set; }
23 |
24 | [Filter]
25 | [Parameter]
26 | public bool IsLatestVersion { get; private set; }
27 |
28 | protected override void ProcessRecord()
29 | {
30 | ProcessImpl(
31 | (filter, top, skip) => Api.Libraries.GetVersionsByPackageid(Library?.Id ?? Id, filter: filter, top: top, skip: skip, count: false),
32 | dto => Library.FromDto(dto));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/UiPath.BindingResolve.ps1:
--------------------------------------------------------------------------------
1 | $OnAssemblyResolve = [System.ResolveEventHandler] {
2 | param($sender, $e)
3 |
4 | if ($e.Name.StartsWith("System.Net.Http,"))
5 | {
6 | [system.diagnostics.debug]::WriteLine("Binding redirect $($e.Name) resolved to $($script:httpNet.Location)")
7 | return $script:httpNet
8 | }
9 |
10 | return $null
11 | }
12 |
13 | # See https://github.com/dotnet/runtime/issues/20777#issuecomment-338418610
14 |
15 | if ($env:UIPATH_POWERSHELL_SKIP_BINDING_REDIRECT -ne $true)
16 | {
17 | $dllPath = "$PSScriptRoot\lib\netstandard2.0\UiPath.PowerShell.dll"
18 | if (Test-Path $dllPath)
19 | {
20 | Write-Verbose "Installing assembly resolve binding redirect callback, loading: $dllPath"
21 |
22 | $script:httpNet = [reflection.assembly]::Load("System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
23 |
24 | [System.AppDomain]::CurrentDomain.add_AssemblyResolve($OnAssemblyResolve)
25 | try
26 | {
27 | $module = [reflection.assembly]::LoadFrom($dllPath)
28 | $null = $module.GetTypes()
29 | }
30 | finally
31 | {
32 | [System.AppDomain]::CurrentDomain.remove_AssemblyResolve($OnAssemblyResolve)
33 | Write-Verbose "Removed assembly resolve binding redirect callback"
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Folder.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using UiPath.PowerShell.Util;
3 | using UiPath.Web.Client201910.Models;
4 |
5 | namespace UiPath.PowerShell.Models
6 | {
7 | [TypeConverter(typeof(UiPathTypeConverter))]
8 | public class Folder
9 | {
10 | public long Id { get; set; }
11 |
12 | public string DisplayName { get; set; }
13 |
14 | public string FullyQualifiedName { get; set; }
15 |
16 | public string Description { get; set; }
17 |
18 | public string ProvisionType { get; set; }
19 |
20 | public string PermissionModel { get; set; }
21 |
22 | public long? ParentId { get; set; }
23 |
24 | public static Folder FromDto(FolderDto dto)
25 | {
26 | return new Folder
27 | {
28 | Id = dto.Id.Value,
29 | DisplayName = dto.DisplayName,
30 | FullyQualifiedName = dto.FullyQualifiedName,
31 | Description = dto.Description,
32 | ProvisionType = dto.ProvisionType.ToString(),
33 | PermissionModel = dto.PermissionModel.ToString(),
34 | ParentId = dto.ParentId,
35 | };
36 | }
37 |
38 | public override string ToString() => FullyQualifiedName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/docs/Get-UiPathLicense.md:
--------------------------------------------------------------------------------
1 | ```PowerShell
2 |
3 | NAME
4 | Get-UiPathLicense
5 |
6 | SYNOPSIS
7 |
8 |
9 | SYNTAX
10 | Get-UiPathLicense [-AuthToken ] [-RequestTimeout ] []
11 |
12 |
13 | DESCRIPTION
14 |
15 |
16 | PARAMETERS
17 | -AuthToken
18 |
19 | Required? false
20 | Position? named
21 | Default value
22 | Accept pipeline input? false
23 | Accept wildcard characters? false
24 |
25 | -RequestTimeout
26 |
27 | Required? false
28 | Position? named
29 | Default value 100
30 | Accept pipeline input? false
31 | Accept wildcard characters? false
32 |
33 |
34 | This cmdlet supports the common parameters: Verbose, Debug,
35 | ErrorAction, ErrorVariable, WarningAction, WarningVariable,
36 | OutBuffer, PipelineVariable, and OutVariable. For more information, see
37 | about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
38 |
39 | INPUTS
40 |
41 | OUTPUTS
42 |
43 |
44 | RELATED LINKS
45 |
46 |
47 |
48 | ```
49 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/ODataValueOfInt64.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ODataValueOfInt64
13 | {
14 | ///
15 | /// Initializes a new instance of the ODataValueOfInt64 class.
16 | ///
17 | public ODataValueOfInt64()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ODataValueOfInt64 class.
24 | ///
25 | public ODataValueOfInt64(long? value = default(long?))
26 | {
27 | Value = value;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "value")]
39 | public long? Value { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/docs/Clear-UiPathAuthToken.md:
--------------------------------------------------------------------------------
1 | ```PowerShell
2 |
3 | NAME
4 | Clear-UiPathAuthToken
5 |
6 | SYNOPSIS
7 |
8 |
9 | SYNTAX
10 | Clear-UiPathAuthToken [-AuthToken ] [-RequestTimeout ] []
11 |
12 |
13 | DESCRIPTION
14 |
15 |
16 | PARAMETERS
17 | -AuthToken
18 |
19 | Required? false
20 | Position? named
21 | Default value
22 | Accept pipeline input? false
23 | Accept wildcard characters? false
24 |
25 | -RequestTimeout
26 |
27 | Required? false
28 | Position? named
29 | Default value 100
30 | Accept pipeline input? false
31 | Accept wildcard characters? false
32 |
33 |
34 | This cmdlet supports the common parameters: Verbose, Debug,
35 | ErrorAction, ErrorVariable, WarningAction, WarningVariable,
36 | OutBuffer, PipelineVariable, and OutVariable. For more information, see
37 | about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
38 |
39 | INPUTS
40 |
41 | OUTPUTS
42 |
43 |
44 | RELATED LINKS
45 |
46 |
47 |
48 | ```
49 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GrantRolePermission.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Models;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194;
6 | using UiPath.Web.Client20194.Models;
7 |
8 | namespace UiPath.PowerShell.Cmdlets
9 | {
10 | [Cmdlet(VerbsSecurity.Grant, Nouns.RolePermission)]
11 | public class GrantRolePermission : AuthenticatedCmdlet
12 | {
13 | [ValidateNotNull]
14 | [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true)]
15 | public Role Role { get; set; }
16 |
17 | [Parameter(Mandatory = true, Position = 1)]
18 | public string[] Permissions { get; set; }
19 |
20 | protected override void ProcessRecord()
21 | {
22 | var dto = Role.ToDto(Role);
23 |
24 | dto.Permissions = dto.Permissions
25 | .Select(p => p.Name)
26 | .Union(Permissions)
27 | .Distinct()
28 | .Select(p => new PermissionDto
29 | {
30 | Name = p,
31 | IsGranted = true,
32 | RoleId = dto.Id.Value
33 | }).ToList();
34 | HandleHttpOperationException(() => Api.Roles.PutById(dto.Id.Value, dto));
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/ODataValueOfBoolean.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ODataValueOfBoolean
13 | {
14 | ///
15 | /// Initializes a new instance of the ODataValueOfBoolean class.
16 | ///
17 | public ODataValueOfBoolean()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ODataValueOfBoolean class.
24 | ///
25 | public ODataValueOfBoolean(bool? value = default(bool?))
26 | {
27 | Value = value;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "value")]
39 | public bool? Value { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/ODataValueOfString.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ODataValueOfString
13 | {
14 | ///
15 | /// Initializes a new instance of the ODataValueOfString class.
16 | ///
17 | public ODataValueOfString()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ODataValueOfString class.
24 | ///
25 | public ODataValueOfString(string value = default(string))
26 | {
27 | Value = value;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "value")]
39 | public string Value { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/AddRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class AddRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the AddRobotParameters class.
16 | ///
17 | public AddRobotParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the AddRobotParameters class.
24 | ///
25 | public AddRobotParameters(string robotId = default(string))
26 | {
27 | RobotId = robotId;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "robotId")]
39 | public string RobotId { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/AddRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class AddRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the AddRobotParameters class.
16 | ///
17 | public AddRobotParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the AddRobotParameters class.
24 | ///
25 | public AddRobotParameters(string robotId = default(string))
26 | {
27 | RobotId = robotId;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "robotId")]
39 | public string RobotId { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/AddRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class AddRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the AddRobotParameters class.
16 | ///
17 | public AddRobotParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the AddRobotParameters class.
24 | ///
25 | public AddRobotParameters(string robotId = default(string))
26 | {
27 | RobotId = robotId;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "robotId")]
39 | public string RobotId { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/ClearAllCacheModel.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ClearAllCacheModel
13 | {
14 | ///
15 | /// Initializes a new instance of the ClearAllCacheModel class.
16 | ///
17 | public ClearAllCacheModel()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ClearAllCacheModel class.
24 | ///
25 | public ClearAllCacheModel(string password = default(string))
26 | {
27 | Password = password;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "password")]
39 | public string Password { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/ClearAllCacheModel.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ClearAllCacheModel
13 | {
14 | ///
15 | /// Initializes a new instance of the ClearAllCacheModel class.
16 | ///
17 | public ClearAllCacheModel()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ClearAllCacheModel class.
24 | ///
25 | public ClearAllCacheModel(string password = default(string))
26 | {
27 | Password = password;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "password")]
39 | public string Password { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/docs/Get-UiPathCurrentUserFolders.md:
--------------------------------------------------------------------------------
1 | ```PowerShell
2 |
3 | NAME
4 | Get-UiPathCurrentUserFolders
5 |
6 | SYNOPSIS
7 |
8 |
9 | SYNTAX
10 | Get-UiPathCurrentUserFolders [-AuthToken ] [-RequestTimeout ] []
11 |
12 |
13 | DESCRIPTION
14 |
15 |
16 | PARAMETERS
17 | -AuthToken
18 |
19 | Required? false
20 | Position? named
21 | Default value
22 | Accept pipeline input? false
23 | Accept wildcard characters? false
24 |
25 | -RequestTimeout
26 |
27 | Required? false
28 | Position? named
29 | Default value 100
30 | Accept pipeline input? false
31 | Accept wildcard characters? false
32 |
33 |
34 | This cmdlet supports the common parameters: Verbose, Debug,
35 | ErrorAction, ErrorVariable, WarningAction, WarningVariable,
36 | OutBuffer, PipelineVariable, and OutVariable. For more information, see
37 | about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
38 |
39 | INPUTS
40 |
41 | OUTPUTS
42 |
43 |
44 | RELATED LINKS
45 |
46 |
47 |
48 | ```
49 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/ClearAllCacheModel.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ClearAllCacheModel
13 | {
14 | ///
15 | /// Initializes a new instance of the ClearAllCacheModel class.
16 | ///
17 | public ClearAllCacheModel()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ClearAllCacheModel class.
24 | ///
25 | public ClearAllCacheModel(string password = default(string))
26 | {
27 | Password = password;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "password")]
39 | public string Password { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RevokeRolePermission.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Management.Automation;
4 | using UiPath.PowerShell.Models;
5 | using UiPath.PowerShell.Util;
6 | using UiPath.Web.Client20194;
7 |
8 | namespace UiPath.PowerShell.Cmdlets
9 | {
10 | [Cmdlet(VerbsSecurity.Revoke, Nouns.RolePermission)]
11 | public class RevokeRolePermission : AuthenticatedCmdlet
12 | {
13 | [ValidateNotNull]
14 | [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true)]
15 | public Role Role { get; set; }
16 |
17 | [Parameter(Mandatory = true, Position = 1)]
18 | public string[] Permissions { get; set; }
19 |
20 | protected override void ProcessRecord()
21 | {
22 | var dto = Role.ToDto(Role);
23 | bool hasChanges = false;
24 |
25 | foreach(var p in dto.Permissions)
26 | {
27 | if (Permissions.Any(s => s.Equals(p.Name, StringComparison.OrdinalIgnoreCase)))
28 | {
29 | p.IsGranted = false;
30 | hasChanges = true;
31 | }
32 | }
33 | if (hasChanges)
34 | {
35 | HandleHttpOperationException(() => Api.Roles.PutById(dto.Id.Value, dto));
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/AddEnvironment.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 | using Environment = UiPath.PowerShell.Models.Environment;
7 |
8 | namespace UiPath.PowerShell.Cmdlets
9 | {
10 | [Cmdlet(VerbsCommon.Add, Nouns.Environment)]
11 | public class AddEnvironment: AuthenticatedCmdlet
12 | {
13 | [Parameter (Mandatory = true)]
14 | public string Name { get; set; }
15 |
16 | [Parameter]
17 | public string Description { get; set; }
18 |
19 | [ValidateEnum(typeof(EnvironmentDtoType))]
20 | [Parameter]
21 | public string Type { get; set; }
22 |
23 | protected override void ProcessRecord()
24 | {
25 | var environment = new EnvironmentDto
26 | {
27 | Name = Name,
28 | Description = Description,
29 | };
30 | EnvironmentDtoType type;
31 | if (Enum.TryParse(Type, out type))
32 | {
33 | environment.Type = type;
34 | }
35 | var dto = HandleHttpOperationException(() => Api.Environments.Post(environment));
36 |
37 | WriteObject(Environment.FromDto(dto));
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/RemoveRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RemoveRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the RemoveRobotParameters class.
16 | ///
17 | public RemoveRobotParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RemoveRobotParameters class.
24 | ///
25 | public RemoveRobotParameters(string robotId = default(string))
26 | {
27 | RobotId = robotId;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "robotId")]
39 | public string RobotId { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/RemoveRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RemoveRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the RemoveRobotParameters class.
16 | ///
17 | public RemoveRobotParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RemoveRobotParameters class.
24 | ///
25 | public RemoveRobotParameters(string robotId = default(string))
26 | {
27 | RobotId = robotId;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "robotId")]
39 | public string RobotId { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/RemoveRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RemoveRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the RemoveRobotParameters class.
16 | ///
17 | public RemoveRobotParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RemoveRobotParameters class.
24 | ///
25 | public RemoveRobotParameters(string robotId = default(string))
26 | {
27 | RobotId = robotId;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "robotId")]
39 | public string RobotId { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/SetCurrentFolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Models;
4 | using UiPath.PowerShell.Util;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | ///
9 | /// Changes the current Folder under which all other cmdlets are evaluated
10 | ///
11 | /// Set-UiPathCurrentFolder Some/Folder/Path
12 | ///
13 | ///
14 | [Cmdlet(VerbsCommon.Set, Nouns.FolderCurrent)]
15 | public class SetCurrentFolder : AuthenticatedCmdlet
16 | {
17 | public const string FolderSet = "FolderSet";
18 | public const string FolderPathSet = "FolderPathSet";
19 |
20 | [Parameter(Mandatory = true, ParameterSetName = FolderSet, Position = 1, ValueFromPipeline = true)]
21 | public Folder Folder { get; set; }
22 |
23 | [Parameter(Mandatory = true, ParameterSetName = FolderPathSet, Position = 1)]
24 | public string FolderPath { get; set; }
25 |
26 | protected override void ProcessRecord()
27 | {
28 | var token = InternalAuthToken;
29 |
30 | SetCurrentFolder(token, Folder?.FullyQualifiedName ?? FolderPath, TimeSpan.FromSeconds(token.RequestTimeout ?? 100));
31 |
32 | WriteObject(token);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/ChangeCultureParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ChangeCultureParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the ChangeCultureParameters class.
16 | ///
17 | public ChangeCultureParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ChangeCultureParameters class.
24 | ///
25 | public ChangeCultureParameters(string culture = default(string))
26 | {
27 | Culture = culture;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "culture")]
39 | public string Culture { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/ChangeCultureParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ChangeCultureParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the ChangeCultureParameters class.
16 | ///
17 | public ChangeCultureParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ChangeCultureParameters class.
24 | ///
25 | public ChangeCultureParameters(string culture = default(string))
26 | {
27 | Culture = culture;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "culture")]
39 | public string Culture { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/StopMaintenance.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Resources;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client201910;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | ///
10 | /// Stops a Maintenance session
11 | /// This cmdlet will end the current Maintenance session for UiPath Orchestrator service.
12 | ///
13 | /// Stop-UiPathMaintenance
14 | /// Stops the current Maintenance Mode session and puts the service back in Online mode.
15 | ///
16 | ///
17 | [Cmdlet(VerbsLifecycle.Stop, Nouns.Maintenance, ConfirmImpact = ConfirmImpact.High, SupportsShouldProcess = true)]
18 | public class StopMaintenance : AuthenticatedCmdlet
19 | {
20 | protected override void ProcessRecord()
21 | {
22 | if (!ShouldProcess(Resource.Maintenance_Description, Resource.Stop_Maintenance_Warning, Resource.Stop_Maintenance_Caption))
23 | {
24 | return;
25 | }
26 |
27 | HandleHttpOperationException(() => Api_19_10.Maintenance.End());
28 |
29 | WriteObject(MaintenanceSetting.FromDto(Api_19_10.Maintenance.Get()));
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/ChangeCultureParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class ChangeCultureParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the ChangeCultureParameters class.
16 | ///
17 | public ChangeCultureParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the ChangeCultureParameters class.
24 | ///
25 | public ChangeCultureParameters(string culture = default(string))
26 | {
27 | Culture = culture;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "culture")]
39 | public string Culture { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/RemoveEnvironmentRobot.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 | using Environment = UiPath.PowerShell.Models.Environment;
7 |
8 | namespace UiPath.PowerShell.Cmdlets
9 | {
10 | [Cmdlet(VerbsCommon.Remove, Nouns.EnvironmentRobot)]
11 | public class RemoveEnvironmentRobot: AuthenticatedCmdlet
12 | {
13 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
14 | public long? EnvironmentId { get; set; }
15 |
16 | [Parameter(Mandatory = true, Position = 1, ParameterSetName = "Id")]
17 | public long? RobotId { get; set; }
18 |
19 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Values")]
20 | public Environment Environment { get; set; }
21 |
22 | [Parameter(Mandatory = true, Position = 1, ParameterSetName = "Values")]
23 | public Robot Robot { get; set; }
24 |
25 | protected override void ProcessRecord()
26 | {
27 | HandleHttpOperationException(() => Api.Environments.RemoveRobotById(Environment?.Id ?? EnvironmentId.Value, new RemoveRobotParameters
28 | {
29 | RobotId = (Robot?.Id ?? RobotId.Value).ToString()
30 | }));
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/EditRoleUser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Management.Automation;
4 | using UiPath.PowerShell.Models;
5 | using UiPath.PowerShell.Util;
6 | using UiPath.Web.Client20194;
7 | using UiPath.Web.Client20194.Models;
8 |
9 | namespace UiPath.PowerShell.Cmdlets
10 | {
11 | [Cmdlet(VerbsData.Edit, Nouns.RoleUser)]
12 | public class EditRoleUser : AuthenticatedCmdlet
13 | {
14 | [ValidateNotNull]
15 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Id")]
16 | public int? Id { get; set; }
17 |
18 | [ValidateNotNull]
19 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Role", ValueFromPipeline = true)]
20 | public Role Role { get; set; }
21 |
22 | [Parameter]
23 | public long[] Add { get; set; }
24 |
25 | [Parameter]
26 | public long[] Remove { get; set; }
27 |
28 | protected override void ProcessRecord()
29 | {
30 | HandleHttpOperationException(() => Api.Roles.SetUsersById(Role?.Id ?? Id.Value, new SetUsersParameters
31 | {
32 | AddedUserIds = Add?.Select(id => (long?)id).ToList() ?? new List(),
33 | RemovedUserIds = Remove?.Select(id => (long?)id).ToList() ?? new List(),
34 | }));
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/RobotServicePayload.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RobotServicePayload
13 | {
14 | ///
15 | /// Initializes a new instance of the RobotServicePayload class.
16 | ///
17 | public RobotServicePayload()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RobotServicePayload class.
24 | ///
25 | public RobotServicePayload(string serviceUserName = default(string))
26 | {
27 | ServiceUserName = serviceUserName;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "serviceUserName")]
39 | public string ServiceUserName { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/RobotServicePayload.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RobotServicePayload
13 | {
14 | ///
15 | /// Initializes a new instance of the RobotServicePayload class.
16 | ///
17 | public RobotServicePayload()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RobotServicePayload class.
24 | ///
25 | public RobotServicePayload(string serviceUserName = default(string))
26 | {
27 | ServiceUserName = serviceUserName;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "serviceUserName")]
39 | public string ServiceUserName { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Package.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194.Models;
5 |
6 | namespace UiPath.PowerShell.Models
7 | {
8 | [TypeConverter(typeof(UiPathTypeConverter))]
9 | public class Package
10 | {
11 | public string Id { get; private set; }
12 | public bool? IsActive { get; private set; }
13 | public bool? IsLatestVersion { get; private set; }
14 | public string Key { get; private set; }
15 | public string OldVersion { get; private set; }
16 | public DateTime? Published { get; private set; }
17 | public string Title { get; private set; }
18 | public string Version { get; private set; }
19 | public string Description { get; private set; }
20 |
21 | internal static Package FromDto(ProcessDto dto)
22 | {
23 | return new Package
24 | {
25 | Id = dto.Id,
26 | IsActive = dto.IsActive,
27 | IsLatestVersion = dto.IsLatestVersion,
28 | Key = dto.Key,
29 | OldVersion = dto.OldVersion,
30 | Published = dto.Published,
31 | Title = dto.Title,
32 | Version = dto.Version,
33 | Description = dto.Description
34 | };
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/RobotServicePayload.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RobotServicePayload
13 | {
14 | ///
15 | /// Initializes a new instance of the RobotServicePayload class.
16 | ///
17 | public RobotServicePayload()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RobotServicePayload class.
24 | ///
25 | public RobotServicePayload(string serviceUserName = default(string))
26 | {
27 | ServiceUserName = serviceUserName;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "serviceUserName")]
39 | public string ServiceUserName { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/RobotServicePayload.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class RobotServicePayload
13 | {
14 | ///
15 | /// Initializes a new instance of the RobotServicePayload class.
16 | ///
17 | public RobotServicePayload()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the RobotServicePayload class.
24 | ///
25 | public RobotServicePayload(string serviceUserName = default(string))
26 | {
27 | ServiceUserName = serviceUserName;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "serviceUserName")]
39 | public string ServiceUserName { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/docs/Get-UiPathTimeZones.md:
--------------------------------------------------------------------------------
1 | ```PowerShell
2 |
3 | NAME
4 | Get-UiPathTimeZones
5 |
6 | SYNOPSIS
7 | Shows the valid time zone names recognized by the Orchestrator.
8 |
9 |
10 | SYNTAX
11 | Get-UiPathTimeZones [-AuthToken ] [-RequestTimeout ] []
12 |
13 |
14 | DESCRIPTION
15 |
16 |
17 | PARAMETERS
18 | -AuthToken
19 |
20 | Required? false
21 | Position? named
22 | Default value
23 | Accept pipeline input? false
24 | Accept wildcard characters? false
25 |
26 | -RequestTimeout
27 |
28 | Required? false
29 | Position? named
30 | Default value 100
31 | Accept pipeline input? false
32 | Accept wildcard characters? false
33 |
34 |
35 | This cmdlet supports the common parameters: Verbose, Debug,
36 | ErrorAction, ErrorVariable, WarningAction, WarningVariable,
37 | OutBuffer, PipelineVariable, and OutVariable. For more information, see
38 | about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
39 |
40 | INPUTS
41 |
42 | OUTPUTS
43 |
44 |
45 | RELATED LINKS
46 |
47 |
48 |
49 | ```
50 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/CalendarExistsParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class CalendarExistsParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the CalendarExistsParameters class.
16 | ///
17 | public CalendarExistsParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the CalendarExistsParameters class.
24 | ///
25 | public CalendarExistsParameters(string calendarName = default(string))
26 | {
27 | CalendarName = calendarName;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "calendarName")]
39 | public string CalendarName { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetRole.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Models;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Get, Nouns.Role)]
10 | public class GetRole : FilteredBaseCmdlet
11 | {
12 | [Filter]
13 | [Parameter]
14 | public string Name { get; set; }
15 |
16 |
17 | // There is no GetById and GetRoles `Id eq 1` does not work correctly
18 | // Disable it for the moment
19 | //[Filter]
20 | //[Parameter]
21 | //public int? Id { get; set; }
22 |
23 | [Filter]
24 | [Parameter]
25 | public string DisplayName { get; set; }
26 |
27 | protected override void ProcessRecord()
28 | {
29 | // We need to extra filter on Name/DisplayName because the API retruns 'Like %Name%' instead of 'eq Name'
30 | ProcessImpl(
31 | filter => Api.Roles.GetRoles(filter: filter, expand: "Permissions").Value
32 | .Where(r => string.IsNullOrWhiteSpace(Name) ? true : r.Name.Equals(Name))
33 | .Where(r => string.IsNullOrWhiteSpace(DisplayName) ? true : r.DisplayName.Equals(DisplayName))
34 | .ToList(),
35 | dto => Role.FromDto(dto));
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/CalendarExistsParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class CalendarExistsParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the CalendarExistsParameters class.
16 | ///
17 | public CalendarExistsParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the CalendarExistsParameters class.
24 | ///
25 | public CalendarExistsParameters(string calendarName = default(string))
26 | {
27 | CalendarName = calendarName;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "calendarName")]
39 | public string CalendarName { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetMaintenance.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client201910;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | ///
9 | /// Returns a Maintenance session summary
10 | /// This cmdlet will return a summary of the current or last Maintenance session with the following structure
11 | /// State: None | Draining | Suspended
12 | /// MaintenanceLogs : {{ State = None, TimeStamp = }, { State = Draining, TimeStamp = }, { State = Suspended, TimeStamp = }}
13 | /// JobStopsAttempted : 0
14 | /// JobKillsAttempted : 0
15 | /// TriggersSkipped : 0
16 | /// SystemSchedulesFired : 0
17 | ///
18 | [Cmdlet(VerbsCommon.Get, Nouns.Maintenance)]
19 | public class GetMaintenance : AuthenticatedCmdlet
20 | {
21 | protected override void ProcessRecord()
22 | {
23 | var result = HandleHttpResponseException(() => Api_19_10.Maintenance.GetWithHttpMessagesAsync());
24 | WriteObject(MaintenanceSetting.FromDto(result));
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/SpecificPackageParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SpecificPackageParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SpecificPackageParameters class.
16 | ///
17 | public SpecificPackageParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SpecificPackageParameters class.
24 | ///
25 | public SpecificPackageParameters(string packageVersion = default(string))
26 | {
27 | PackageVersion = packageVersion;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "packageVersion")]
39 | public string PackageVersion { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/SpecificPackageParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SpecificPackageParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SpecificPackageParameters class.
16 | ///
17 | public SpecificPackageParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SpecificPackageParameters class.
24 | ///
25 | public SpecificPackageParameters(string packageVersion = default(string))
26 | {
27 | PackageVersion = packageVersion;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "packageVersion")]
39 | public string PackageVersion { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/SpecificPackageParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SpecificPackageParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SpecificPackageParameters class.
16 | ///
17 | public SpecificPackageParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SpecificPackageParameters class.
24 | ///
25 | public SpecificPackageParameters(string packageVersion = default(string))
26 | {
27 | PackageVersion = packageVersion;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "packageVersion")]
39 | public string PackageVersion { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/UsersChangeCultureParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class UsersChangeCultureParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the UsersChangeCultureParameters
16 | /// class.
17 | ///
18 | public UsersChangeCultureParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the UsersChangeCultureParameters
25 | /// class.
26 | ///
27 | public UsersChangeCultureParameters(string culture = default(string))
28 | {
29 | Culture = culture;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "culture")]
41 | public string Culture { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/SetTenantLicenseParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SetTenantLicenseParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SetTenantLicenseParameters class.
16 | ///
17 | public SetTenantLicenseParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SetTenantLicenseParameters class.
24 | ///
25 | public SetTenantLicenseParameters(HostLicensePerTenantDto license = default(HostLicensePerTenantDto))
26 | {
27 | License = license;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "license")]
39 | public HostLicensePerTenantDto License { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/SetTenantLicenseParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SetTenantLicenseParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SetTenantLicenseParameters class.
16 | ///
17 | public SetTenantLicenseParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SetTenantLicenseParameters class.
24 | ///
25 | public SetTenantLicenseParameters(HostLicensePerTenantDto license = default(HostLicensePerTenantDto))
26 | {
27 | License = license;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "license")]
39 | public HostLicensePerTenantDto License { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/Body.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class Body
15 | {
16 | ///
17 | /// Initializes a new instance of the Body class.
18 | ///
19 | public Body()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the Body class.
26 | ///
27 | public Body(IList taskAssignments = default(IList))
28 | {
29 | TaskAssignments = taskAssignments;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "taskAssignments")]
41 | public IList TaskAssignments { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/SetTenantLicenseParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SetTenantLicenseParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SetTenantLicenseParameters class.
16 | ///
17 | public SetTenantLicenseParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SetTenantLicenseParameters class.
24 | ///
25 | public SetTenantLicenseParameters(HostLicensePerTenantDto license = default(HostLicensePerTenantDto))
26 | {
27 | License = license;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "license")]
39 | public HostLicensePerTenantDto License { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/AddTenant.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Add, Nouns.Tenant)]
10 | public class AddTenant: AuthenticatedCmdlet
11 | {
12 | [Parameter(Mandatory = true)]
13 | public string Name { get; private set; }
14 |
15 | [Parameter(Mandatory = true)]
16 | public string AdminEmailAddress { get; private set; }
17 |
18 | [Parameter(Mandatory = true)]
19 | public string AdminName { get; private set; }
20 |
21 | [Parameter(Mandatory = true)]
22 | public string AdminPassword { get; private set; }
23 |
24 | [Parameter()]
25 | public string AdminSurname { get; private set; }
26 |
27 | protected override void ProcessRecord()
28 | {
29 | var tenant = new TenantDto
30 | {
31 | Name = Name,
32 | AdminEmailAddress = AdminEmailAddress,
33 | AdminName = AdminName,
34 | AdminPassword = AdminPassword,
35 | AdminSurname = AdminSurname
36 | };
37 | var dto = HandleHttpOperationException(() => Api.Tenants.Post(tenant));
38 | WriteObject(Tenant.ForDto(dto));
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/Body.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class Body
15 | {
16 | ///
17 | /// Initializes a new instance of the Body class.
18 | ///
19 | public Body()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the Body class.
26 | ///
27 | public Body(IList taskAssignments = default(IList))
28 | {
29 | TaskAssignments = taskAssignments;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "taskAssignments")]
41 | public IList TaskAssignments { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/TransactionProgressParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class TransactionProgressParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the TransactionProgressParameters
16 | /// class.
17 | ///
18 | public TransactionProgressParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the TransactionProgressParameters
25 | /// class.
26 | ///
27 | public TransactionProgressParameters(string progress = default(string))
28 | {
29 | Progress = progress;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "progress")]
41 | public string Progress { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/TransactionProgressParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class TransactionProgressParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the TransactionProgressParameters
16 | /// class.
17 | ///
18 | public TransactionProgressParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the TransactionProgressParameters
25 | /// class.
26 | ///
27 | public TransactionProgressParameters(string progress = default(string))
28 | {
29 | Progress = progress;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "progress")]
41 | public string Progress { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/TransactionProgressParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class TransactionProgressParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the TransactionProgressParameters
16 | /// class.
17 | ///
18 | public TransactionProgressParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the TransactionProgressParameters
25 | /// class.
26 | ///
27 | public TransactionProgressParameters(string progress = default(string))
28 | {
29 | Progress = progress;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "progress")]
41 | public string Progress { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/EnvironmentsAddRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class EnvironmentsAddRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the EnvironmentsAddRobotParameters
16 | /// class.
17 | ///
18 | public EnvironmentsAddRobotParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the EnvironmentsAddRobotParameters
25 | /// class.
26 | ///
27 | public EnvironmentsAddRobotParameters(string robotId = default(string))
28 | {
29 | RobotId = robotId;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "robotId")]
41 | public string RobotId { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/HeartbeatResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class HeartbeatResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the HeartbeatResponse class.
18 | ///
19 | public HeartbeatResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the HeartbeatResponse class.
26 | ///
27 | public HeartbeatResponse(IList commands = default(IList))
28 | {
29 | Commands = commands;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "commands")]
41 | public IList Commands { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/HeartbeatResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class HeartbeatResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the HeartbeatResponse class.
18 | ///
19 | public HeartbeatResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the HeartbeatResponse class.
26 | ///
27 | public HeartbeatResponse(IList commands = default(IList))
28 | {
29 | Commands = commands;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "commands")]
41 | public IList Commands { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/HeartbeatResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class HeartbeatResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the HeartbeatResponse class.
18 | ///
19 | public HeartbeatResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the HeartbeatResponse class.
26 | ///
27 | public HeartbeatResponse(IList commands = default(IList))
28 | {
29 | Commands = commands;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "commands")]
41 | public IList Commands { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/UsersChangeUserCultureParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class UsersChangeUserCultureParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the UsersChangeUserCultureParameters
16 | /// class.
17 | ///
18 | public UsersChangeUserCultureParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the UsersChangeUserCultureParameters
25 | /// class.
26 | ///
27 | public UsersChangeUserCultureParameters(string culture = default(string))
28 | {
29 | Culture = culture;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "culture")]
41 | public string Culture { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetQueueDefinition.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.QueueDefinition)]
9 | public class GetQueueDefinition: FilteredIdCmdlet
10 | {
11 |
12 | [Filter]
13 | [Parameter(ParameterSetName = "Filter")]
14 | public string Name { get; internal set; }
15 |
16 | [Filter]
17 | [Parameter(ParameterSetName = "Filter")]
18 | public string Description { get; internal set; }
19 |
20 | [Filter]
21 | [Parameter(ParameterSetName = "Filter")]
22 | public bool? AcceptAutomaticallyRetry { get; internal set; }
23 |
24 | [Filter]
25 | [Parameter(ParameterSetName = "Filter")]
26 | public bool? EnforceUniqueReference { get; internal set; }
27 |
28 | [Filter]
29 | [Parameter(ParameterSetName = "Filter")]
30 | public int? MaxNumberOfRetries { get; internal set; }
31 |
32 | protected override void ProcessRecord()
33 | {
34 | ProcessImpl(
35 | (filter, top, skip) => Api.QueueDefinitions.GetQueueDefinitions(filter: filter, top: top, skip: skip, count: false),
36 | id => Api.QueueDefinitions.GetById(id),
37 | dto => QueueDefinition.FromDto(dto));
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/DeactivateLicenseOnlineParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class DeactivateLicenseOnlineParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the DeactivateLicenseOnlineParameters
16 | /// class.
17 | ///
18 | public DeactivateLicenseOnlineParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the DeactivateLicenseOnlineParameters
25 | /// class.
26 | ///
27 | public DeactivateLicenseOnlineParameters(int? tenantId = default(int?))
28 | {
29 | TenantId = tenantId;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "tenantId")]
41 | public int? TenantId { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/EnvironmentsRemoveRobotParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class EnvironmentsRemoveRobotParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the EnvironmentsRemoveRobotParameters
16 | /// class.
17 | ///
18 | public EnvironmentsRemoveRobotParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the EnvironmentsRemoveRobotParameters
25 | /// class.
26 | ///
27 | public EnvironmentsRemoveRobotParameters(string robotId = default(string))
28 | {
29 | RobotId = robotId;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "robotId")]
41 | public string RobotId { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/DeactivateLicenseOnlineParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class DeactivateLicenseOnlineParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the DeactivateLicenseOnlineParameters
16 | /// class.
17 | ///
18 | public DeactivateLicenseOnlineParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the DeactivateLicenseOnlineParameters
25 | /// class.
26 | ///
27 | public DeactivateLicenseOnlineParameters(int? tenantId = default(int?))
28 | {
29 | TenantId = tenantId;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "tenantId")]
41 | public int? TenantId { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetProcessSchedule.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 |
6 | namespace UiPath.PowerShell.Cmdlets
7 | {
8 | [Cmdlet(VerbsCommon.Get, Nouns.ProcessSchedule)]
9 | public class GetProcessSchedule : FilteredIdCmdlet
10 | {
11 | [Filter]
12 | [Parameter(ParameterSetName = "Filter")]
13 | public string Name { get; internal set; }
14 |
15 | protected override void ProcessRecord()
16 | {
17 | if (Supports(OrchestratorProtocolVersion.V19_10))
18 | {
19 | ProcessImpl(
20 | (filter, top, skip) => HandleHttpResponseException(() => Api_19_10.ProcessSchedules.GetProcessSchedulesWithHttpMessagesAsync(filter: filter, top: top, skip: skip, count: false)),
21 | id => HandleHttpResponseException(() => Api_19_10.ProcessSchedules.GetByIdWithHttpMessagesAsync(id)),
22 | dto => ProcessSchedule.FromDto(dto));
23 | }
24 | else
25 | {
26 | ProcessImpl(
27 | (filter, top, skip) => Api.ProcessSchedules.GetProcessSchedules(filter: filter, top: top, skip: skip, count: false),
28 | id => Api.ProcessSchedules.GetById(id),
29 | dto => ProcessSchedule.FromDto(dto));
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/DeactivateLicenseOfflineParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class DeactivateLicenseOfflineParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the
16 | /// DeactivateLicenseOfflineParameters class.
17 | ///
18 | public DeactivateLicenseOfflineParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the
25 | /// DeactivateLicenseOfflineParameters class.
26 | ///
27 | public DeactivateLicenseOfflineParameters(int? tenantId = default(int?))
28 | {
29 | TenantId = tenantId;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "tenantId")]
41 | public int? TenantId { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/SetTransactionParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SetTransactionParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SetTransactionParameters class.
16 | ///
17 | public SetTransactionParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SetTransactionParameters class.
24 | ///
25 | public SetTransactionParameters(TransactionResultDto transactionResult = default(TransactionResultDto))
26 | {
27 | TransactionResult = transactionResult;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "transactionResult")]
39 | public TransactionResultDto TransactionResult { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/SetTransactionParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SetTransactionParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SetTransactionParameters class.
16 | ///
17 | public SetTransactionParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SetTransactionParameters class.
24 | ///
25 | public SetTransactionParameters(TransactionResultDto transactionResult = default(TransactionResultDto))
26 | {
27 | TransactionResult = transactionResult;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "transactionResult")]
39 | public TransactionResultDto TransactionResult { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/UpdateBulkParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class UpdateBulkParameters
15 | {
16 | ///
17 | /// Initializes a new instance of the UpdateBulkParameters class.
18 | ///
19 | public UpdateBulkParameters()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the UpdateBulkParameters class.
26 | ///
27 | public UpdateBulkParameters(IList settings = default(IList))
28 | {
29 | Settings = settings;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "settings")]
41 | public IList Settings { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/DeactivateLicenseOfflineParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class DeactivateLicenseOfflineParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the
16 | /// DeactivateLicenseOfflineParameters class.
17 | ///
18 | public DeactivateLicenseOfflineParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the
25 | /// DeactivateLicenseOfflineParameters class.
26 | ///
27 | public DeactivateLicenseOfflineParameters(int? tenantId = default(int?))
28 | {
29 | TenantId = tenantId;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "tenantId")]
41 | public int? TenantId { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/SetTransactionParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class SetTransactionParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the SetTransactionParameters class.
16 | ///
17 | public SetTransactionParameters()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the SetTransactionParameters class.
24 | ///
25 | public SetTransactionParameters(TransactionResultDto transactionResult = default(TransactionResultDto))
26 | {
27 | TransactionResult = transactionResult;
28 | CustomInit();
29 | }
30 |
31 | ///
32 | /// An initialization method that performs custom operations like setting defaults
33 | ///
34 | partial void CustomInit();
35 |
36 | ///
37 | ///
38 | [JsonProperty(PropertyName = "transactionResult")]
39 | public TransactionResultDto TransactionResult { get; set; }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/UpdateBulkParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class UpdateBulkParameters
15 | {
16 | ///
17 | /// Initializes a new instance of the UpdateBulkParameters class.
18 | ///
19 | public UpdateBulkParameters()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the UpdateBulkParameters class.
26 | ///
27 | public UpdateBulkParameters(IList settings = default(IList))
28 | {
29 | Settings = settings;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "settings")]
41 | public IList Settings { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/AddQueueDefinition.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsCommon.Add, Nouns.QueueDefinition)]
10 | public class AddQueueDefinition: AuthenticatedCmdlet
11 | {
12 | [Parameter(Mandatory = true)]
13 | public string Name { get; set; }
14 |
15 | [Parameter]
16 | public string Description { get; set; }
17 |
18 | [Parameter]
19 | public SwitchParameter AcceptAutomaticallyRetry { get; set; }
20 |
21 | [Parameter]
22 | public SwitchParameter EnforceUniqueReference { get; set; }
23 |
24 | [Parameter]
25 | public int? MaxNumberOfRetries { get; set; }
26 |
27 | protected override void ProcessRecord()
28 | {
29 | var queue = HandleHttpOperationException(() => Api.QueueDefinitions.Post(new QueueDefinitionDto
30 | {
31 | Name = Name,
32 | AcceptAutomaticallyRetry = AcceptAutomaticallyRetry.ToBool(),
33 | Description = Description,
34 | EnforceUniqueReference = EnforceUniqueReference.ToBool(),
35 | MaxNumberOfRetries = MaxNumberOfRetries
36 | }));
37 | WriteObject(QueueDefinition.FromDto(queue));
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/RobotServiceResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class RobotServiceResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the RobotServiceResponse class.
18 | ///
19 | public RobotServiceResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the RobotServiceResponse class.
26 | ///
27 | public RobotServiceResponse(IList robots = default(IList))
28 | {
29 | Robots = robots;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "robots")]
41 | public IList Robots { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/UpdateBulkParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class UpdateBulkParameters
15 | {
16 | ///
17 | /// Initializes a new instance of the UpdateBulkParameters class.
18 | ///
19 | public UpdateBulkParameters()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the UpdateBulkParameters class.
26 | ///
27 | public UpdateBulkParameters(IList settings = default(IList))
28 | {
29 | Settings = settings;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "settings")]
41 | public IList Settings { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/RobotServiceResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class RobotServiceResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the RobotServiceResponse class.
18 | ///
19 | public RobotServiceResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the RobotServiceResponse class.
26 | ///
27 | public RobotServiceResponse(IList robots = default(IList))
28 | {
29 | Robots = robots;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "robots")]
41 | public IList Robots { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/RobotServiceResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class RobotServiceResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the RobotServiceResponse class.
18 | ///
19 | public RobotServiceResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the RobotServiceResponse class.
26 | ///
27 | public RobotServiceResponse(IList robots = default(IList))
28 | {
29 | Robots = robots;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "robots")]
41 | public IList Robots { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/RobotServiceResponse.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class RobotServiceResponse
15 | {
16 | ///
17 | /// Initializes a new instance of the RobotServiceResponse class.
18 | ///
19 | public RobotServiceResponse()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the RobotServiceResponse class.
26 | ///
27 | public RobotServiceResponse(IList robots = default(IList))
28 | {
29 | Robots = robots;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "robots")]
41 | public IList Robots { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/ApplyClause.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ApplyClause
15 | {
16 | ///
17 | /// Initializes a new instance of the ApplyClause class.
18 | ///
19 | public ApplyClause()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ApplyClause class.
26 | ///
27 | public ApplyClause(IList transformations = default(IList))
28 | {
29 | Transformations = transformations;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Transformations")]
41 | public IList Transformations { get; private set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/ApplyClause.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ApplyClause
15 | {
16 | ///
17 | /// Initializes a new instance of the ApplyClause class.
18 | ///
19 | public ApplyClause()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ApplyClause class.
26 | ///
27 | public ApplyClause(IList transformations = default(IList))
28 | {
29 | Transformations = transformations;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Transformations")]
41 | public IList Transformations { get; private set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/ApplyClause.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ApplyClause
15 | {
16 | ///
17 | /// Initializes a new instance of the ApplyClause class.
18 | ///
19 | public ApplyClause()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ApplyClause class.
26 | ///
27 | public ApplyClause(IList transformations = default(IList))
28 | {
29 | Transformations = transformations;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Transformations")]
41 | public IList Transformations { get; private set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/AssignUsersActionParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class AssignUsersActionParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the AssignUsersActionParameters
16 | /// class.
17 | ///
18 | public AssignUsersActionParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the AssignUsersActionParameters
25 | /// class.
26 | ///
27 | public AssignUsersActionParameters(UserAssignmentsDto assignments = default(UserAssignmentsDto))
28 | {
29 | Assignments = assignments;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "assignments")]
41 | public UserAssignmentsDto Assignments { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/AssignUsersActionParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class AssignUsersActionParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the AssignUsersActionParameters
16 | /// class.
17 | ///
18 | public AssignUsersActionParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the AssignUsersActionParameters
25 | /// class.
26 | ///
27 | public AssignUsersActionParameters(UserAssignmentsDto assignments = default(UserAssignmentsDto))
28 | {
29 | Assignments = assignments;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "assignments")]
41 | public UserAssignmentsDto Assignments { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/ListResultDtoLanguageInfo.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ListResultDtoLanguageInfo
15 | {
16 | ///
17 | /// Initializes a new instance of the ListResultDtoLanguageInfo class.
18 | ///
19 | public ListResultDtoLanguageInfo()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ListResultDtoLanguageInfo class.
26 | ///
27 | public ListResultDtoLanguageInfo(IList items = default(IList))
28 | {
29 | Items = items;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Items")]
41 | public IList Items { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/ListResultDtoNameValueDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ListResultDtoNameValueDto
15 | {
16 | ///
17 | /// Initializes a new instance of the ListResultDtoNameValueDto class.
18 | ///
19 | public ListResultDtoNameValueDto()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ListResultDtoNameValueDto class.
26 | ///
27 | public ListResultDtoNameValueDto(IList items = default(IList))
28 | {
29 | Items = items;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Items")]
41 | public IList Items { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/ListResultDtoNameValueDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ListResultDtoNameValueDto
15 | {
16 | ///
17 | /// Initializes a new instance of the ListResultDtoNameValueDto class.
18 | ///
19 | public ListResultDtoNameValueDto()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ListResultDtoNameValueDto class.
26 | ///
27 | public ListResultDtoNameValueDto(IList items = default(IList))
28 | {
29 | Items = items;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Items")]
41 | public IList Items { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/CalendarsCalendarExistsParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class CalendarsCalendarExistsParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the CalendarsCalendarExistsParameters
16 | /// class.
17 | ///
18 | public CalendarsCalendarExistsParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the CalendarsCalendarExistsParameters
25 | /// class.
26 | ///
27 | public CalendarsCalendarExistsParameters(string calendarName = default(string))
28 | {
29 | CalendarName = calendarName;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "calendarName")]
41 | public string CalendarName { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/MachineDeleteBulkRequest.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class MachineDeleteBulkRequest
15 | {
16 | ///
17 | /// Initializes a new instance of the MachineDeleteBulkRequest class.
18 | ///
19 | public MachineDeleteBulkRequest()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the MachineDeleteBulkRequest class.
26 | ///
27 | public MachineDeleteBulkRequest(IList machineIds = default(IList))
28 | {
29 | MachineIds = machineIds;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "machineIds")]
41 | public IList MachineIds { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/ListResultDtoLanguageInfo.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ListResultDtoLanguageInfo
15 | {
16 | ///
17 | /// Initializes a new instance of the ListResultDtoLanguageInfo class.
18 | ///
19 | public ListResultDtoLanguageInfo()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ListResultDtoLanguageInfo class.
26 | ///
27 | public ListResultDtoLanguageInfo(IList items = default(IList))
28 | {
29 | Items = items;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Items")]
41 | public IList Items { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/ListResultDtoNameValueDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class ListResultDtoNameValueDto
15 | {
16 | ///
17 | /// Initializes a new instance of the ListResultDtoNameValueDto class.
18 | ///
19 | public ListResultDtoNameValueDto()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the ListResultDtoNameValueDto class.
26 | ///
27 | public ListResultDtoNameValueDto(IList items = default(IList))
28 | {
29 | Items = items;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "Items")]
41 | public IList Items { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/EditQueueDefinition.cs:
--------------------------------------------------------------------------------
1 | using System.Management.Automation;
2 | using UiPath.PowerShell.Models;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194;
5 | using UiPath.Web.Client20194.Models;
6 |
7 | namespace UiPath.PowerShell.Cmdlets
8 | {
9 | [Cmdlet(VerbsData.Edit, Nouns.QueueDefinition)]
10 | public class EditQueueDefinition: EditCmdlet
11 | {
12 | private const string QueueDefinitionParameterSet = "QueueDefinition";
13 | private const string IdParameterSet = "Id";
14 |
15 | [ValidateNotNull]
16 | [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = QueueDefinitionParameterSet)]
17 | public QueueDefinition QueueDefinition{ get; set; }
18 |
19 | [ValidateNotNull]
20 | [Parameter(Mandatory = true, Position = 0, ParameterSetName = IdParameterSet)]
21 | public long Id { get; set; }
22 |
23 |
24 | [SetParameter]
25 | [Parameter]
26 | public string Description { get; private set; }
27 |
28 | protected override void ProcessRecord()
29 | {
30 | ProcessImpl(
31 | () => (ParameterSetName == QueueDefinitionParameterSet) ? QueueDefinition.ToDto(QueueDefinition) : HandleHttpOperationException(() => Api.QueueDefinitions.GetById(Id)),
32 | (queueDto) => HandleHttpOperationException(() => Api.QueueDefinitions.PutById(queueDto.Id.Value, queueDto)));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/FoldersAssignUsersParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class FoldersAssignUsersParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the FoldersAssignUsersParameters
16 | /// class.
17 | ///
18 | public FoldersAssignUsersParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the FoldersAssignUsersParameters
25 | /// class.
26 | ///
27 | public FoldersAssignUsersParameters(UserAssignmentsDto assignments = default(UserAssignmentsDto))
28 | {
29 | Assignments = assignments;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "assignments")]
41 | public UserAssignmentsDto Assignments { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/Library.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using UiPath.PowerShell.Util;
4 | using UiPath.Web.Client20194.Models;
5 |
6 | namespace UiPath.PowerShell.Models
7 | {
8 | [TypeConverter(typeof(UiPathTypeConverter))]
9 | public class Library
10 | {
11 | public string Id { get; private set; }
12 | public string Authors { get; private set; }
13 | public string Description { get; private set; }
14 | public bool? IsLatestVersion { get; private set; }
15 | public string Key { get; private set; }
16 | public string OldVersion { get; private set; }
17 | public DateTime? Published { get; private set; }
18 | public string ReleaseNotes { get; private set; }
19 | public string Title { get; private set; }
20 | public string Version { get; private set; }
21 |
22 | public static Library FromDto(LibraryDto dto)
23 | {
24 | return new Library
25 | {
26 | Id = dto.Id,
27 | Authors =dto.Authors,
28 | Description =dto.Description,
29 | IsLatestVersion = dto.IsLatestVersion,
30 | Key = dto.Key,
31 | OldVersion = dto.OldVersion,
32 | Published = dto.Published,
33 | ReleaseNotes = dto.ReleaseNotes,
34 | Title = dto.Title,
35 | Version = dto.Version,
36 | };
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Cmdlets/GetMachine.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Management.Automation;
3 | using UiPath.PowerShell.Models;
4 | using UiPath.PowerShell.Util;
5 | using UiPath.Web.Client20194;
6 | using UiPath.Web.Client20204;
7 | using MachineDtoType = UiPath.Web.Client20194.Models.MachineDtoType;
8 |
9 | namespace UiPath.PowerShell.Cmdlets
10 | {
11 | [Cmdlet(VerbsCommon.Get, Nouns.Machine)]
12 | public class GetMachine : FilteredIdCmdlet
13 | {
14 | [Filter]
15 | [Parameter(ParameterSetName = "Filter")]
16 | public string Name { get; set; }
17 |
18 | [Filter]
19 | [Parameter(ParameterSetName = "Filter")]
20 | public string Type { get; set; }
21 |
22 | protected override void ProcessRecord()
23 | {
24 | if (Supports(OrchestratorProtocolVersion.V20_4))
25 | {
26 | ProcessImpl(
27 | (filter, top, skip) => Api_20_4.Machines.Get(filter: filter, top: top, skip: skip, count: false),
28 | id => Api_20_4.Machines.GetById(id).To(),
29 | dto => Machine.FromDto(dto));
30 |
31 | }
32 | ProcessImpl(
33 | (filter, top, skip) => Api.Machines.GetMachines(filter: filter, top: top, skip: skip, count: false),
34 | id => Api.Machines.GetById(id),
35 | dto => Machine.FromDto(dto));
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/DeleteBulkParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class DeleteBulkParameters
15 | {
16 | ///
17 | /// Initializes a new instance of the DeleteBulkParameters class.
18 | ///
19 | public DeleteBulkParameters()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the DeleteBulkParameters class.
26 | ///
27 | public DeleteBulkParameters(IList queueItems = default(IList))
28 | {
29 | QueueItems = queueItems;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "queueItems")]
41 | public IList QueueItems { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/DeleteBulkParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class DeleteBulkParameters
15 | {
16 | ///
17 | /// Initializes a new instance of the DeleteBulkParameters class.
18 | ///
19 | public DeleteBulkParameters()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the DeleteBulkParameters class.
26 | ///
27 | public DeleteBulkParameters(IList queueItems = default(IList))
28 | {
29 | QueueItems = queueItems;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "queueItems")]
41 | public IList QueueItems { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.PowerShell/Models/AssetRobotValue.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.ComponentModel;
4 | using System.Management.Automation;
5 | using UiPath.PowerShell.Util;
6 | using UiPath.Web.Client201910.Models;
7 |
8 | namespace UiPath.PowerShell.Models
9 | {
10 | [TypeConverter(typeof(UiPathTypeConverter))]
11 | public class AssetRobotValue
12 | {
13 | public long RobotId { get; internal set; }
14 |
15 | public string TextValue { get; internal set; }
16 |
17 | public int? IntValue { get; internal set; }
18 |
19 | public bool? BoolValue { get; internal set; }
20 |
21 | public PSCredential Credential { get; internal set; }
22 |
23 | public Hashtable KeyValueList { get; internal set; }
24 |
25 | public string ValueType { get; internal set; }
26 |
27 | public AssetRobotValueDto ToDto()
28 | {
29 | return new AssetRobotValueDto
30 | {
31 | RobotId = RobotId,
32 | RobotName = "Ignore robot name required by 19.10 bug",
33 | StringValue = TextValue,
34 | IntValue = IntValue,
35 | BoolValue = BoolValue,
36 | ValueType = (AssetRobotValueDtoValueType) Enum.Parse(typeof(AssetRobotValueDtoValueType),ValueType),
37 | CredentialUsername = Credential?.UserName,
38 | CredentialPassword = Credential?.ExtractPassword()
39 | };
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/DeleteBulkParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Linq;
13 |
14 | public partial class DeleteBulkParameters
15 | {
16 | ///
17 | /// Initializes a new instance of the DeleteBulkParameters class.
18 | ///
19 | public DeleteBulkParameters()
20 | {
21 | CustomInit();
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the DeleteBulkParameters class.
26 | ///
27 | public DeleteBulkParameters(IList queueItems = default(IList))
28 | {
29 | QueueItems = queueItems;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "queueItems")]
41 | public IList QueueItems { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20204/Models/AssignMachinesActionParameters.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20204.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class AssignMachinesActionParameters
13 | {
14 | ///
15 | /// Initializes a new instance of the AssignMachinesActionParameters
16 | /// class.
17 | ///
18 | public AssignMachinesActionParameters()
19 | {
20 | CustomInit();
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the AssignMachinesActionParameters
25 | /// class.
26 | ///
27 | public AssignMachinesActionParameters(MachineAssignmentsDto assignments = default(MachineAssignmentsDto))
28 | {
29 | Assignments = assignments;
30 | CustomInit();
31 | }
32 |
33 | ///
34 | /// An initialization method that performs custom operations like setting defaults
35 | ///
36 | partial void CustomInit();
37 |
38 | ///
39 | ///
40 | [JsonProperty(PropertyName = "assignments")]
41 | public MachineAssignmentsDto Assignments { get; set; }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated201910/Models/NameValueDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client201910.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class NameValueDto
13 | {
14 | ///
15 | /// Initializes a new instance of the NameValueDto class.
16 | ///
17 | public NameValueDto()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the NameValueDto class.
24 | ///
25 | public NameValueDto(string name = default(string), string value = default(string))
26 | {
27 | Name = name;
28 | Value = value;
29 | CustomInit();
30 | }
31 |
32 | ///
33 | /// An initialization method that performs custom operations like setting defaults
34 | ///
35 | partial void CustomInit();
36 |
37 | ///
38 | ///
39 | [JsonProperty(PropertyName = "Name")]
40 | public string Name { get; set; }
41 |
42 | ///
43 | ///
44 | [JsonProperty(PropertyName = "Value")]
45 | public string Value { get; set; }
46 |
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated20194/Models/NameValueDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client20194.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class NameValueDto
13 | {
14 | ///
15 | /// Initializes a new instance of the NameValueDto class.
16 | ///
17 | public NameValueDto()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the NameValueDto class.
24 | ///
25 | public NameValueDto(string name = default(string), string value = default(string))
26 | {
27 | Name = name;
28 | Value = value;
29 | CustomInit();
30 | }
31 |
32 | ///
33 | /// An initialization method that performs custom operations like setting defaults
34 | ///
35 | partial void CustomInit();
36 |
37 | ///
38 | ///
39 | [JsonProperty(PropertyName = "Name")]
40 | public string Name { get; set; }
41 |
42 | ///
43 | ///
44 | [JsonProperty(PropertyName = "Value")]
45 | public string Value { get; set; }
46 |
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/DomainDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class DomainDto
13 | {
14 | ///
15 | /// Initializes a new instance of the DomainDto class.
16 | ///
17 | public DomainDto()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the DomainDto class.
24 | ///
25 | public DomainDto(string name = default(string), bool? isDefault = default(bool?))
26 | {
27 | Name = name;
28 | IsDefault = isDefault;
29 | CustomInit();
30 | }
31 |
32 | ///
33 | /// An initialization method that performs custom operations like setting defaults
34 | ///
35 | partial void CustomInit();
36 |
37 | ///
38 | ///
39 | [JsonProperty(PropertyName = "name")]
40 | public string Name { get; set; }
41 |
42 | ///
43 | ///
44 | [JsonProperty(PropertyName = "isDefault")]
45 | public bool? IsDefault { get; set; }
46 |
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/UiPath.Web.Client/generated202010/Models/NameValueDto.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Code generated by Microsoft (R) AutoRest Code Generator.
3 | // Changes may cause incorrect behavior and will be lost if the code is
4 | // regenerated.
5 | //
6 |
7 | namespace UiPath.Web.Client202010.Models
8 | {
9 | using Newtonsoft.Json;
10 | using System.Linq;
11 |
12 | public partial class NameValueDto
13 | {
14 | ///
15 | /// Initializes a new instance of the NameValueDto class.
16 | ///
17 | public NameValueDto()
18 | {
19 | CustomInit();
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the NameValueDto class.
24 | ///
25 | public NameValueDto(string name = default(string), string value = default(string))
26 | {
27 | Name = name;
28 | Value = value;
29 | CustomInit();
30 | }
31 |
32 | ///
33 | /// An initialization method that performs custom operations like setting defaults
34 | ///
35 | partial void CustomInit();
36 |
37 | ///
38 | ///
39 | [JsonProperty(PropertyName = "Name")]
40 | public string Name { get; set; }
41 |
42 | ///
43 | ///
44 | [JsonProperty(PropertyName = "Value")]
45 | public string Value { get; set; }
46 |
47 | }
48 | }
49 |
--------------------------------------------------------------------------------